ワンクリックで
code-explanation
Explain existing code — its purpose, mechanics, context, and complexity — at a depth proportional to the target.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Explain existing code — its purpose, mechanics, context, and complexity — at a depth proportional to the target.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
AI-powered development workflow framework — contract-first specs, multi-agent SDLC, automated quality gates. Commands: create-spec, implement-story, verify-spec, release, security-audit, and more.
Route knowledge retrieval brain-first when a healthy GBrain index is detected — cite the canonical markdown path, keep writes markdown-first, and fall back to grep when a brain is absent or unhealthy.
Change code structure without changing behavior — one verified, independently revertable commit per concern under a continuously green baseline.
Map a data-flow feature's failure modes into Error & Rescue, Shadow Path, and edge-case tables, flagging unplanned handling explicitly.
Grow code test-first through the red → green → refactor cycle, one small unit of behavior at a time.
Write Conventional Commits messages — type, scope, summary, body, and footers — from a diff, matching the project's existing convention when one exists.
| name | code-explanation |
| description | Explain existing code — its purpose, mechanics, context, and complexity — at a depth proportional to the target. |
| disable-model-invocation | true |
| status | candidate |
| status_evidence | Extracted 2026-07-10 from the retired explain-code command; candidate until consumer transcripts prove reuse. |
Produce a clear, structured explanation of a piece of existing code — a function, class, file, or line range — that a reader can act on without opening the source themselves. The explanation is read-only: it describes what the code does and how, never proposing edits, tests, or rewrites. Its defining quality is that depth scales with the target: a ten-line utility earns three sentences, a multi-branch state machine earns a full walkthrough and a diagram.
This capability owns how to explain code well. The consumer owns what target to explain and why — a research workflow reaching for it to describe a module, an implementation flow using it to understand an existing pattern before changing it, or an interactive request where the user names a symbol.
If a concrete target is supplied (path, symbol name, or line range), locate it. If the name is ambiguous and matches several definitions, surface the candidates and let the reader choose rather than guessing. If no target is named, ask what to explain before reading anything.
Read the target and the immediate context that makes it legible — no more:
Do not read the whole codebase. Pull in only the context required to explain the target accurately; extra reading dilutes focus and burns budget.
Every explanation carries the same skeleton, but each section's depth tracks the target's complexity. Lead with purpose; end only with what earns its place.
Speak the codebase's own dialect — React terminology for a component, systems terminology for a systems routine — and do not over-explain language fundamentals unless asked. When intent is unclear, say so; when a construct looks unusual and the reason is not evident, flag the uncertainty rather than inventing a rationale. Keep the output proportional: scale the words to the input, and stop when the reader has enough to act.
Simple utility — a three-sentence summary is the whole job:
Purpose: `slugify(title)` converts a display string into a URL-safe slug.
How It Works: lowercases the input, replaces runs of non-alphanumerics with a
single hyphen, and trims leading/trailing hyphens. Returns the empty string for
input that has no alphanumeric characters.
Multi-branch flow — prose plus a flowchart, because the branching is the point:
Purpose: `resolveConfig()` merges defaults, a config file, and env overrides
into one settings object, with env winning.
How It Works:
1. Load built-in defaults.
2. If a config file exists and parses, deep-merge it over the defaults; a parse
error is logged and the file is skipped (defaults survive).
3. Overlay any recognized environment variables last.
4. Validate the merged result; throw on a missing required key.
flowchart TD
A[defaults] --> B{config file?}
B -- parses --> C[deep-merge over defaults]
B -- missing/invalid --> D[keep defaults]
C --> E[overlay env vars]
D --> E
E --> F{valid?}
F -- yes --> G[return settings]
F -- no --> H[throw on missing key]
Uncertain intent — name the doubt instead of fabricating a reason:
The retry loop caps at five attempts with no backoff. The fixed cap is clear;
why backoff was omitted is not evident from the code and no comment explains it —
worth confirming with the author before relying on the current timing behavior.