Agent skill · research science · sickn33
logic-explain
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).
Why this skill is useful
Provides detailed interprocedural execution traces and name resolution that the AI wouldn't reliably generate on its own.
What it needs
About 2k tokens when loaded. Last updated 2026-08-07. 44,571 stars on the source repository.
What this skill does
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: 1. Read ../shared/common.md only for language, report header variants, scope routing, and loading budget. 2. Read only the relevant step in logic-explain-guide.md as you reach it. 3. Load ../shared/semiformal-guide.md, ../shared/semiformal-checklist.md, and ../shared/report-template.md on 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. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills sickn33/logic-explain--62d6ab