get-available-resources
정보
이 스킬은 고부하 작업 시작 시 사용 가능한 CPU 코어, GPU, 메모리, 디스크 공간과 같은 시스템 리소스를 감지합니다. 병렬 처리, GPU 가속, 메모리 효율적 접근법 선택을 위한 전략적 권장 사항이 포함된 JSON 보고서를 출력합니다. 개발자는 분석, 모델 학습 또는 대규모 데이터 처리 전에 이를 사용하여 계산 관련 의사 결정에 참고해야 합니다.
빠른 설치
Claude Code
추천npx skills add K-Dense-AI/claude-scientific-skills -a claude-code/plugin add https://github.com/K-Dense-AI/claude-scientific-skillsgit clone https://github.com/K-Dense-AI/claude-scientific-skills.git ~/.claude/skills/get-available-resourcesClaude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요
문서
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:
-
CPU Information
- Physical and logical core counts
- Processor architecture and model
- CPU frequency information
-
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
-
Memory Information
- Total and available RAM
- Current memory usage percentage
- Swap space availability
-
Disk Space Information
- Total and available disk space for working directory
- Current usage percentage
-
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:
{
"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
Usage Instructions
Step 1: Run Resource Detection
Execute the detection script at the start of any computationally intensive task:
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:
# 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:
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:
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:
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:
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
- Run early: Execute resource detection at the start of projects or before major computational tasks
- Re-run periodically: System resources change over time (memory usage, disk space)
- Check before scaling: Verify resources before scaling up parallel workers or data sizes
- Document decisions: Keep the
.claude_resources.jsonfile in project directories to document resource-aware decisions - 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
GitHub 저장소
연관 스킬
content-collections
메타이 스킬은 콘텐츠 콜렉션(Content Collections)을 위한 프로덕션 검증된 설정을 제공합니다. 콘텐츠 콜렉션은 Markdown/MDX 파일을 Zod 검증이 포함된 타입 안전한 데이터 콜렉션으로 변환해주는 TypeScript 최우선 도구입니다. 블로그, 문서 사이트 또는 콘텐츠 중심의 Vite + React 애플리케이션을 구축할 때 타입 안전성과 자동 콘텐츠 검증을 보장하기 위해 사용하세요. Vite 플러그인 구성과 MDX 컴파일부터 배포 최적화 및 스키마 검증에 이르기까지 모든 것을 다룹니다.
polymarket
메타이 스킬은 개발자들이 Polymarket 예측 시장 플랫폼을 활용한 애플리케이션을 구축할 수 있도록 지원하며, 거래 및 시장 데이터를 위한 API 통합 기능을 포함합니다. 또한 WebSocket을 통한 실시간 데이터 스트리밍을 제공하여 실시간 거래와 시장 활동을 모니터링할 수 있습니다. 이를 통해 거래 전략을 구현하거나 실시간 시장 업데이트를 처리하는 도구를 생성하는 데 활용할 수 있습니다.
creating-opencode-plugins
메타이 스킬은 개발자들이 명령어, 파일, LSP 작업 등 25개 이상의 이벤트 유형에 연결되는 OpenCode 플러그인을 만들 수 있도록 돕습니다. JavaScript/TypeScript 모듈을 위한 플러그인 구조, 이벤트 API 명세, 구현 패턴을 제공합니다. OpenCode AI 어시스턴트의 라이프사이클을 사용자 정의 이벤트 기반 로직으로 가로채거나, 모니터링하거나, 확장해야 할 때 사용하세요.
sglang
메타SGLang은 RadixAttention 프리픽스 캐싱을 활용하여 JSON, 정규식, 에이전트 워크플로우를 위한 고속 구조화 생성에 특화된 고성능 LLM 서빙 프레임워크입니다. 특히 반복되는 프리픽스가 있는 작업에서 상당히 빠른 추론 속도를 제공하여 복잡한 구조화 출력 및 다중 턴 대화에 이상적입니다. 제약 디코딩이 필요하거나 광범위한 프리픽스 공유가 있는 애플리케이션을 구축할 때는 vLLM과 같은 대안보다 SGLang을 선택하십시오.
