variant-analysis
Skill by ratnesh-maurya
Finds similar vulnerabilities and bugs across a codebase after an initial issue is found. Built for security researchers and auditors who hunt bug variants or write CodeQL and Semgrep queries.
Install variant-analysis
Built from the published package, never by AI.
git clone --depth 1 https://github.com/ratnesh-maurya/cursor-claude-personas /tmp/cursor-claude-personas && mkdir -p ~/.claude/skills && cp -r /tmp/cursor-claude-personas/ai-ml-engineer/.cursor/skills/variant-analysis ~/.claude/skills/variant-analysisRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/ratnesh-maurya/cursor-claude-personas /tmp/cursor-claude-personas && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/cursor-claude-personas/ai-ml-engineer/.cursor/skills/variant-analysis ~/.gemini/antigravity-cli/skills/variant-analysisAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
Variant Analysis is a skill that helps an AI assistant find similar vulnerabilities and bugs across a codebase once an initial pattern is known. It follows a five-step process: understand the root cause, start with an exact match, identify abstraction points, generalize one element at a time, and triage the results. The skill also lists common pitfalls, such as searching too narrowly, using overly specific patterns, and testing only normal cases.
The skill recommends ripgrep, Semgrep and CodeQL depending on the task, and includes query templates for Python, JavaScript, Java, Go and C++ plus a report template. It is aimed at security researchers and auditors who want to hunt bug variants or build CodeQL and Semgrep queries. The source says it is not meant for initial vulnerability discovery or general code review.
Written from the project's SKILL.md and checked against it.
What it can do
- Five-step variant processGuides the assistant from understanding the root cause to triaging matches.
- Iterative generalizationChanges one element of a search pattern at a time and tracks false positives.
- Tool selection guidanceSuggests ripgrep, Semgrep or CodeQL based on the scenario.
- CodeQL templatesProvides starter queries for Python, JavaScript, Java, Go and C++.
- Semgrep templatesProvides starter rules for Python, JavaScript, Java, Go and C++.
- Variant report templateProvides a markdown template for documenting variant findings.
- Pitfall checklistLists common mistakes such as narrow search scope and missing edge cases.
What you need
- ripgrep (rg) for quick surface searches
- Semgrep for simple pattern matching and taint tracking
- CodeQL for cross-function analysis
Try asking
- Use variant-analysis to find other places where this null check bypass appears.
- Help me build a Semgrep rule from this auth bug using the variant-analysis templates.
- Run the variant-analysis process on this bug and document results in the report template.
Good to know
- Not for initial vulnerability discovery; the source points to other audit skills for that.
- Not for general code review without a known pattern to search for.
- Stop generalizing when the false positive rate exceeds about 50%.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: ai-ml-engineer/.cursor/skills/variant-analysis/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to variant-analysis
All alternatives →Retrieves lab biomarker results and clinician notes from Function Health through its FHIR API. It is for people who want an AI assistant to review their own lab history and notes.
Gives an AI assistant a methodology for finding and exploiting privilege escalation weaknesses on Windows systems during authorized penetration tests. It is for security testers and defenders validating escalation paths.
Guides the assistant through designing, debugging and hardening GitHub Actions CI/CD workflows. It is aimed at teams that run production pipelines on GitHub.
Develops evidence-backed structural security hardening proposals from disclosures, findings, source code, or Codex Security scans. It is for teams that need systemic fixes and architectural tradeoffs.
Claude Security scans code for security issues with Claude Code. It covers whole repositories, branch or pull request diffs, single commits, and existing findings from SARIF files or earlier reports.
Turns vulnerability notes, disclosure reports, PoCs, source code, or Codex Security findings into self-contained vulnerability reports. Built for security researchers who need claims the evidence supports.
Compare with function_health, windows-privilege-escalation or github-actions-advanced
variant-analysis: common questions
What is variant analysis?
The skill describes variant analysis as finding similar vulnerabilities and bugs across a codebase after identifying an initial pattern. It is meant for hunting instances of a known root cause.
Does it include CodeQL and Semgrep queries?
Yes. The source includes ready-to-use CodeQL and Semgrep templates for Python, JavaScript, Java, Go and C++.
When should I not use this skill?
The source says not to use it for initial vulnerability discovery, general code review, writing fix recommendations, or understanding unfamiliar code.
How do I install variant-analysis?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is variant-analysis free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is variant-analysis safe to use?
It scores 55 of 100. Grades: maintenance D, licence A, quality C. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to variant-analysis?
Similar skills: function_health, windows-privilege-escalation, github-actions-advanced, propose-security-hardening.
