Skip to content
Skill

Diff aware semgrep scan

Runs Semgrep only on a code change, surfacing new security findings against a baseline

Diff aware semgrep scan 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 Diff aware semgrep scan

This skill guides an agent through a security review of one specific code change rather than a whole repository. It starts by fixing the base commit and listing the changed files along with their languages, then picks Semgrep rule packs according to the language and the kind of change, such as authentication, deserialization, templating, SQL, subprocess calls or cryptography.

The scan runs with a baseline commit so that pre-existing findings are suppressed and only newly introduced ones appear. When history matters, the agent can re-run without the baseline on the changed files, and it treats an old issue in a file the change now exposes to untrusted input as a new risk. Each hit is triaged for reachability from an untrusted source, attacker-controlled input and real consequence, and true positives are reported with a source-to-sink data path and a minimal fix.

The skill expects Semgrep and a git checkout with a base commit to compare against. It also asks the agent to list files skipped for parse errors or unsupported languages as coverage gaps, and to send recurring false positives to a separate rule-authoring skill rather than silencing them one by one.

When your agent uses it

Use when reviewing a particular code change against a large pre-existing Semgrep baseline: fix the base commit, choose rules by language and change shape, surface new or newly exposed source-to-sink paths, and report parse or coverage gaps. Route recurring false positives to semgrep-rule-author.

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/diff-aware-semgrep-scan 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/diff-aware-semgrep-scan &&
cp -R "$tmp/.agents/skills/diff-aware-semgrep-scan" ~/.claude/skills/diff-aware-semgrep-scan &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/diff-aware-semgrep-scan inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/diff-aware-semgrep-scan 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/diff-aware-semgrep-scan &&
cp -R "$tmp/.agents/skills/diff-aware-semgrep-scan" ~/.agents/skills/diff-aware-semgrep-scan &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/diff-aware-semgrep-scan inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/diff-aware-semgrep-scan 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/diff-aware-semgrep-scan &&
cp -R "$tmp/.agents/skills/diff-aware-semgrep-scan" ~/.cursor/skills/diff-aware-semgrep-scan &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/diff-aware-semgrep-scan 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/diff-aware-semgrep-scan

Or copy the folder to ~/.gemini/skills/diff-aware-semgrep-scan yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/diff-aware-semgrep-scan:

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

For one project only, put the folder in .github/skills/diff-aware-semgrep-scan 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/diff-aware-semgrep-scan into your agent's skills folder as diff-aware-semgrep-scan. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Base commit diffing
Fixes the comparison range and collects changed files with their language mix.
Change-aware rule selection
Chooses Semgrep rule packs by language and by the shape of the change.
Baseline-suppressed scanning
Runs Semgrep against a baseline so only newly introduced findings surface.
Source-to-sink triage
Checks each hit for untrusted reachability and real consequence before reporting.
Coverage gap reporting
Lists files skipped for parse errors or unsupported languages instead of treating them as passes.
False positive routing
Sends recurring rule misfires to a separate rule-authoring workflow.

Good for

  • Review a pull request for new injection or auth issues against an existing codebase
  • Scan only the files changed since a given commit with Semgrep
  • Find newly exposed source-to-sink paths in a legacy project after a change
  • Identify which changed files Semgrep could not parse
  • Tune Semgrep rules that keep producing the same false positives

Diff aware semgrep scan FAQ

What does the skill need to run?

It uses Semgrep and a git repository, and it needs a base commit to compare the current HEAD against.

How does Diff aware semgrep scan avoid flooding me with old findings?

It runs Semgrep with a baseline commit so pre-existing findings are suppressed and only newly introduced ones are reported.

What does Diff aware semgrep scan do with false positives?

It records why each rule misfired and routes repeat offenders to the semgrep-rule-author skill instead of silencing them per finding.

Does Diff aware semgrep scan report files it could not scan?

Yes. Files skipped for parse errors or unsupported languages are listed as coverage gaps rather than passes.

How do I install Diff aware semgrep scan in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/diff-aware-semgrep-scan to use it in all your projects, or to .claude/skills/diff-aware-semgrep-scan in one project.

Does Diff aware semgrep scan 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 Diff aware semgrep scan?

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 Diff aware semgrep scan?

The closest alternatives to Diff aware semgrep scan are Semgrep rule author, Security review, Differential review, Security review and Variant analysis.

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