get-available-resources

Detect CPU, GPU, memory, and disk resources and generate computing strategy recommendations.

Updated Oct 7, 2022
One-click install
npx skills add https://github.com/tamagusko/linux-cfg --skill get-available-resources-tamagusko
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: get-available-resources
Source: https://github.com/tamagusko/linux-cfg/tree/main/dotfiles/claude/skills/get-available-resources
Command: npx skills add https://github.com/tamagusko/linux-cfg --skill get-available-resources-tamagusko

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires psutil, and includes scripts (resource) components.

What problem does it solve? Before running computationally intensive scientific tasks, you often don't know whether the machine has enough cores, RAM, GPU acceleration, or disk space, leading to out-of-memory crashes or underutilized hardware. This Skill automatically profiles the system and produces actionable recommendations. ## Core Features & Use Cases - Hardware Detection: Identifies CPU cores, RAM, disk space, and GPUs across NVIDIA (CUDA), AMD (ROCm), and Apple Silicon (Metal) platforms. - Strategic Recommendations: Generates guidance on parallel processing worker counts, memory strategies (Dask, Zarr), GPU library selection (PyTorch, JAX), and large-data handling. - Structured JSON Output: Writes a .claude_resources.json file that code can read to make runtime decisions. - Use Case: Before training a PyTorch model or processing a 50GB dataset, run detection to learn whether to use CUDA, how many joblib workers to spawn, and whether out-of-core processing is needed. ## Quick Start Ask the assistant to detect available system resources and recommend a computing strategy before starting the analysis.

Frequently Asked Questions about get-available-resources

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect available GPUs in Python before training a model?

Run the detect_resources.py script, which queries nvidia-smi for NVIDIA GPUs, rocm-smi for AMD GPUs, and sysctl for Apple Silicon. The output JSON lists detected GPUs and available backends like CUDA, ROCm, or Metal.

How to decide between Dask and in-memory pandas for large datasets?

Compare your dataset size against the available memory reported in the resources JSON. If the dataset exceeds roughly half of available RAM, use Dask or Zarr for out-of-core processing; otherwise load directly with pandas.

Does GPU detection work on Apple Silicon Macs?

Yes, the script detects Apple M1 through M4 chips via sysctl and reports Metal as the available backend with unified memory. It suggests PyTorch MPS, TensorFlow-Metal, or JAX-Metal libraries.

Why is my NVIDIA GPU not detected by the script?

GPU detection requires nvidia-smi to be installed and available in the system PATH. Verify your NVIDIA drivers are installed and that the GPU is not exclusively occupied by another process.

What dependencies are required to run resource detection?

Only the psutil Python package is required, installable via pip or uv. All other functionality uses Python standard library modules like json, platform, and subprocess.