Guide · Agent skill
How to use the Get Available Resources agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
Get Available Resources is an agent skill that checks what your machine can actually use before a heavy job starts. It reads CPU, memory, disk, Slurm scheduler, container and accelerator limits, then gives you a redacted JSON snapshot and a conservative plan for how many workers to run. This guide explains what the skill does, how to install it, how to trigger it with plain requests, and what to watch for.
Quick start
- 1Download and unzip the skill. Download the ZIP from our page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder. In the Claude apps, upload the ZIP under Settings → Capabilities → Skills instead.
- 2Confirm Python 3.11 or newer. The detector needs Python 3.11 or newer. Psutil is optional and improves coverage.
- 3Ask for resource-aware planning. Describe the job in plain words, such as how many workers your batch run can safely use. The agent loads the skill when the request matches.
- 4Run the detector. Let the agent run python scripts/detect_resources.py, or run it yourself from the skill directory. Add --output only if you want a private local file.
- 5Plan the workload. Run plan_workload.py on the snapshot with your task count and per-worker memory. Do not launch a plan that returns insufficient_memory.
- 6Check the result. Use the snapshot tools to validate the file or diff two runs. Verify GPU usability with your own framework before relying on it.
What is an agent skill, and what does this one do?
An agent skill is a folder of instructions and scripts that an AI agent can load when a task calls for it. This skill is for resource-aware planning: it helps the agent work out what resources the current process can really use before a large local workload.
It keeps several kinds of facts separate. Host inventory (what the machine has), process affinity, cgroup or container limits, scheduler allocation and accelerator usability are reported as different observations, not merged into one number.
- Reads CPU counts, memory, disk, Slurm scheduler allocation, container markers and visible GPU or accelerator devices (CUDA, ROCm, Apple Metal).
- Produces a redacted JSON snapshot, with hostnames, absolute paths and device IDs left out.
- Produces a conservative worker plan for CPU, mixed or I/O work.
- Does not run stress tests or benchmarks, and does not assume visible hardware is usable.
Install the skill from the ZIP or the Claude apps
Download the ZIP for this skill from our page. You have two ways to install it.
For Claude Code, unzip the folder into your personal skills directory ~/.claude/skills/, or into a project's .claude/skills/ directory if you want the skill only for that project.
In the Claude apps, upload the ZIP under Settings → Capabilities → Skills.
- Personal install: unzip into ~/.claude/skills/.
- Project install: unzip into the project's .claude/skills/ folder.
- Claude apps: Settings → Capabilities → Skills, then upload the ZIP.
Check your requirements before running anything
The skill needs Python 3.11 or newer. It is compatible with Linux, macOS and Windows. The standard library is enough for the default detector.
psutil is optional. It adds broader coverage for physical cores, affinity, available memory, swap and disk. Accelerator management tools such as nvidia-smi, amd-smi, rocm-smi or system_profiler are also optional; they give GPU visibility only. The skill runs scripts, and it does not use the network.
- Required: Python 3.11 or newer.
- Optional: psutil (installed through uv for broader coverage).
- Optional: nvidia-smi, amd-smi/rocm-smi or system_profiler for GPU visibility.
- Runs scripts: yes. Uses network: no.
Run a resource snapshot
Run the detector from the skill directory. By default it prints JSON to stdout and writes nothing to disk. To save a snapshot, use the explicit --output option with a single .json filename in the current directory. Saved files are created with mode 0600 on POSIX systems and will not overwrite an existing file unless you add --force.
If you want psutil coverage without installing it permanently, run it through uv. If accelerator probes are slow on your machine, skip them.
- Stdout only: the default, nothing saved.
- Private file: add --output resource-snapshot.json.
- Broader coverage: run through uv with psutil pinned.
- Faster run: add --skip-accelerators, which still reports whether visibility variables are present, but not their values.
python scripts/detect_resources.py
python scripts/detect_resources.py --output resource-snapshot.json
uv run --no-project --with "psutil==7.2.2" python scripts/detect_resources.py
python scripts/detect_resources.py --skip-acceleratorsPlan a workload from the snapshot
The planner reads a saved snapshot and does no work itself. Give it the kind of workload, the number of tasks and the memory each worker needs. It returns a suggested worker count and threads per worker.
Treat the output as a provisional estimate, not a reservation. If the known memory budget cannot fit one worker, the plan returns zero workers with insufficient_memory, and you should not launch it. If CPU or memory is unknown, it returns review_required.
- --workers N sets an upper bound.
- --reserve-memory-mib N keeps memory outside the worker budget.
- --workload cpu, mixed or io chooses the worker heuristic.
- --accelerator none, any, cuda, rocm or metal requests a candidate backend without confirming it works.
- --output plan.json writes a private local file; stdout is the default.
python scripts/plan_workload.py resource-snapshot.json --workload cpu --tasks 100 --memory-per-worker-mib 2048Validate and compare snapshots
Use the snapshot tools to check a file before you rely on it, or to see what changed between two runs, for example before and after you free memory or change a batch job. Diffs ignore the observation timestamp unless you ask for it.
- Validate: check that a snapshot file is well formed.
- Diff: compare two snapshots, ignoring observed_at by default.
- --include-volatile: add the timestamp to the diff.
python scripts/snapshot_tools.py validate resource-snapshot.json
python scripts/snapshot_tools.py diff before.json after.jsonSafety notes and limits
The skill is read-only by design. It does not run stress tests, benchmarks, large allocations, write probes, device resets, driver installs or clock and power changes. It reads only the named Slurm and accelerator variables and does not dump your environment.
The output is redacted, but the detector still reads system information on your machine. If you are on a shared server and cannot let an agent see host details, do not run it. GPU results show visibility, not proof that a framework can use the device. Disk results cover only the working filesystem, so check output paths separately.
- Not a benchmark: its numbers are conservative estimates.
- GPU runtime compatibility is reported as not_tested; confirm your framework can use the device.
- Scheduler variables do not prove enforcement; check affinity and cgroup limits too.
- Missing data is reported as unknown, never as unlimited.
What people use it for
- Choosing a safe number of parallel workers for a feature-extraction job on a shared Linux server.
- Checking whether a Slurm allocation or container limits the CPUs and memory you see on the host.
- Estimating whether a laptop has enough free memory for a batch of simulations before starting them.
- Comparing snapshots before and after closing other programs to see how much memory was freed.
- Building a standard resource snapshot format into a pipeline that schedules jobs.
Frequently asked questions
Is the get-available-resources skill free to use?
The skill is published under the MIT licence. Check the licence file in the downloaded ZIP for the full terms.
How do I install the get-available-resources skill?
Download the ZIP from our page and unzip it into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder. In the Claude apps, upload the ZIP under Settings → Capabilities → Skills.
What does the get-available-resources skill require?
It requires Python 3.11 or newer on Linux, macOS or Windows. Psutil and accelerator management tools such as nvidia-smi are optional. It runs local scripts and does not use the network.
Does the skill benchmark my GPU or CPU?
No. The skill explicitly does not run benchmarks or stress tests. Its numbers are conservative estimates, and GPU runtime compatibility is reported as not_tested, so you need to confirm your framework can use the device.
Will the skill leak my hostname or file paths?
The output is redacted: hostnames, absolute paths, cgroup paths, job IDs and device UUIDs are not reported. The detector still reads system information on your machine, so avoid it where that is not acceptable.
How is this different from just checking free memory or nproc?
A plain memory or CPU count shows host inventory. This skill also checks affinity, cgroup and container quotas, Slurm allocation and accelerator visibility, and it reports unknown values as unknown rather than unlimited.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use this skill if you are about to run parallel or memory-heavy local jobs on a laptop, shared server, container or Slurm allocation and want a conservative, redacted picture of what you can really use. Pick something else if you need hardware benchmarks, stress tests or proof that a GPU works with your framework, since this skill deliberately does none of those.
Download the skill