Agent skill

System Resource Detector

by davila7 in davila7/claude-code-templates

Detects CPU, GPU, memory and disk resources before heavy scientific tasks and writes a JSON file with advice on parallelism, out-of-core work and GPU use.

MITAuto-check passedData & Analytics

Install System Resource Detector

skills CLI
$ npx skills add davila7/claude-code-templates --skill get-available-resources -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install davila7/claude-code-templates get-available-resources --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/davila7/claude-code-templates.git skills-src && mkdir -p .claude/skills && cp -r skills-src/cli-tool/components/skills/scientific/get-available-resources .claude/skills/get-available-resources && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
get-available-resources
GitHub stars
33k
Used in
10 other repos
Token cost
~2.4k tokens
SKILL.md length
735 words
Files
2 (incl. scripts)
Skills in repo
479
Repo updated
First seen
Licence
MIT

At a glance

Detects CPU, GPU, memory and disk resources before heavy scientific tasks and writes a JSON file with advice on parallelism, out-of-core work and GPU use.

  • Works in 3 steps: Run Resource Detection → Read and Apply Recommendations → Make Informed Decisions
  • Before loading a large dataset, to see whether it fits in memory
  • SKILL.md covers Overview, When to Use This Skill, How This Skill Works and Usage Instructions, plus 4 more sections
  • Runs Python scripts from its folder; calls uv and python

What it does

Run at the start of a computationally heavy task, this skill executes scripts/detect_resources.py to inventory the machine. It reports CPU cores and architecture, NVIDIA GPUs through nvidia-smi, AMD GPUs through rocm-smi, Apple Silicon with Metal and unified memory, total and available RAM and swap, free disk space in the working directory, and the OS and Python versions.

Results go into a .claude_resources.json file in the current directory, together with strategic recommendations. These guide choices such as parallel processing with joblib or multiprocessing, out-of-core computing with Dask or Zarr, GPU acceleration with PyTorch or JAX, or memory-efficient strategies. It is meant to run before analyses, model training, large dataset processing or large file operations, and at project setup to learn baseline capabilities.

When your agent uses it

  • Before loading a large dataset, to see whether it fits in memory
  • Before training a model, to find out whether a GPU backend is available
  • Choosing a worker count for joblib, multiprocessing or Dask jobs
  • Checking disk space before large file operations

Example prompts

  • “Help me analyze this 50GB genomics dataset, but first check what resources this machine has.”
  • “Check my GPUs and memory before I train a neural network on this data.”
  • “Work out how many parallel workers I should use to process the files in the data folder.”

Requirements

  • Python 3, to run `scripts/detect_resources.py`

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Run Resource Detection
  2. Read and Apply Recommendations
  3. Make Informed Decisions

What it can do on your machine

Read from SKILL.md and the folder at commit c0ca7da. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • uv
    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use uv, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

System Resource Detector loads about 2.4k tokens when it runs. Until then it costs about 156 tokens; SKILL.md has 735 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~156
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from davila7/claude-code-templates at commit c0ca7da, republished under its MIT licence (© davila7). 735 words, ~2,442 tokens.

Download SKILL.mdSave it as .claude/skills/get-available-resources/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
get-available-resources
description
This skill should be used at the start of any computationally intensive scientific task to detect and report available system resources (CPU cores, GPUs, memory, disk space). It creates a JSON file with resource information and strategic recommendations that inform computational approach decisions such as whether to use parallel processing (joblib, multiprocessing), out-of-core computing (Dask, Zarr), GPU acceleration (PyTorch, JAX), or memory-efficient strategies. Use this skill before running analyses, training models, processing large datasets, or any task where resource constraints matter.

Get Available Resources

Overview

Detect available computational resources and generate strategic recommendations for scientific computing tasks. This skill automatically identifies CPU capabilities, GPU availability (NVIDIA CUDA, AMD ROCm, Apple Silicon Metal), memory constraints, and disk space to help make informed decisions about computational approaches.

When to Use This Skill

Use this skill proactively before any computationally intensive task:

  • Before data analysis: Determine if datasets can be loaded into memory or require out-of-core processing
  • Before model training: Check if GPU acceleration is available and which backend to use
  • Before parallel processing: Identify optimal number of workers for joblib, multiprocessing, or Dask
  • Before large file operations: Verify sufficient disk space and appropriate storage strategies
  • At project initialization: Understand baseline capabilities for making architectural decisions

Example scenarios:

  • "Help me analyze this 50GB genomics dataset" → Use this skill first to determine if Dask/Zarr are needed
  • "Train a neural network on this data" → Use this skill to detect available GPUs and backends
  • "Process 10,000 files in parallel" → Use this skill to determine optimal worker count
  • "Run a computationally intensive simulation" → Use this skill to understand resource constraints

How This Skill Works

Resource Detection

The skill runs scripts/detect_resources.py to automatically detect:

  1. CPU Information

    • Physical and logical core counts
    • Processor architecture and model
    • CPU frequency information
  2. GPU Information

    • NVIDIA GPUs: Detects via nvidia-smi, reports VRAM, driver version, compute capability
    • AMD GPUs: Detects via rocm-smi
    • Apple Silicon: Detects M1/M2/M3/M4 chips with Metal support and unified memory
  3. Memory Information

    • Total and available RAM
    • Current memory usage percentage
    • Swap space availability
  4. Disk Space Information

    • Total and available disk space for working directory
    • Current usage percentage
  5. Operating System Information

    • OS type (macOS, Linux, Windows)
    • OS version and release
    • Python version
Output Format

The skill generates a .claude_resources.json file in the current working directory containing:

json
{
  "timestamp": "2025-10-23T10:30:00",
  "os": {
    "system": "Darwin",
    "release": "25.0.0",
    "machine": "arm64"
  },
  "cpu": {
    "physical_cores": 8,
    "logical_cores": 8,
    "architecture": "arm64"
  },
  "memory": {
    "total_gb": 16.0,
    "available_gb": 8.5,
    "percent_used": 46.9
  },
  "disk": {
    "total_gb": 500.0,
    "available_gb": 200.0,
    "percent_used": 60.0
  },
  "gpu": {
    "nvidia_gpus": [],
    "amd_gpus": [],
    "apple_silicon": {
      "name": "Apple M2",
      "type": "Apple Silicon",
      "backend": "Metal",
      "unified_memory": true
    },
    "total_gpus": 1,
    "available_backends": ["Metal"]
  },
  "recommendations": {
    "parallel_processing": {
      "strategy": "high_parallelism",
      "suggested_workers": 6,
      "libraries": ["joblib", "multiprocessing", "dask"]
    },
    "memory_strategy": {
      "strategy": "moderate_memory",
      "libraries": ["dask", "zarr"],
      "note": "Consider chunking for datasets > 2GB"
    },
    "gpu_acceleration": {
      "available": true,
      "backends": ["Metal"],
      "suggested_libraries": ["pytorch-mps", "tensorflow-metal", "jax-metal"]
    },
    "large_data_handling": {
      "strategy": "disk_abundant",
      "note": "Sufficient space for large intermediate files"
    }
  }
}
Strategic Recommendations

The skill generates context-aware recommendations:

Parallel Processing Recommendations:

  • High parallelism (8+ cores): Use Dask, joblib, or multiprocessing with workers = cores - 2
  • Moderate parallelism (4-7 cores): Use joblib or multiprocessing with workers = cores - 1
  • Sequential (< 4 cores): Prefer sequential processing to avoid overhead

Memory Strategy Recommendations:

  • Memory constrained (< 4GB available): Use Zarr, Dask, or H5py for out-of-core processing
  • Moderate memory (4-16GB available): Use Dask/Zarr for datasets > 2GB
  • Memory abundant (> 16GB available): Can load most datasets into memory directly

