get-available-resources
できること
このスキルは、コンピューターで利用できるハードウェアを検出し、推奨事項とともに概要のファイルを保存します。大きなデータやモデルの作業を計画する人向けです。
使う場面
- ✓メモリに収まらないかもしれないデータセットを解析しようとしているとき。
- ✓モデルを学習させたいが、GPUが使えるかを知りたいとき。
- ✓大量のファイルを処理するために、いくつの並列のワーカーを使うべきかを知りたいとき。
スキルのリンク
https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/scientific/get-available-resources/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“このマシンにどんな計算資源があるかを確認し、50GBのデータセットを並列で処理すべきか、分けて処理すべきかを教えてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、コンピューターのCPU、GPU、メモリ、ディスクの空き容量を調べます。結果を、Daskの利用などの提案とともにJSONファイルに書き出します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
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
よくある質問
どのハードウェアを確認しますか?
CPUのコア、NVIDIA、AMD、Apple Siliconを含むGPU、メモリ、ディスクの空き容量を確認します。
コンピューターの設定を変更しますか?
いいえ。スキルは資源を報告し、概要のファイルを書くように書かれており、設定を変更するものではないと説明されています。
どのツールを推奨しますか?
見つかった資源に応じて、joblib、multiprocessing、Daskなどの選択肢を挙げています。
詳細
作者による元の説明
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.
人気
- GitHubのスター
- 33k
- ランキング
- #8961
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
owasp-security
33kエージェントがWebアプリ、API、モバイル、コンテナ、AIエージェント向けの OWASP のセキュリティ指針を理解し、よくある弱点を見つけて修正案を出せるよう支援します。
agent-management
33kエージェントが、AI Maestro のコマンドラインを使って AI エージェントを作成、一覧表示、休止、再開、名前変更、削除できるよう支援します。各エージェントのライフサイクルを管理します。
agent-messaging
33kエージェントが、主に自分のマシン上で Agent Messaging Protocol を使い、AIエージェント同士の署名付きメッセージを送信、受信、返信できるよう支援します。
docs-search
33kエージェントが、自動生成されたコードのドキュメントから関数の署名、クラスの定義、コメントを検索できるよう支援します。コードを変更する前に、実際のAPIを確認できます。
似ているスキル
openclaw-update
394k既存のOpenClaw Gatewayを更新するようエージェントを支援します。インストール方法に合った更新方法を選び、セッションを動かし続けます。
diagnose-gateway
394k設定、チャンネル、ポートを確認して、OpenClaw Gatewayが失敗している理由を、何も変更せずに突き止めるようエージェントを支援します。
crabbox-apps
394k一時的なクラウドマシン上でアプリを開いて実行し、そのビューをチャットのサイドパネルに表示するようエージェントを支援します。