trailmark-variant-neighborhood — Claude Code skill
This skill expands a suspected vulnerability into related code locations for review. Use it before variant analysis, Semgrep, static analysis, or a manual audit.
npx skills add trailofbits/skills --skill trailmark-variant-neighborhood -a claude-codeWhat trailmark-variant-neighborhood does
The skill accepts finding text, a file and line, a function name, or output from trailmark-finding-triage. It binds that seed to a Trailmark graph node, then explores nearby relationships such as shared callers and callees, sensitive sinks, entrypoint paths, interface implementations, overrides, type references, and structurally similar code.
Candidates are ranked using reachability, boundary proximity, shared sinks, interface links, and related signals. Tests, mocks, generated files, and vendor code are pushed down the list. The result is a handoff packet with candidate locations, inclusion reasons, exclusions, limits, and a suggested next step for variant-analysis, semgrep-rule-creator, static analysis, or manual review.
This is a review-target generator, not a vulnerability verdict. The workflow stops when the seed cannot bind to a graph node, the candidate set is too large, or Trailmark cannot analyze the target language. A seed limited to test, generated, or vendor code also affects whether the workflow can proceed.
What it helps with
- find related code after one vulnerability is spotted
- trace shared callers, callees, and sensitive sinks
- locate interface implementations and override siblings
- rank candidates reachable from an entrypoint
- prepare a handoff for variant analysis or Semgrep
Example prompts for the agent
- Use
trailmark-variant-neighborhoodon the finding insrc/auth.tsand return related locations for review. - Take the
trailmark-finding-triageresult, bind its seed to the Trailmark graph, and prepare candidates forvariant-analysis. - Search for neighbors sharing a sink or entrypoint path, then create a handoff for manual review.
How to install trailmark-variant-neighborhood
1Skills CLI (Vercel)
npx skills add trailofbits/skills --skill trailmark-variant-neighborhood -a claude-code2Manually: put the files in place
~/.claude/skills/trailmark-variant-neighborhood/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/trailmark-variant-neighborhood/
1Skills CLI (Vercel)
npx skills add trailofbits/skills --skill trailmark-variant-neighborhood -a codex2Manually: put the files in place
.agents/skills/trailmark-variant-neighborhood/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add trailofbits/skills --skill trailmark-variant-neighborhood -a cursor2Manually: put the files in place
.cursor/skills/trailmark-variant-neighborhood/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install trailofbits/skills trailmark-variant-neighborhood2Manually: put the files in place
.github/skills/trailmark-variant-neighborhood/SKILL.md1Skills CLI (Vercel)
npx skills add trailofbits/skills --skill trailmark-variant-neighborhood -a gemini-cli2Platform CLI
gemini skills install https://github.com/trailofbits/skills --path plugins/trailmark/skills/trailmark-variant-neighborhoodManually: put the files in place
.devin/skills/trailmark-variant-neighborhood/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add trailofbits/skills --skill trailmark-variant-neighborhood -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about trailmark-variant-neighborhood
How do I install trailmark-variant-neighborhood in Claude Code?
Run npx skills add trailofbits/skills --skill trailmark-variant-neighborhood -a claude-code, then run npx skills add trailofbits/skills --skill trailmark-variant-neighborhood -a claude-code again. The skill is placed at ~/.claude/skills/trailmark-variant-neighborhood/SKILL.md.
What does trailmark-variant-neighborhood do?
It expands a confirmed or suspected vulnerability into related Trailmark graph nodes for follow-up review. Its output contains candidates, not confirmed vulnerabilities.
What does the skill need before it can run?
The seed finding must bind to a Trailmark graph node. The workflow also stops when Trailmark cannot analyze the target language.