/dstack-security:function-audit-context-analyzerfrom DStack Security
Builds factual audit-context records for functions: structure, invariants, and assumptions with line citations. Prepares code for later vulnerability hunting.
Ships in DStack Security. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You build the factual record a later hunt will reason from: how the code is put together, what must always be true for it to work, and what it takes on faith. You never name vulnerabilities, suggest fixes, write exploits, or rate severity. Those belong to the hunting phase that runs after this one.
Two shapes, one method. Single function mode writes one prose record to a caller given path. Multi function mode writes one record per function plus an assembled dossier under audit-context/. Both follow the same core method below: read the code, walk every callee path, cite lines for every claim, and record what is unclear.
This skill writes only the caller specified analysis path (single function) or beneath audit-context/ (multi function). Rollback is deleting those files. No remote, credential, publish, deploy, or irreversible changes.
Single function mode:
Multi function mode:
Vulnerability names, fixes, proofs of concept, and severity ratings are neither inputs nor outputs.
Read the target function in full. Scope is structure, invariants, and assumptions. If a draft would use the words vulnerability, exploit, or severity, restate the observation as the structural fact it rests on.
Read every callee the function depends on and walk every path through each callee, not only the path that returns successfully. A precondition established on three paths out of four is an assumption, not an invariant, and the fourth path is the interesting one. Look for an output parameter left unwritten on an early return, a check that sits behind a conditional, and a loop that can exit before it validates.
When a callee source is unavailable, treat it as a black box. Record what is sent to it, what is assumed about it, and the outcomes not excluded: failure, a hostile return value, an unexpected state change, reentry into the caller before its own writes land.
For every assumption, name the line that establishes it. When nothing establishes it, write "nothing found". That is a finding, not a failure.
Cite a line for every structural claim. If no line can be cited, do not assert the claim; record it in open questions as "unclear; need to inspect X". Never infer behavior from a name. When new evidence contradicts something written earlier, correct it in place and say what changed. Cut hedge words: "probably", "seems to", and "should be" each resolve to either a cited claim or an open question.
When two records disagree, quote both instead of reconciling them. Record the disagreement as a fact about the code, not a flaw in the analysis.
Adapt orientation to the target domain using references/domain-adaptations.md (smart contract, C/C++, decompiled binary, and web service mappings). Record which adaptation was applied.
Write the prose analysis to the given path in this fixed format, one document per function, sections in order separated by ---:
## functionName in path/to/file.ext (L40-L88)Cite lines as L45 or L98-L102. Spend words where the code earns them: branches, external calls, and state mutations earn analysis; a three line block that copies a value earns three lines. Leave a section out only when it is genuinely empty, and say so ("No external calls.") so "none" is distinguishable from "never checked". A short record whose claims each cite a line is worth more than a long one padded to fill a template.
Then return the compact record: a short index into the prose, not a summary of it. It holds the invariants, the assumptions and what establishes each, the callees and what the caller depends on them for, and the open questions. It exists so the orchestrator never has to load the prose.
Failure handling: if the function is not found or the line range is wrong, stop, write no file, and report the mismatch and what was searched. The prose file is written only when every section is complete; if it cannot be, report what is missing as open questions inside the file, or write nothing when the function itself is wrong. Finishing with open questions written down is a complete analysis. Finishing with questions never written down is not.
audit-context/ and audit-context/functions/. Write nowhere else; edit, move, or delete no source. If the target is not found or unreadable, stop, report the path and the error, and write no dossier.audit-context/functions/<name>.md before starting the next. Dispatch each pass to a subagent to isolate its context; do not hold every function detail in a single context, only compact records return to the orchestrator. Each record states what must always be true (with the source line), what the function takes on faith (with whatever establishes it), which functions it calls and what it needs from each, and anything still unclear.audit-context/DOSSIER.md from the per function records: entry points; actors and who can reach what; persistent state; cross function invariants (rules spanning several functions); unenforced assumptions marked nothing found; disagreements with both sides quoted; coverage (which functions were analyzed and which paths were followed); and open questions carried forward.Single function mode: the prose analysis at the given path (the deliverable) and the compact record returned to the caller (an index into it). Multi function mode: audit-context/DOSSIER.md plus one file per analyzed function under audit-context/functions/.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
audit-context, code-analysis, invariants, assumptions, security-audit
npx claudepluginhub gosuda/dstack-skills --plugin dstack-security16 skills in this plugin
/chain-vulnerability-scannerUse when an Algorand, Cairo, Cosmos SDK, Solana, Substrate, or TON codebase needs vulnerability scanning with reachability-backed findings. Not for non-chain review: use security-review./codeql-security-analysisUse when building or reusing a CodeQL database, running CodeQL security analysis, or modeling project-specific sources and sinks. Not for manual vulnerability review: use security-review (mode: confirmed)./c-security-reviewUse when the user requests a userspace C or C++ security review with a threat model and severity filter and wants validated findings. Not for kernel or bare-metal code.Other plugins' skills for the same job