To Callgraphのロゴ

To Callgraph

コミュニティ
elianiva
to-callgraph

Trace a code path end-to-end and render it as an annotated ASCII callgraph with a concurrency/serialization analysis.

概要

公開者elianiva
リポジトリdotfiles
スキル名to-callgraph
スター
204
フォーク
9
同梱ファイル
指示のみ
リンク
  • Markdown形式の指示

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

  • どのLLMでも利用可能

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

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

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

インストール

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

1

TypingMindにインストール

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

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

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

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

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

TypingMindで使用

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

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

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

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

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

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

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

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

スキルの指示

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

To-Callgraph

Trace a flow through the codebase end-to-end and hand back a callgraph: an ASCII diagram of every hop, annotated with where work runs concurrently and where it waits. When the user asks about a path — a feature, a flow, a worry like "can we parallelize this?" — the answer starts with the trace.

1. Scope the trace

Pin the entry (the event/message/command that starts the flow) and the exit (what completes it — a rendered frame, a blob URL, a persisted row). Find every path that carries the feature's name: a feature often has two (a CPU preview path and a GPU path, a fast path and a full path), and each gets traced.

Completion criterion: you can state, in one sentence, what enters and what exits each path.

2. Walk the hops

Each hop is one box of the callgraph: event → message → update → command → service → worker/GPU → message → update → model → view. Read the file that handles each hop before drawing the edge — a hop you haven't read is an edge you can't draw.

  • Recon the area first: fffind/grep for the feature's names, read what surfaces, then read the project's ADRs/docs for the decisions that shaped the path.
  • Before trusting an edge, grep for every caller of the exported symbols it crosses — missed callers are bugs.
  • Note the runtime's execution model: are commands forked (concurrent) or queued? That determines which hops are already parallel.

Completion criterion: every edge names a file you actually read; every exported symbol you cite has had its callers grepped.

3. Render the callgraph

ASCII, top-down, one line per hop, file path on the edge, in the house style:

<entry>
  └─ <dispatch> → <message>
       └─ <command.execute>        (forked — concurrent)
            ├─ <service>           ✓ memoized / parallel
            └─ <worker>            ⚠ serializes here — one thread, N requests

Mark every async boundary (postMessage/Deferred, Effect.runFork, GPU submission). Mark every hop that already runs concurrently (✓) and every hop where work queues up (⚠). If a hop spans multiple files, say so.

Completion criterion: a reader can point at any box, ask "where's the code?", and get a file:line.

4. Read the seams

For every ⚠, name the concrete cost and the fix shape: a pool (N workers/threads instead of 1), a cache (memoize a value recomputed per iteration), a move (off the main thread), a coalesce (dedupe identical requests). Also hunt wasted work: the same op repeated per item that could run once (a downscale per LUT instead of per photo). Every bottleneck gets a named fix direction — a complaint without a fix shape is an unfinished seam.

Completion criterion: every ⚠ and every repeated-op finding carries a named fix shape.

5. Deliver

Callgraph first, then: what's already parallel, where it serializes, options ranked by cost/benefit, and the recommended cut. When the user asks for a plan, add before/after callgraphs plus a file-by-file change list and how to verify (tests, typecheck, lint, manual smoke).

Completion criterion: the user can approve or reject the recommendation from your writeup alone.

よくある質問

AIスキル「To Callgraph」では何ができますか?

Trace a code path end-to-end and render it as an annotated ASCII callgraph with a concurrency/serialization analysis.

TypingMindでTo Callgraphを使うメリットは何ですか?

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

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

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/elianiva/dotfiles/tree/master/agents/skills/to-callgraphを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

To Callgraphを使えるAIモデルはどれですか?

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

To Callgraphで使えるAIモデルの数に制限はありますか?

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

AIスキル「To Callgraph」は無料ですか?

elianivaがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

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

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

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

すべて見る

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

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