GPU Acceleration Recommendations:

  • NVIDIA GPUs detected: Use PyTorch, TensorFlow, JAX, CuPy, or RAPIDS
  • AMD GPUs detected: Use PyTorch-ROCm or TensorFlow-ROCm
  • Apple Silicon detected: Use PyTorch with MPS backend, TensorFlow-Metal, or JAX-Metal
  • No GPU detected: Use CPU-optimized libraries

Large Data Handling Recommendations:

  • Disk constrained (< 10GB): Use streaming or compression strategies
  • Moderate disk (10-100GB): Use Zarr, H5py, or Parquet formats
  • Disk abundant (> 100GB): Can create large intermediate files freely
Show full SKILL.md (291 more words)Show less

Usage Instructions

Step 1: Run Resource Detection

Execute the detection script at the start of any computationally intensive task:

bash
python scripts/detect_resources.py

Optional arguments:

  • -o, --output <path>: Specify custom output path (default: .claude_resources.json)
  • -v, --verbose: Print full resource information to stdout
Step 2: Read and Apply Recommendations

After running detection, read the generated .claude_resources.json file to inform computational decisions:

python
# Example: Use recommendations in code
import json

with open('.claude_resources.json', 'r') as f:
    resources = json.load(f)

# Check parallel processing strategy
if resources['recommendations']['parallel_processing']['strategy'] == 'high_parallelism':
    n_jobs = resources['recommendations']['parallel_processing']['suggested_workers']
    # Use joblib, Dask, or multiprocessing with n_jobs workers

# Check memory strategy
if resources['recommendations']['memory_strategy']['strategy'] == 'memory_constrained':
    # Use Dask, Zarr, or H5py for out-of-core processing
    import dask.array as da
    # Load data in chunks

# Check GPU availability
if resources['recommendations']['gpu_acceleration']['available']:
    backends = resources['recommendations']['gpu_acceleration']['backends']
    # Use appropriate GPU library based on available backend
Step 3: Make Informed Decisions

Use the resource information and recommendations to make strategic choices:

For data loading:

python
memory_available_gb = resources['memory']['available_gb']
dataset_size_gb = 10

if dataset_size_gb > memory_available_gb * 0.5:
    # Dataset is large relative to memory, use Dask
    import dask.dataframe as dd
    df = dd.read_csv('large_file.csv')
else:
    # Dataset fits in memory, use pandas
    import pandas as pd
    df = pd.read_csv('large_file.csv')

For parallel processing:

python
from joblib import Parallel, delayed

n_jobs = resources['recommendations']['parallel_processing'].get('suggested_workers', 1)

results = Parallel(n_jobs=n_jobs)(
    delayed(process_function)(item) for item in data
)

For GPU acceleration:

python
import torch

if 'CUDA' in resources['gpu']['available_backends']:
    device = torch.device('cuda')
elif 'Metal' in resources['gpu']['available_backends']:
    device = torch.device('mps')
else:
    device = torch.device('cpu')

model = model.to(device)

Dependencies

The detection script requires the following Python packages:

bash
uv pip install psutil

All other functionality uses Python standard library modules (json, os, platform, subprocess, sys, pathlib).

Platform Support

  • macOS: Full support including Apple Silicon (M1/M2/M3/M4) GPU detection
  • Linux: Full support including NVIDIA (nvidia-smi) and AMD (rocm-smi) GPU detection
  • Windows: Full support including NVIDIA GPU detection

Best Practices

  1. Run early: Execute resource detection at the start of projects or before major computational tasks
  2. Re-run periodically: System resources change over time (memory usage, disk space)
  3. Check before scaling: Verify resources before scaling up parallel workers or data sizes
  4. Document decisions: Keep the .claude_resources.json file in project directories to document resource-aware decisions
  5. Use with versioning: Different machines have different capabilities; resource files help maintain portability

Troubleshooting

GPU not detected:

  • Ensure GPU drivers are installed (nvidia-smi, rocm-smi, or system_profiler for Apple Silicon)
  • Check that GPU utilities are in system PATH
  • Verify GPU is not in use by other processes

