Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

variant-analysis — Claude Code skill: what it does, how to install

Finds related occurrences of an already identified defect across a repository. Use it after a vulnerability or logic issue turns up and similar code needs checking.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add trailofbits/skills --skill variant-analysis -a claude-code
Open on GitHub

What variant-analysis does

This skill starts from a known defect and looks for other code that shares its cause, including code outside the original module. It first forms a pattern that catches the reference case, then broadens one element at a time while reviewing every match.

Candidates are triaged with a severity assessment. The skill can turn a known issue into a CodeQL or Semgrep search, record failed patterns, and produce a CI rule aimed at preventing recurrence. Do not run it without a reference defect: initial vulnerability discovery is outside its job.

For a broad sweep, /variant-analysis:variants splits expansion directions across parallel subagents and repeats the search until it finds nothing new. The package includes CodeQL and Semgrep material for python, javascript, java, go, and cpp, plus a report template.

What it helps with

  • find code paths that share a known defect cause
  • build a CodeQL or Semgrep search from an identified issue
  • filter noisy matches while broadening a pattern
  • triage suspected variants with severity
  • add a CI rule to prevent a defect from returning

Example prompts for the agent

  • Find other occurrences of the defect we already identified in this project.
  • Create a Semgrep search from the known issue and review the matches.
  • `/variant-analysis:variants` sweep the project for variants of the known vulnerability.

How to install variant-analysis

1Skills CLI (Vercel)

npx skills add trailofbits/skills --skill variant-analysis -a claude-code

2Manually: put the files in place

~/.claude/skills/variant-analysis/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/variant-analysis/

From the same set35

The whole set →
semgrep trailofbits Runs a Semgrep static security audit on your codebase. It presents a plan for user confirmation and merges all findings into SARIF. Claude Code CX Codex Cursor +1 9,500installs differential-review trailofbits Reviews code changes for security issues using Git history and test coverage. Use it for commits, diffs, and pull requests that need a written review report. Claude Code CX Codex Cursor +1 8,800installs modern-python trailofbits Configures Python projects with a modern tooling stack: uv for dependency management, ruff for linting and formatting, ty for type checking. Use when starting new projects, writing scripts, or migrating from legacy tools. Claude Code CX Codex Cursor +1 8,700installs secure-workflow-guide trailofbits Guides smart contracts through Trail of Bits' 5-step security audit on check-in or before deployment. It runs static analysis, generates visual charts, and prepares fuzzing tests. Claude Code CX Codex Cursor +1 7,400installs sharp-edges trailofbits Audits API designs and configuration schemas for developer footguns. Flags dangerous defaults and fragile interfaces where the easiest path causes security vulnerabilities. Claude Code CX Codex Cursor +1 6,900installs agentic-actions-auditor trailofbits Inspects GitHub Actions workflows for prompt injection risks and insecure AI agent setups. Catches attacker inputs leaking into prompts via event contexts or environment variables. Claude Code CX Codex Cursor +1 6,700installs gh-cli trailofbits A skill that redirects GitHub requests from curl and fetch to authenticated gh CLI for repositories, pull requests, and issues. Use it for private repos and higher API limits. Claude Code CX Codex Cursor +1 6,600installs sarif-parsing trailofbits Processes existing SARIF reports from CodeQL, Semgrep, and other scanners. Use it to filter findings, remove duplicates, or prepare results for CI/CD. Claude Code CX Codex Cursor +1 5,900installs

Similar

gateway-workers cloudflare Skill for building, debugging, and reviewing Cloudflare Workers triggered by Forward actions in Gateway HTTP policies. Work with GatewayMiddleware, context types, and request continuation. Claude Code CX Codex Cursor +1 7,700installs agentic-jujutsu ruvnet Coordinates multiple AI agents working on code simultaneously without version control locks, learning from execution trajectories. Claude Code CX Codex Cursor +1 1,200installs graphql-architect https://github.com/Jeffallan Designs schema-first GraphQL APIs, Apollo Federation 2.5+ subgraphs, and DataLoader resolvers to eliminate N+1 queries. Claude Code CX Codex Cursor +1 4,000installs ads-server-side-tracking AgriciDaniel Audits server-side paid-media measurement: verifies event parameters between browser and server, checks deduplication, data hashing, and privacy compliance. Spots conversion loss and bugs in sGTM, Meta CAPI, TikTok Events API. Claude Code CX Codex Cursor +1 3,300installs V3 Security Overhaul ruvnet A skill that runs a security pass over claude-flow v3: three critical CVEs closed, and secure-by-default patterns wired into the code. Claude Code CX Codex Cursor +1 1,100installs git-guardrails-claude-code Matt Pocock This skill adds a Claude Code hook that stops risky Git commands before they run. Use it when an agent must not push or discard working-tree changes. Claude Code 499,069installs ponytail-review DietrichGebert ponytail-review reviews a change beyond the diff, checking connected code, bugs, risks, load, tests, speed, and unnecessary code. Use it for PRs and commits. Claude Code CX Codex Cursor +1 56,300installs ponytail-audit DietrichGebert It audits a repository and ranks bugs, risks, and redundant code in a one-shot report. Use it when you need a review without code changes. Claude Code CX Codex Cursor +1 44,800installs

Questions about variant-analysis

How do I install variant-analysis in Claude Code?

Run npx skills add trailofbits/skills --skill variant-analysis -a claude-code, then run npx skills add trailofbits/skills --skill variant-analysis -a claude-code again. After installation, use ~/.claude/skills/variant-analysis/SKILL.md.

What does variant-analysis do?

It searches a repository for defects that stem from the same cause as an issue already found. It moves from a reference match to broader patterns and helps assess the results.

When should I use variant-analysis?

Use it after finding a vulnerability, logic bug, or problematic coding pattern. It is not intended for an initial audit with no reference issue.

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor