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.
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/semgrepRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/CraftOS-dev/CraftBot /tmp/CraftBot && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/CraftBot/skills/semgrep ~/.gemini/antigravity-cli/skills/semgrepAntigravity 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
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
ANo 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 →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
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.
