/appsec-skills:code-walkthroughfrom appsec-skills
Generates a numbered walkthrough of a code flow with a Mermaid sequence diagram and matching VS Code CodeTour. Starts from a route, feature, or code location (e.g., a Semgrep finding sink) and traces the full path through the application.
Ships in appsec-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Produce, for each flow, one spec file that a bundled script turns into a CodeTour and a Mermaid diagram whose step numbers match one to one. The goal is understanding: a reader should follow the diagram, open the tour, and see where each step lives in the code, what goes in and what comes out.
GET /orders), a feature ("how users reset their password"), or a
code location (src/repositories/orderRepository.js:8, a function name, or findings in a scanner
report such as semgrep.json).docs/flows/ for specs and pages, .tours/ for tours.If the target is ambiguous, ask once. Otherwise proceed.
${CLAUDE_PLUGIN_ROOT}/skills/code-walkthrough/references/flow-spec.md: the spec format. Read it before writing a spec.${CLAUDE_PLUGIN_ROOT}/skills/code-walkthrough/scripts/walkthrough.mjs: builds and checks the outputs. Run it from the target repo root:
node ${CLAUDE_PLUGIN_ROOT}/skills/code-walkthrough/scripts/walkthrough.mjs build docs/flows (or check).pattern that matches
exactly once. Never guess a location.(derived from code, not run). Never present derived output as observed.sort is not validated",
"tableName is written into the SQL text"). Don't give exploitability verdicts or severities:
that's a triage task, not a walkthrough.route → controller.fn → service.fn → repo.fn), and say explicitly if a
location has no caller or several.Read every file on the path completely, not just the lines around the call: app setup (middleware order, body parsers, error handler), router, every middleware in the chain, controller, service, data access, config the flow reads, and the view/template if one renders the result. Note where each value comes from and every time a value is renamed between layers.
If the app can run locally (README, package.json scripts, docker-compose), start it and send
requests for the success case and for every error branch the flow has: no credentials, invalid
credentials, wrong role, invalid input, not found, and a server error if a normal input causes one.
Record the exact status line and body, plus any relevant server log line. If it can't run, derive
the examples from the code and label them as derived.
One docs/flows/<id>.flow.json per flow, in the format of ${CLAUDE_PLUGIN_ROOT}/skills/code-walkthrough/references/flow-spec.md.
Steps
kind: control), renames a value, or is the location
being asked about (kind: sink). Merge trivial pass-throughs into the next step.Layer: action, 2–6 words. Pattern: capture exactly the part the description
talks about (the argument, the condition, the interpolation), not the whole line.**What happens:** (1–3 sentences) · example (request,
value, SQL, response or error, in a fenced block) · **Security:** (optional, factual) ·
**Next →** <the call that invokes the next step> (step N).note: 1–3 short lines for the diagram: the key code, a concrete value, or "x is not checked".Lanes
Express) · Auth · Controller · Config (only if read) · Service ·
Store (data access) · external systems (Postgres, an API). Drop lanes a flow doesn't use; don't
reorder them.Diagram
requireAuth(req, res, next),
find(user.id, status, orderBy)); every return and response is dashed.break with the real response. Use alt only for a fork where both
branches continue (rows vs. database error).sort is renamed orderColumn).node ${CLAUDE_PLUGIN_ROOT}/skills/code-walkthrough/scripts/walkthrough.mjs build docs/flows
node ${CLAUDE_PLUGIN_ROOT}/skills/code-walkthrough/scripts/walkthrough.mjs check docs/flows
Fix every reported problem (pattern matched 0 or 2+ times, unknown lane, step missing from the
diagram) and rebuild until check passes. Then open each generated docs/flows/<id>.md and read the
step table: every code location must be the line the step talks about.
Tell the user:
docs/flows/*.flow.json, docs/flows/*.md, .tours/*.tour);vsls-contrib.codetour), open the tour,
step N = diagram step N; after code changes, re-run build (the command above) to move the highlights with the code,
or check in CI.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
6 skills in this plugin
/secure-code-reviewThreat-model-first security code review of a pull request, commit or diff. Builds the story of the change, lists entry points and dangerous sinks, picks the relevant threats from the AppSec Untangled wiki, checks each mitigation against the code, and writes Markdown and HTML reports with evidence. Use when asked for a security review of a PR, commit, branch or diff./security-experimentBuild a short, runnable notebook that shows why a security control makes a sink safe (or why its absence doesn't): one classic payload goes through the application's real steps, first without the control, then with it, printing the value after every step with the dangerous part highlighted, until the payload disappears (or reaches the sink). Works for sanitisers, encoders, validators, allowlists, parameterised queries and path checks. Use when asked why a finding is a false positive, to prove or demonstrate a control, to show what a sanitiser removes, or to "experiment" with a payload against the code.Other plugins' skills for the same job
/semgrep-triageTriage Semgrep (or other SAST) findings: for each finding, trace the flagged value back to its sources, check the controls on the path against the AppSec Untangled wiki, and decide true or false positive, severity (impact × likelihood) and confidence. False positives get a decision on whether to disable or suppress the rule. Writes one Markdown report with source-to-sink diagrams, CodeTours and manual reproduction steps for every finding. Supports a learn mode where the user decides first. Use when asked to triage, review, validate or prioritise scanner findings, or to check whether a finding is exploitable or a false positive.npx claudepluginhub mohamed-osama-aboelkheir/appsec-untangled-resources --plugin appsec-skills