Get Available Resources
Conservatively detects the CPU, memory, disk and accelerator limits your current process actually has, emitting a redacted JSON snapshot plus safe worker-planning helpers.
UtilitiesIntermediate★ 33,030⑂ 3,248AI score 9/10Last updated: Aug 9, 2026
What it does
- Separates host inventory from what the current process may actually use: logical/physical CPUs, process affinity, cgroup v2 cpuset and
cpu.maxquota, and Slurm per-task allocation. - Reports memory in distinct buckets: host total/available, cgroup hard
memory.max, the softermemory.highthrottle boundary, and scheduler allocation. On Apple silicon it treats memory as unified instead of inventing separate VRAM. - Treats every NVIDIA/AMD/Apple GPU as a backend candidate only (CUDA/ROCm/Metal), leaving
runtime_compatibility: not_testedso visibility is never mistaken for usability. - Redacts hostnames, absolute paths, cgroup paths, job IDs, device UUIDs and PCI addresses; prints JSON to stdout by default and only writes files when you name one explicitly.
- Ships companion scripts: a deterministic worker/memory planner, a schema validator, a bounded snapshot diff, and a non-executing accelerator diagnostic plan.
- Explicitly forbids stress tests, benchmarks, large allocations, device resets and driver installs.
Who it's for
- Researchers and engineers running jobs on HPC clusters (Slurm) or in containers who need to know their real core and memory budget.
- Data/ML developers fighting oversubscription between process workers and native BLAS/OpenMP threads.
- Anyone juggling Linux, macOS and Windows environments who wants resource limits recorded in one consistent, shareable format.
Example uses
- Pre-flight check: run
python scripts/detect_resources.pyand readcpu.effective.worker_ceilingplus the effective memory ceiling before launching a heavy local job. - Parallel plan:
plan_workload.py resource-snapshot.json --workload cpu --tasks 100 --memory-per-worker-mib 2048returns suggested workers andthreads_per_workerso you don't oversubscribe an allocation. - Environment drift: after changing container limits, run
snapshot_tools.py diff before.json after.jsonto confirm the cgroup caps really changed, ignoring the timestamp.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/K-Dense-AI/scientific-agent-skills/HEAD/skills/get-available-resources/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the skills/get-available-resources folder from the GitHub repo K-Dense-AI/scientific-agent-skills into my ~/.claude/skills/get-available-resources/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/K-Dense-AI/scientific-agent-skills.git && mkdir -p ~/.claude/skills && cp -r scientific-agent-skills/skills/get-available-resources ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Confirm Python 3.11 or newer:
python --version. - Clone the repository:
git clone https://github.com/K-Dense-AI/scientific-agent-skills.git - Copy the skill into your Claude skills directory:
mkdir -p ~/.claude/skills && cp -r scientific-agent-skills/skills/get-available-resources ~/.claude/skills/ - Verify the
scripts/andreferences/subfolders came along — the instructions reference them directly. - (Optional) For broader cross-platform coverage install psutil:
uv pip install "psutil==7.2.2"orpip install psutil==7.2.2. The detector still works on the standard library alone. - Restart Claude Code and ask something like "snapshot the resources actually available here before we run this job".
- To keep a file, pass an explicit name:
python scripts/detect_resources.py --output resource-snapshot.json(stdout is the default).
View source on GitHub ↗License: MIT