Skip to content
Skill

Variant analysis

Sweeps a codebase for siblings of a confirmed defect and proposes one root-cause fix

Variant analysis is an open-source agent skill for security. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
227
Last commit
License
MIT
Listing updated

Similar skills

About Variant analysis

This skill guides an agent through hunting for structurally related copies of a bug right after one instance has been confirmed. It asks the agent to state the root cause precisely, choose which variant axes to examine, and encode the pattern as a Semgrep rule or AST query rather than relying on plain text search. The search is meant to cover the current working tree, git history, copied files, vendored forks and other services or languages in the same repository.

Each candidate hit is run through reachability and impact checks, delegated to a companion findings-filter skill, so that only independently reachable variants count as findings. Confirmed variants are grouped under a single root cause, and the agent is directed toward one structural fix such as a safe wrapper or a type that prevents the unsafe state, with a detection rule added to the static-analysis config where a local patch is unavoidable.

The skill expects a confirmed defect to start from and a codebase to search, and it refers to Semgrep and the semgrep-rule-author skill for rule authoring. It asks the agent to report which axes were swept, which paths were excluded and what might still be missed.

When your agent uses it

Use immediately after one defect is confirmed to sweep for structurally related siblings across current code, history, copies, vendored forks, services, or languages; encode a repeatable Semgrep or AST query, gate each hit independently, and propose one root-cause fix.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 1 file (2 KB) on GitHub on 3 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

Copy the skill folder to ~/.claude/skills/variant-analysis to use it in all your projects:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/variant-analysis &&
cp -R "$tmp/.agents/skills/variant-analysis" ~/.claude/skills/variant-analysis &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/variant-analysis inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/variant-analysis to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/variant-analysis &&
cp -R "$tmp/.agents/skills/variant-analysis" ~/.agents/skills/variant-analysis &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/variant-analysis inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/variant-analysis to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/variant-analysis &&
cp -R "$tmp/.agents/skills/variant-analysis" ~/.cursor/skills/variant-analysis &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/variant-analysis inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/mtarcure/claude-vibe-squad.git --path .agents/skills/variant-analysis

Or copy the folder to ~/.gemini/skills/variant-analysis yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/variant-analysis:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/variant-analysis &&
cp -R "$tmp/.agents/skills/variant-analysis" ~/.copilot/skills/variant-analysis &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/variant-analysis inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad.git

Then copy claude-vibe-squad/.agents/skills/variant-analysis into your agent's skills folder as variant-analysis. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Root cause characterization
Defines the unsafe primitive, the missing check and the condition that makes the defect exploitable.
Structural pattern search
Encodes the defect as a Semgrep rule or AST query so reformatted code is still matched.
History and copy sweep
Searches git history, copied files, vendored forks and unmerged branches as well as the working tree.
Per-hit reachability gating
Checks each candidate independently for reachability and impact before treating it as a finding.
Single root-cause fix
Groups confirmed variants and proposes one structural fix instead of many local patches.
Coverage reporting
Requires the sweep's axes, exclusions and known gaps to be stated explicitly.

Good for

  • Find other places in the repo that repeat a bug I just confirmed
  • Write a Semgrep rule that catches this unsafe call pattern across the codebase
  • Check vendored copies and old git branches for the same defect
  • Propose one shared helper that fixes every instance of this missing check

Variant analysis FAQ

When does Variant analysis trigger?

The skill's description says to use it immediately after one defect is confirmed, to sweep for structurally related siblings.

What does Variant analysis need to run?

It refers to Semgrep and the semgrep-rule-author skill for writing rules, and to a findings-filter skill for reachability and impact gates. The skill itself is a single SKILL.md file with no bundled scripts.

Does Variant analysis change my code?

The instructions ask for a single structural fix and a detection rule added to the repo's static-analysis config, but the skill itself contains no scripts that modify files.

Which agent clients does Variant analysis support?

The repository's SKILL.md does not tie it to a specific client, so it follows the shared agent skills format.

How do I install Variant analysis in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/variant-analysis to use it in all your projects, or to .claude/skills/variant-analysis in one project.

Does Variant analysis run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Variant analysis?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Variant analysis?

The closest alternatives to Variant analysis are Variant analysis, Semgrep rule author, Diff aware semgrep scan, Find bugs and Principle fix root causes.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from mtarcure/claude-vibe-squad

  1. Writes alt text, timed captions and transcripts for images, footage and audio

    • Open source
    • 227 GitHub stars
    • Design and media
  2. Guides building product agent system prompts with eval-backed boundaries and output

    • Open source
    • 227 GitHub stars
    • AI models and LLM tooling
  3. Guides authorized adversarial testing of autonomous LLM agents for injection and approval

    • Open source
    • 227 GitHub stars
    • Security
  4. Writes a typed game-event to audio-cue map that hands adaptive audio designs to engines

    • Open source
    • 227 GitHub stars
    • Developer tools
  5. Generates missing README, CHANGELOG, LICENSE and agent-context files at project delivery

    • Open source
    • 227 GitHub stars
    • Developer tools
  6. Builds and proves multi-step exploit chains from weak bug-bounty findings

    • Open source
    • 227 GitHub stars
    • Security