Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

semgrep

Skill by CraftOS-dev

Runs Semgrep static analysis on a codebase using parallel subagents, with a user-approved ruleset plan. Built for security audits, vulnerability scans and first-pass code review.

  • Score 85
  • 431 stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install semgrep

Built from the published package, never by AI.

git clone --depth 1 https://github.com/CraftOS-dev/CraftBot /tmp/CraftBot && mkdir -p ~/.claude/skills && cp -r /tmp/CraftBot/skills/semgrep ~/.claude/skills/semgrep

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install semgrep in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

The semgrep skill runs a Semgrep static analysis scan on a codebase. It detects the languages in the code and checks whether Semgrep Pro is available. The user picks a scan mode, either run all rulesets or important only, and approves the exact rulesets before any scan starts. Scans run in parallel through Task subagents, and the results are merged into one SARIF file.

The skill is aimed at security audits, vulnerability searches and first-pass static analysis. It includes third-party rulesets from Trail of Bits, 0xdea and Decurity for matching languages. Important only mode keeps security findings with medium or high confidence and impact. Raw outputs are stored in a separate folder, and cloned repositories are removed at the end.

Written from the project's SKILL.md and checked against it.

What it can do

  • Language detectionDetects the languages in the codebase with file counts and checks for Semgrep Pro.
  • Scan mode selectionLets the user choose run all or important only as the scan mode.
  • Ruleset approvalPresents the exact rulesets and waits for explicit approval before scanning.
  • Parallel scanningSpawns parallel scan Tasks through subagents for multi-language codebases.
  • Third-party rulesetsAdds Trail of Bits, 0xdea and Decurity rules for matching languages.
  • Result mergingMerges per-scan output into one results.sarif file with a severity and category summary.

What you need

  • Semgrep CLI
  • Semgrep Pro (optional, for cross-file taint analysis)
  • uv (to run the merge script)

Try asking

  • Scan this repo for security vulnerabilities with Semgrep, important only mode
  • Run a full Semgrep scan with all rulesets on the Python code in this folder
  • Check whether Semgrep Pro is available before scanning this codebase

Good to know

  • OSS mode cannot track data flow across files.
  • Pro mode runs rulesets with -j 1, so each ruleset is slower.
  • The scan does not start until the user approves the plan.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/semgrep/SKILL.md, skills/semgrep/scripts/merge_sarif.py. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

Allowed tools: Bash Read Glob Task AskUserQuestion TaskCreate TaskList TaskUpdate

  • SKILL.md10 KB
  • references/rulesets.md8 KB
  • references/scan-modes.md4 KB
  • references/scanner-task-prompt.md6 KB
  • scripts/merge_sarif.py7 KB
Show all 6 files
  • workflows/scan-workflow.md11 KB

Alternatives to semgrep

All alternatives →

Compare with function_health, windows-privilege-escalation or github-actions-advanced

semgrep: common questions

Does the semgrep skill send data to external services?

The skill requires every semgrep command to use --metrics=off to prevent telemetry. It also avoids --config auto.

What is the difference between run all and important only?

Run all reports every severity from all rulesets. Important only filters to security findings with medium or high confidence and impact.

Where are the scan results saved?

Results go to a static_analysis_semgrep output folder by default, or to a directory the user specifies. Raw outputs are kept in a raw subfolder.

How do I install semgrep?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is semgrep free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is semgrep safe to use?

It scores 85 of 100. Grades: maintenance A, licence A, quality B. 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 semgrep?

Similar skills: function_health, windows-privilege-escalation, github-actions-advanced, propose-security-hardening.

semgrep Install

Add to stack

Loading.