logic-explain
できること
特定の入力でコードを実行したときに、情報がどのように変化するかを、コードの仕組みとともに 1 ステップずつ説明するツールです。
使う場面
- ✓コードが予想外の結果を出す理由がわからないとき。
- ✓コードの中で情報がどのように変化するかを見たいとき。
- ✓コードの実行について、詳しい解説がほしいとき。
スキルのリンク
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/logic-explain/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“次のコードを、この入力で説明してください:[コード] 入力:[入力]”
毎週5つの新しいスキル。1分で読めます。
仕組み
ツールは、コードと与えられた入力を分析します。そして、実行の各ステップを詳しく説明し、変数の値の変化や、コードがどのように別の部分へ移動するかを解説します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Logic-Lens — Execution Explain
When to Use
Use this skill when you need explain what a specific piece of code actually does for a given input by producing a step-by-step execution trace (interprocedural, with name resolution and type transitions). Trigger when the user is confused about behavior or asks why code produces X instead of Y — "walk me through...
Setup
Use lazy loading per ../_shared/common.md §13:
- Read
../_shared/common.mdonly for language, report header variants, scope routing, and loading budget. - Read only the relevant step in
logic-explain-guide.mdas you reach it. - Load
../_shared/semiformal-guide.md,../_shared/semiformal-checklist.md, and../_shared/report-template.mdon demand when the current step needs them.
Note: logic-risks.md is intentionally skipped — logic-explain does not produce L-code findings, and Remedy is intentionally out of scope for this mode. If the trace reveals a bug, stop and recommend logic-review or logic-locate. When handing off, do not discard work already done — present the premises established and trace steps completed under a "Partial trace context (carry into next skill):" heading so the user can pass them directly to the follow-on skill.
Process
Step 0. Language + scope routing. Detect language per common.md §1. Confirm a single function + a single input scenario. If the user wants bug-finding without a scenario, hand off to logic-review.
Step 1. Entry point and scenario (guide Step 1) — name the function, the input scenario, and what the user is trying to understand.
Step 2. Build premises (guide Step 2) — resolve every non-obvious name, state the types of key variables at entry, note global/module state accessed.
Step 3. Produce step-by-step trace (guide Step 3) — numbered, interprocedural, active voice; cross function boundaries whenever relevant to the user's scenario. Keep the trace scenario-bound; do not branch into alternative paths unless they explain the user's confusion.
Step 4. Highlight non-obvious behavior (guide Step 4) — name resolutions, implicit coercions, hidden side effects; the "gotchas" the casual reader would miss.
Step 5. Summarize actual vs. assumed (guide Step 5) — one sentence each; this is the core value for the user.
Mode line in report: Execution Explain (Chinese: 执行解释).
Note: Execution Explain is descriptive, not evaluative. Omit the Logic Score / Fault Confidence / Verdict line from the report header.
Example
User request:
Explain what a specific piece of code actually does for a given input by producing a step-by-step execution trace (interprocedural, with name resolution and type transitions).
Limitations
- Use this skill only when the task clearly matches its upstream source and local project context.
- Verify commands, generated code, dependencies, credentials, and external service behavior before applying changes.
- Do not treat examples as a substitute for environment-specific tests, security review, or user approval for destructive or costly actions.
よくある質問
「実行トレース」とは何ですか?
コードが行った処理をすべて記録した作業ログのようなもので、各時点での情報の状態を示します。
「名前解決と型の遷移」とはどういう意味ですか?
各名前(変数や関数)が何を指しているのか、そして実行中にデータの型(数値、文字列など)がどのように変わるのかを説明することです。
このツールはコードのエラーを修正しますか?
いいえ、コードの仕組みを説明するだけです。エラーが見つかった場合は、修正に使える別のツールを提案することがあります。
詳細
作者による元の説明
Explain what a specific piece of code actually does for a given input by producing a step-by-step execution trace (interprocedural, with name resolution and type transitions).
人気
- GitHubのスター
- 48k
- ランキング
- #5097
- ライセンス
- MIT
- 更新日
- 2026/10/15
コメント
- …
このリポジトリの他のスキル
00-andruia-consultant
48kエージェントがAIプロジェクトの立ち上げや改善を支援します。コードを分析し、ツールを提案し、スペイン語で行動計画を作成します。
007
48kエージェントがセキュリティ監査と脅威モデリングを行えるようにします。攻撃や脆弱性からプロジェクトを守るのに役立ちます。
10-andruia-skill-smith
48kエージェントがAIツールの作成や改善を支援します。ツールの動作を定義し、ドキュメントを書き、構造を検証します。
20-andruia-niche-intelligence
48kエージェントが特定の業界に関する要約を作成できるようにします。信頼できる情報源を使って、プロジェクトの背景、ルール、利用パターン、リスクを把握するのに役立ちます。
似ているスキル
diffs
394k編集内容の実際の共有可能な差分を、手書きの要約ではなく、ビューアーのリンクや画像ファイルとして作成するようエージェントを支援します。
coding-agent
394kCodex、Claude Code、OpenCodeに大きめのコーディング作業をバックグラウンドのワーカーとして渡し、その進捗を確認するようエージェントを支援します。
gh-issues
394kGitHubのイシューを探し、取り組むものを選び、修正を含むプルリクエストを開くようエージェントを支援します。レビューコメントへの対応も含みます。