/clanker-skills:ast-grep-callchain-auditfrom clanker-skills
Perform strict AST-based call-chain and code-quality audits with ast-grep. Use for code reviews, refactors, unfamiliar code, dead parameters, duplicate helpers, wrong call-site usage, stale functions, AI-generated slop, or multi-rail and multi-surface changes.
Ships in clanker-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.
Use this skill when a review must understand syntax, files, callers, callees, types, parameter flow, and repeated implementations. Keep the review strict, but label conclusions by evidence. An AST match is a candidate, not a defect.
semantic-blast-radius owns the canonical impact graph. When it is active,
this skill contributes structural edges and counterexamples to that graph; it
does not produce a competing full blast-radius inventory. call-chain-invariants
owns product-surface applicability. This skill may discover a candidate sibling
but does not decide that every sibling shares the invariant.
Prefer the non-deprecated binary:
AST_GREP_BIN="$(command -v ast-grep || command -v sg)"
"$AST_GREP_BIN" --version
Homebrew installs ast-grep. It also provides sg as a compatibility alias,
but sg currently prints a deprecation warning. Use ast-grep in new commands.
Run read-only searches first:
ast-grep run --pattern 'api.post($PATH, $BODY)' --lang ts frontend/src
ast-grep run --pattern '$OBJ.$METHOD($$$ARGS)' --lang ts backend/src
ast-grep run --pattern 'function $F($$$PARAMS) { $$$BODY }' --lang ts backend/src
Use --files-with-matches, --json=stream, or --inspect summary when a
machine-readable or coverage-oriented result helps. Use --rewrite only after
the user requests a change and the matches are manually validated.
AGENTS.md files and identify the language, build
system, type checker, generated-code boundaries, and framework conventions.ast-grep with rg because AST search can miss dynamic dispatch,
generated code, templates, reflection, and configuration references.call-chain-invariants for applicability classification when
product fan-out is in scope.Treat a parameter as a cleanup candidate only when all of these hold:
An underscore-prefixed parameter can be intentional. A zero-result call search does not prove that a function is dead. Check exports, re-exports, route tables, dependency injection, event names, reflection, templates, generated code, and dynamic imports before reporting it. Tell the user the exact evidence and give the smallest safe cleanup suggestion.
Use “possible AI slop” as an evidence-backed label, never as a style insult. Flag the signal and the proof together. Strong signals include:
any cast, swallowed error, or copy-pasted condition that
hides a missing contract check.For each suspected slop item, report: location, observed symbol and callers, expected symbol or invariant, actual behavior, why the mismatch matters, confidence, and a minimal cleanup. Do not call code slop merely because it is verbose, unfamiliar, or generated-looking.
Use these two tables while working. They share the symbol row label, so each fits a terminal. When a canonical impact graph exists, return only new, disputed, or corrected edges:
| Symbol or invariant | Definition | Callers | Callees/sinks |
|---|
| Symbol or invariant | Type/parameter result | Variants | Structural status |
|---|
Use only EDGE_VERIFIED, PATH_PARTIAL, or PATH_OPEN in the structural-status
column. Add BUG STATUS: UNADJUDICATED whenever the table contributes to a bug,
security, money, or decision-changing review. Structural verification proves
definitions, edges, types, and visible variants; it does not prove a violated
product contract, defect severity, or safe remediation. This skill must not
assign those conclusions.
State the search boundary and diagnostic gaps. Do not call a bounded AST sweep
exhaustive. Before saying “done,” include the searches used, the call-chain
edges checked, any dead parameter or slop candidates, and the tests or type
checks that support the structural claim. Send semantic candidates to the
owning adjudication workflow rather than promoting EDGE_VERIFIED to a verified
bug.
See references/patterns.md for reusable patterns and
the bundled scripts/structural-search.sh wrapper.
What SKILL.md sets; muted values are Claude Code's defaults
22 skills in this plugin
/adaptive-code-orchestratorAdaptively choose single-agent work, parallel reconnaissance, dependency waves, or independent review for reliable repository changes. Use for uncertain, cross-cutting, multi-file, long-running, or high-risk coding work where agent coordination may improve evidence or speed, or when the user asks how much agent coordination to use. When explicitly invoked for a small localized edit, stay single-agent and keep the workflow minimal.
/analyze-data-qualityAssess whether structured data, financial equations, state-machine accounting, query results, dashboards, or analytical evidence are trustworthy enough to use. Use to check data quality, reconcile conflicting sources or metric definitions, adjudicate financial-data findings, or decide whether evidence is safe to cite./better-englishOther plugins' skills for the same job
npx claudepluginhub canerkocak/clanker-skills --plugin clanker-skills