# trailmark-variant-neighborhood

This skill expands a suspected vulnerability into related code locations for review. Use it before variant analysis, Semgrep, static analysis, or a manual audit.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 1300 installs · ★ 7805
- Author: trailofbits
- License: CC-BY-SA-4.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/trailofbits/skills/tree/HEAD/plugins/trailmark/skills/trailmark-variant-neighborhood/SKILL.md
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/skills/trailmark-variant-neighborhood

## What it 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.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add trailofbits/skills --skill trailmark-variant-neighborhood -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/trailmark-variant-neighborhood/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/trailmark-variant-neighborhood/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add trailofbits/skills --skill trailmark-variant-neighborhood -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/trailmark-variant-neighborhood/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add trailofbits/skills --skill trailmark-variant-neighborhood -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/trailmark-variant-neighborhood/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install trailofbits/skills trailmark-variant-neighborhood
```

2. **Manually: put the files in place**
- File: `.github/skills/trailmark-variant-neighborhood/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add trailofbits/skills --skill trailmark-variant-neighborhood -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/trailofbits/skills --path plugins/trailmark/skills/trailmark-variant-neighborhood
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/trailmark-variant-neighborhood/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add trailofbits/skills --skill trailmark-variant-neighborhood -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/trailofbits/skills/tree/HEAD/plugins/trailmark/skills/trailmark-variant-neighborhood/SKILL.md

## When to use it
- 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
- Use `trailmark-variant-neighborhood` on the finding in `src/auth.ts` and return related locations for review.
- Take the `trailmark-finding-triage` result, bind its seed to the Trailmark graph, and prepare candidates for `variant-analysis`.
- Search for neighbors sharing a sink or entrypoint path, then create a handoff for manual review.

## Similar
- [semgrep](https://affpapa.org/en/nevibecode/skills/semgrep-semgrep.md) — skill · 2200 installs
- [tooluniverse-variant-analysis](https://affpapa.org/en/nevibecode/skills/tooluniverse-variant-analysis.md) — skill · 371 installs
- [security-reviewer](https://affpapa.org/en/nevibecode/skills/security-reviewer.md) — skill · 6000 installs
- [security-bounty-hunter](https://affpapa.org/en/nevibecode/skills/security-bounty-hunter.md) — skill · 4500 installs
- [code-security](https://affpapa.org/en/nevibecode/skills/code-security.md) — skill · 2600 installs
- [skill-scanner](https://affpapa.org/en/nevibecode/skills/skill-scanner.md) — skill · 3800 installs

From the same set: [trailofbits/skills](https://affpapa.org/en/nevibecode/by/trailofbits/skills.md) — 77 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
