
Semgrep rule author
Builds Semgrep detectors that find sibling instances of a confirmed defect pattern
Semgrep rule author 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 Semgrep rule author
This skill guides an agent through turning a bug that has already been confirmed into a reusable Semgrep rule. It starts from a minimal vulnerable snippet and a minimal safe snippet, then picks a rule shape: a syntactic pattern for a fixed misuse, pattern-inside and pattern-not for context-dependent cases, or taint mode with sources and sinks for data-flow defects such as injection.
The workflow stresses precision. It has the agent exclude sanitizers and safe wrappers the codebase actually uses, bind attacker-controlled values with metavariables, and write a message that explains the consequence and the fix. The rule is then tested against known vulnerable and safe fixtures and run over the whole repository, with the false-positive rate measured and recorded.
The skill expects a Semgrep installation and a confirmed example of the defect to work from. It also tags each rule with the defect class it came from so that the companion variant-analysis skill can reuse it.
When your agent uses it
Use after a defect pattern is confirmed and you need a reusable Semgrep detector for sibling instances: derive syntactic or taint rules from vulnerable and safe fixtures, encode project sanitizers, and measure repository-wide false positives. Not for choosing generic rulesets or scanning only a change.
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/semgrep-rule-author 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/semgrep-rule-author &&
cp -R "$tmp/.agents/skills/semgrep-rule-author" ~/.claude/skills/semgrep-rule-author &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/semgrep-rule-author inside it instead.
Copy the skill folder to ~/.agents/skills/semgrep-rule-author 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/semgrep-rule-author &&
cp -R "$tmp/.agents/skills/semgrep-rule-author" ~/.agents/skills/semgrep-rule-author &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/semgrep-rule-author inside it instead.
Copy the skill folder to ~/.cursor/skills/semgrep-rule-author 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/semgrep-rule-author &&
cp -R "$tmp/.agents/skills/semgrep-rule-author" ~/.cursor/skills/semgrep-rule-author &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/semgrep-rule-author inside it instead.
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/semgrep-rule-authorOr copy the folder to ~/.gemini/skills/semgrep-rule-author yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/semgrep-rule-author:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/semgrep-rule-author &&
cp -R "$tmp/.agents/skills/semgrep-rule-author" ~/.copilot/skills/semgrep-rule-author &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/semgrep-rule-author inside it instead.
Get the folder:
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad.gitThen copy claude-vibe-squad/.agents/skills/semgrep-rule-author into your agent's skills folder as semgrep-rule-author. Agents that support SKILL.md read one folder per skill.
What it does
- Rule shape selection
- Guides choosing between syntactic patterns, context-constrained patterns and taint mode based on the defect.
- Fixture-based testing
- Requires known vulnerable instances to match and known safe snippets to stay unflagged.
- Project sanitizer exclusion
- Adds pattern-not clauses for the sanitizers and safe wrappers used in the codebase.
- Repository false-positive measurement
- Runs the rule across the full repo and records the false-positive rate before shipping.
- Actionable rule messages
- Asks for messages that name the consequence of the defect and the recommended fix.
- Provenance versioning
- Tags rules with the defect class they originated from for reuse and review.
Good for
- Write a Semgrep rule that finds other places where a confirmed SQL injection pattern appears
- Build a taint-mode rule tracking user input to a dangerous sink in this codebase
- Reduce false positives in an existing Semgrep rule by excluding project sanitizers
- Measure how many hits a new Semgrep detector produces across the whole repository
Semgrep rule author FAQ
When should Semgrep rule author be used?
After a defect pattern has been confirmed and you need a reusable Semgrep detector for similar instances. It is not meant for choosing generic rulesets or for scanning only a change.
What inputs does Semgrep rule author need?
It needs a confirmed instance of the defect, plus a minimal vulnerable snippet and a minimal safe snippet to test against.
Does Semgrep rule author run any scripts?
No scripts are included in the skill folder. It is a single SKILL.md with instructions.
Does Semgrep rule author set any tool restrictions?
No allowed tools are set in the skill's frontmatter.
How do I install Semgrep rule author in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/semgrep-rule-author to use it in all your projects, or to .claude/skills/semgrep-rule-author in one project.
Does Semgrep rule author 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 Semgrep rule author?
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 Semgrep rule author?
The closest alternatives to Semgrep rule author are Semgrep rule creator, Diff aware semgrep scan, Semgrep rule variant creator, Variant analysis and Detection as code.
Where this comes from
- Description: from the skill's own SKILL.md.
More from mtarcure/claude-vibe-squad

Writes alt text, timed captions and transcripts for images, footage and audio
- Open source
- 227 GitHub stars
- Design and media

Guides building product agent system prompts with eval-backed boundaries and output
- Open source
- 227 GitHub stars
- AI models and LLM tooling

Guides authorized adversarial testing of autonomous LLM agents for injection and approval
- Open source
- 227 GitHub stars
- Security

Writes a typed game-event to audio-cue map that hands adaptive audio designs to engines
- Open source
- 227 GitHub stars
- Developer tools

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

Builds and proves multi-step exploit chains from weak bug-bounty findings
- Open source
- 227 GitHub stars
- Security


