スキル get-available-resources
🔍

get-available-resources

低リスク ⚙️ 外部コマンド⚡ スクリプトを含む📁 ファイルシステムへのアクセス

科学技術計算向けのシステムリソース検出

こちらからも入手できます: davila7

科学技術計算のタスクでは、最適な計算戦略を選ぶためにハードウェア情報が必要です。このスキルはCPUコア数、GPUの有無、メモリ、ディスク容量を自動検出し、並列処理とGPUアクセラレーションの推奨事項を生成します。

対応: Claude Codex Code(CC)
📊 69 十分
1

スキルZIPをダウンロード

2

Claudeでアップロード

設定 → 機能 → スキル → スキルをアップロードへ移動

3

オンにして利用開始

テストする

「get-available-resources」を使用しています。 Run get-available-resources to check my system for training a deep learning model.

期待される結果:

  • CPU: 8 logical cores (4 physical) on x86_64
  • Memory: 32 GB total, 24 GB available
  • Disk: 512 GB total, 180 GB free
  • GPU: NVIDIA RTX 4090 (24GB VRAM) with CUDA backend
  • Recommendation: Use PyTorch with CUDA for GPU acceleration
  • Recommendation: 6 parallel workers for data loading

「get-available-resources」を使用しています。 Check resources before processing this genomics dataset.

期待される結果:

  • CPU: 16 logical cores on arm64 (Apple M2 Max)
  • Memory: 64 GB unified, 45 GB available
  • GPU: Apple Silicon with Metal backend
  • Recommendation: Dataset fits in memory, pandas is suitable
  • Recommendation: Use PyTorch MPS backend for any ML tasks
  • Recommendation: 14 workers for parallel file processing

セキュリティ監査

低リスク
v5 • 1/17/2026

The skill is safe to publish. All 50 static findings are false positives. The skill performs legitimate system resource detection using subprocess calls to standard system utilities (nvidia-smi, rocm-smi, sysctl, system_profiler) for GPU/CPU detection. All subprocess commands use hardcoded arguments in list format, preventing shell injection. The __import__ usage is for importing the standard datetime module. Markdown backticks triggered false positives for shell execution. 'Weak cryptographic algorithm' findings are scanner errors on non-cryptographic code.

4
スキャンされたファイル
1,073
解析された行数
4
検出結果
5
総監査数
低リスクの問題 (1)
JSON file output to disk
Skill writes a JSON file to disk (.claude_resources.json) containing system resource information. This is expected behavior but users should be aware.
監査者: claude 監査履歴を表示 →

品質スコア

45
アーキテクチャ
100
保守性
87
コンテンツ
21
コミュニティ
88
セキュリティ
91
仕様準拠

作れるもの

大規模データセット処理の最適化

利用可能メモリを検出し、データセットがRAMに収まるか、DaskやZarrによるチャンク処理が必要かを判断します。

GPUアクセラレーションのバックエンド選択

利用可能なGPUバックエンド(CUDA、Metal、ROCm)を特定し、PyTorchやTensorFlowを正しく構成します。

並列ワーカーの設定

CPUコア数に基づいてjoblibまたはmultiprocessingのワークフローに最適なワーカー数を決定します。

これらのプロンプトを試す

基本的なリソース確認
Run get-available-resources to detect what hardware is available for this task.
メモリを考慮した読み込み
Check available memory with get-available-resources, then recommend whether to use pandas or Dask for this 20GB CSV file.
GPUバックエンドの選択
Run get-available-resources and tell me which PyTorch device to use based on detected GPU.
並列処理のセットアップ
Use get-available-resources to determine optimal n_jobs for this joblib Parallel grid search across 1000 parameter combinations.

ベストプラクティス

  • データ読み込みや並列化に関する設計判断を行う前に、プロジェクトの開始時点でリソース検出を実行します。
  • システム状況が大きく変わったときや主要な計算タスクの前にスキルを再実行します。
  • 生成された .claude_resources.json ファイルをプロジェクトディレクトリに保持し、ハードウェアを考慮した判断を記録します。

回避

  • 再確認せずに、検出されたリソースが長時間のワークフロー全体で一定だと仮定すること。
  • メモリ戦略の推奨を無視し、利用可能なRAMを超えるデータセットの読み込みを試みること。
  • 他のプロセスがCPUリソースを消費していることを考慮せずに、提案されたワーカー数を使用すること。

よくある質問

このスキルはどのOSをサポートしていますか?
macOS(Apple Silicon M1-M4を含む)、Linux(NVIDIAおよびAMD GPU)、Windows(NVIDIA GPU)。
必要な依存関係は何ですか?
Python psutil packageが必要です。GPU検出にはPATH上のnvidia-smi、rocm-smi、またはsystem_profilerが必要です。
出力ファイルはどこに保存されますか?
デフォルトでは、.claude_resources.jsonは現在の作業ディレクトリに作成されます。カスタムパスには-oフラグを使用します。
メモリ読み取りの精度はどれくらいですか?
メモリの読み取りは時点のスナップショットです。利用可能メモリはシステム活動により常に変化します。
GPU検出に失敗した場合はどうなりますか?
このスキルはGPUユーティリティの欠如を適切に処理し、GPUなしとしてCPUのみの推奨を報告します。
推奨の閾値を変更できますか?
はい。detect_resources.pyのgenerate_recommendations関数を編集して、閾値と戦略をカスタマイズできます。

開発者の詳細

ファイル構成