Claude Skill MartBrowse skillsQuick linesLearn by videoTerminal guideWhat is a Skill?
Back to list

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.

UtilitiesIntermediate33,0303,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.max quota, and Slurm per-task allocation.
  • Reports memory in distinct buckets: host total/available, cgroup hard memory.max, the softer memory.high throttle 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_tested so 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

  1. Pre-flight check: run python scripts/detect_resources.py and read cpu.effective.worker_ceiling plus the effective memory ceiling before launching a heavy local job.
  2. Parallel plan: plan_workload.py resource-snapshot.json --workload cpu --tasks 100 --memory-per-worker-mib 2048 returns suggested workers and threads_per_worker so you don't oversubscribe an allocation.
  3. Environment drift: after changing container limits, run snapshot_tools.py diff before.json after.json to 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)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Download 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.

  1. Confirm Python 3.11 or newer: python --version.
  2. Clone the repository: git clone https://github.com/K-Dense-AI/scientific-agent-skills.git
  3. Copy the skill into your Claude skills directory: mkdir -p ~/.claude/skills && cp -r scientific-agent-skills/skills/get-available-resources ~/.claude/skills/
  4. Verify the scripts/ and references/ subfolders came along — the instructions reference them directly.
  5. (Optional) For broader cross-platform coverage install psutil: uv pip install "psutil==7.2.2" or pip install psutil==7.2.2. The detector still works on the standard library alone.
  6. Restart Claude Code and ask something like "snapshot the resources actually available here before we run this job".
  7. To keep a file, pass an explicit name: python scripts/detect_resources.py --output resource-snapshot.json (stdout is the default).