Command Resource Profilerのロゴ

Command Resource Profiler

コミュニティ
DoiiarX
command-resource-profiler

Run a specific command under process-tree monitoring and report application-scoped CPU time, average CPU utilization, peak RSS/VMS memory, disk I/O, wall time, exit code, and optional interval samples. Use for command performance tests, runtime resource monitoring, before/after comparisons, regression checks, CLI benchmarks, or requests to measure one application's CPU and memory without mixing in unrelated system processes.

概要

公開者DoiiarX
リポジトリclaude-skills
スキル名command-resource-profiler
スター
23
フォーク
0
同梱ファイル
3
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 3個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    DoiiarXがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルCommand Resource ProfilerをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/DoiiarX/claude-skills/tree/main/command-resource-profiler
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/DoiiarX/claude-skills.git /tmp/claude-skills
mkdir -p .claude/skills
cp -r /tmp/claude-skills/command-resource-profiler .claude/skills/command-resource-profiler
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでCommand Resource Profilerを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にCommand Resource Profilerを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Command Resource Profilerは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Command Resource Profiler

Use the bundled profiler as the default measurement path:

powershell
python <skill-dir>/scripts/profile_command.py --output profile.json -- <command> <args...>

Resolve <skill-dir> to this skill's directory. Keep the target command after -- so its flags are not parsed as profiler flags.

Workflow

  1. Confirm the exact executable, arguments, working directory, and whether descendants belong to the workload.

  2. Check that Python and psutil are available. If psutil is missing, report python -m pip install psutil; do not install it without authorization.

  3. Choose a sampling interval. Use 0.2 seconds normally, 0.05-0.1 seconds for short workloads, and 0.5-1 second for long workloads.

  4. Run at least one warmup and three measured repetitions when comparing performance:

    powershell
    python <skill-dir>/scripts/profile_command.py --warmup 1 --repeat 3 --interval 0.1 --output profile.json --samples-output samples.csv -- <command> <args...>
  5. Report the command, environment, exit code, wall time, total CPU time, both CPU percentage conventions, peak concurrent RSS, I/O, interval, repetitions, and observed limitations.

  6. Compare runs only when inputs and relevant environment conditions are equivalent. Prefer medians for noisy wall-time comparisons and peak values for capacity planning.

Scope and safety

  • Measure only the root command and descendants discovered from that root; do not substitute whole-system CPU or memory.
  • Launch without a shell by default. Use --shell only when shell syntax such as pipelines, redirection, or built-ins is required.
  • Apply --timeout to unattended or potentially unbounded commands.
  • On timeout or interruption, terminate only the tracked process tree after verifying PID creation identity.
  • Preserve the target's stdout and stderr. Store the structured report with --output when clean machine-readable output matters.
  • Treat sampling as approximate for subprocesses that start and exit between samples. Read metrics.md before claiming kernel-level exactness or comparing results across platforms.

Useful options

text
--interval 0.1             Sampling interval in seconds
--warmup 1                 Unreported warmup executions
--repeat 5                 Measured executions
--timeout 120              Per-run timeout in seconds
--cwd PATH                 Target working directory
--output report.json       JSON summary and per-run metrics
--samples-output data.csv  Interval samples for graphing
--shell                    Execute through the platform shell
--label NAME               Label embedded in the report

Interpreting CPU

  • average_cpu_percent_core_scale: 100% means one logical CPU fully occupied and values may exceed 100%.
  • average_cpu_percent_machine: 100% means all logical CPUs fully occupied.
  • cpu_total_s: accumulated user plus system CPU time for observed members of the process tree.

For metric definitions and known sampling boundaries, read metrics.md.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Command Resource Profiler」では何ができますか?

Run a specific command under process-tree monitoring and report application-scoped CPU time, average CPU utilization, peak RSS/VMS memory, disk I/O, wall time, exit code, and optional interval samples. Use for command performance tests, runtime resource monitoring, before/after comparisons, regression checks, CLI benchmarks, or requests to measure one application's CPU and memory without mixing in unrelated system processes.

TypingMindでCommand Resource Profilerを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Command Resource Profilerはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにCommand Resource Profilerをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/DoiiarX/claude-skills/tree/main/command-resource-profilerを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Command Resource Profilerを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

Command Resource Profilerは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもCommand Resource Profilerを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Command Resource Profiler」は無料ですか?

DoiiarXがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