Script execution fails:

  • Ensure psutil is installed: uv pip install psutil
  • Check Python version compatibility (Python 3.6+)
  • Verify script has execute permissions: chmod +x scripts/detect_resources.py

Inaccurate memory readings:

  • Memory readings are snapshots; actual available memory changes constantly
  • Close other applications before detection for accurate "available" memory
  • Consider running detection multiple times and averaging results

© davila7, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (scripts) in cli-tool/components/skills/scientific/get-available-resources of davila7/claude-code-templates.

  • SKILL.md
  • scripts/detect_resources.py

Open the folder on GitHubat commit c0ca7da

Used in 10 other repositories

We found 14 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 10 other GitHub owners. This page covers the copy in davila7/claude-code-templates, which our catalogue first saw on October 7, 2026.

Compare with similar skills

System Resource Detector next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

System Resource Detector compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
System Resource Detector this skilldavila7/claude-code-templates33k10 repos~2.4kAutomated safety check: PassMIT
OpenVLA-OFT Fine-TuningOrchestra-Research/AI-Research-SKILLs13k—~3.7kAutomated safety check: PassMIT
Graphsignalgraphsignal/graphsignal257—~6.3kAutomated safety check: PassApache-2.0
TensorRT-LLM InferenceOrchestra-Research/AI-Research-SKILLs13k4 repos~1.3kAutomated safety check: PassMIT
Magpie Kernel Evaluatoramd/skills408—~2.3kAutomated safety check: PassMIT
Hyperpod Version Checkerawslabs/agent-plugins916—~910Automated safety check: PassApache-2.0

Similar skills

  • OpenVLA-OFT Fine-Tuning

    Orchestra-Research/AI-Research-SKILLs

    Fine-tunes and evaluates OpenVLA-OFT and OFT+ robot policies with LoRA and continuous action heads on LIBERO simulation and ALOHA real-robot setups.

    13k GitHub stars~3.7k tokensUpdated 3 mo ago
    AI & LLM EngineeringAuto-check passed
  • Graphsignal

    graphsignal/graphsignal

    Profile AI inference workloads (vLLM, SGLang, TensorRT-LLM, PyTorch, any GPU application) with the Graphsignal profiler and read the results from its local /signals JSON endpoint.

    257 GitHub stars~6.3k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • TensorRT-LLM Inference

    Orchestra-Research/AI-Research-SKILLs

    Optimizes and serves LLMs on NVIDIA GPUs with TensorRT-LLM, covering quantization, in-flight batching, multi-GPU parallelism and the trtllm-serve command.

    13k GitHub starsUsed in 4 repos~1.3k tokens
    AI & LLM EngineeringAuto-check passed
  • Benchmarks LLM inference and drives GPU kernel optimization with Magpie.

    408 GitHub stars~2.3k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Hyperpod Version Checker

    awslabs/agent-plugins

    Official

    Check and compare software component versions on SageMaker HyperPod cluster nodes - NVIDIA drivers, CUDA toolkit, cuDNN, NCCL, EFA, AWS OFI NCCL, GDRCopy, MPI, Neuron SDK (Trainium/Inferentia)…

    916 GitHub stars~910 tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Optimize For GPU

    K-Dense-AI/scientific-agent-skills

    GPU-accelerates scientific Python on NVIDIA hardware and verifies that the result is correct and faster.

    48k GitHub starsUsed in 1 repo~3.4k tokens
    Data & AnalyticsAuto-check passed

More from davila7/claude-code-templates

