claude-vibe-squad: Skill for Claude Code

.agents/skills/semgrep-rule-author/SKILL.md

semgrep-rule-author is a skill for Claude Code, Codex from mtarcure/claude-vibe-squad. It costs 61 tokens per session (504 once invoked), scanned A, original, MIT.

A method for writing Semgrep rules that detect a confirmed coding defect in similar places. Semgrep is a tool that searches source code for patterns, including some data flows from unsafe inputs to risky operations.

In plain words
What is it for?
Use it after confirming a defect to create and test a detector for related code, include project-specific sanitizers, and measure how often the rule flags harmless code.
Why use it?
It turns one confirmed bug pattern into a repeatable repository-wide check. Testing against vulnerable and safe examples helps reduce false alarms and account for the project's own cleanup functions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is mtarcure/claude-vibe-squad's own configuration. It tells Claude Code and Codex how to work on claude-vibe-squad itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything claude-vibe-squad configures →

Reuse

Borrowing it

Nothing to install: this file belongs to mtarcure/claude-vibe-squad. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/mtarcure/claude-vibe-squad/main/.agents/skills/semgrep-rule-author/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for semgrep-rule-author

README.md
[![agentmods](https://agentmods.dev/badge/skills/mtarcure/claude-vibe-squad/semgrep-rule-author/github.svg)](https://agentmods.dev/skills/mtarcure/claude-vibe-squad/semgrep-rule-author)
Your own site
<a href="https://agentmods.dev/skills/mtarcure/claude-vibe-squad/semgrep-rule-author"><img src="https://agentmods.dev/badge/skills/mtarcure/claude-vibe-squad/semgrep-rule-author/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for semgrep-rule-author

Your own site · 80×15
<a href="https://agentmods.dev/skills/mtarcure/claude-vibe-squad/semgrep-rule-author"><img src="https://agentmods.dev/badge/skills/mtarcure/claude-vibe-squad/semgrep-rule-author.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 504 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00061 $0.00504
Opus 5 $0.00030 $0.00252
Sonnet 5 $0.00012 $0.00101
Haiku 4.5 $0.00006 $0.00050

Measured 11d ago against content hash e2ae1cde4269, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

semgrep-rule-author scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/semgrep-rule-author/SKILL.md · 29 lines

How it starts

The opening of the file, as written. The whole thing — 29 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Semgrep Rule Author

Turn a confirmed defect pattern into a Semgrep rule that finds its siblings without drowning the caller in false positives.

Steps

  1. Start from a confirmed instance, not from an idea. Write down the minimal vulnerable snippet and the minimal safe snippet that must not match.
  2. Decide the rule's shape: syntactic pattern for a fixed misuse, patterns with pattern-inside/pattern-not for context-dependent misuse, and mode: taint with pattern-sources/pattern-sinks when the defect is a data-flow problem rather than a shape.
  3. Prefer taint mode for injection classes. A syntactic rule for a data-flow bug produces the false-positive rate that gets rules disabled.
  4. Write pattern-not clauses for the sanitizers and safe wrappers this codebase actually uses; generic sanitizer lists miss project-specific ones.
  5. Use metavariables to bind the attacker-controlled value and metavariable-pattern to constrain it, so the rule expresses the condition rather than the syntax.
  6. Set severity and write a message that names the consequence and the fix, not the pattern. The message is what a reader acts on.
  7. Test against a corpus: the known instances must all match, the known-safe snippets must not, and a full run over the repo must have a triageable hit count.
  8. Measure and record the false-positive rate on that run. A rule shipped without a measured rate is unverified.
  9. Version the rule with the defect class it came from, so variant-analysis can reuse it and future reviewers know its provenance.

Acceptance

  • The rule was derived from a confirmed instance, with vulnerable and safe fixtures committed alongside.
  • Data-flow defects use taint mode rather than syntactic matching.
  • Project-specific sanitizers are excluded via pattern-not.
  • All known instances match, all safe fixtures do not, and the repo-wide false-positive rate is measured and recorded.
  • The message states consequence and fix, and the rule records its originating defect class.

Read the full file on GitHub · 29 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 29 lines · 61 tokens per session scan A e2ae1cde4269

Subscribe to this mod's changes

semgrep-rule-author is a skill published in the GitHub repository mtarcure/claude-vibe-squad (148 stars, last pushed 2d ago), licensed MIT. It adds 61 tokens to every session and 504 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.