All 479 skills in this repo
  • Perplexity Web Search

    davila7/claude-code-templates

    Runs web-grounded searches through Perplexity's Sonar models over OpenRouter for current events, recent literature and cited facts beyond the model's training cutoff.

    33k GitHub starsUsed in 11 repos~3.5k tokens
    Auto-check: notes
  • Neuropixels Data Analysis

    davila7/claude-code-templates

    Analyzes Neuropixels recordings from SpikeGLX or Open Ephys through preprocessing, drift correction, Kilosort4 spike sorting, quality metrics and curation.

    33k GitHub starsUsed in 9 repos~2.8k tokens
    Auto-check passed
  • Scientific Venue Templates

    davila7/claude-code-templates

    Supplies LaTeX templates and formatting rules for journals, conferences, posters, and grant proposals, then can check a draft against them.

    33k GitHub starsUsed in 9 repos~5.1k tokens
    Auto-check: notes
  • Brand Voice Content Creator

    davila7/claude-code-templates

    Analyzes a brand's existing writing to lock in a consistent voice, then builds SEO blog posts and platform-specific social content around it.

    33k GitHub starsUsed in 3 repos~1.9k tokens
    Auto-check passed
  • CAPA Officer

    davila7/claude-code-templates

    Guides corrective and preventive action (CAPA) work in a quality management system, from initiation and root cause analysis through effectiveness verification.

    33k GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed
  • Fda Consultant Specialist

    davila7/claude-code-templates

    Senior FDA consultant and specialist for medical device companies including HIPAA compliance and requirement management.

    33k GitHub starsUsed in 1 repo~2.7k tokens
    Auto-check passed

Questions about System Resource Detector

What does System Resource Detector do?

Detects CPU, GPU, memory and disk resources before heavy scientific tasks and writes a JSON file with advice on parallelism, out-of-core work and GPU use. py to inventory the machine. It reports CPU cores and architecture, NVIDIA GPUs through nvidia-smi, AMD GPUs through rocm-smi, Apple Silicon with Metal and unified memory, total and available RAM and swap, free disk space in the working directory, and the OS and Python versions.

When should I use System Resource Detector?

System Resource Detector fits situations like: before loading a large dataset, to see whether it fits in memory; before training a model, to find out whether a GPU backend is available; choosing a worker count for joblib, multiprocessing or Dask jobs; checking disk space before large file operations.

How do I install System Resource Detector in Claude Code?

Run `npx skills add davila7/claude-code-templates --skill get-available-resources -a claude-code`. Or copy the skill folder (cli-tool/components/skills/scientific/get-available-resources in davila7/claude-code-templates) into .claude/skills/get-available-resources in your project. Claude Code loads it when a task matches its description.

How do I install System Resource Detector in Codex?

Run `npx skills add davila7/claude-code-templates --skill get-available-resources -a codex`. Or copy the skill folder (cli-tool/components/skills/scientific/get-available-resources in davila7/claude-code-templates) into .agents/skills/get-available-resources in your project. Codex loads it when a task matches its description.

Can I use System Resource Detector in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add davila7/claude-code-templates --skill get-available-resources -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/get-available-resources, .gemini/skills/get-available-resources, .github/skills/get-available-resources and .opencode/skills/get-available-resources in your project.

What does System Resource Detector need to run?

Going by SKILL.md and its folder, System Resource Detector needs Python for the scripts in its folder and the command-line tools its instructions call (uv and python). Our summary lists: Python 3, to run `scripts/detect_resources.py`.

Does System Resource Detector access the network?

SKILL.md contains no URLs. Its commands use uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is System Resource Detector safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does System Resource Detector use?

System Resource Detector is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does System Resource Detector use?

About 2.4k tokens (SKILL.md is roughly 9.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to System Resource Detector?

Skills that share tags, products or a category with System Resource Detector: OpenVLA-OFT Fine-Tuning (Orchestra-Research/AI-Research-SKILLs, 13k stars), Graphsignal (graphsignal/graphsignal, 257 stars), TensorRT-LLM Inference (Orchestra-Research/AI-Research-SKILLs, 13k stars) and Magpie Kernel Evaluator (amd/skills, 408 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains System Resource Detector?

davila7 (a GitHub user) maintains it in davila7/claude-code-templates, which has 32,512 GitHub stars. The repository holds 479 skills in this directory. The repository was last updated on October 10, 2026.

Source: davila7/claude-code-templates on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.