semgrep agent skill by trailofbits
Runs a Semgrep security scan over a codebase, detecting languages, selecting rulesets, requiring approval of the plan, and merging output to SARIF.
At a glance
| Publisher | Trail of Bits Official |
|---|---|
| Repository | trailofbits/skills (83 listed skills) |
| Category | Security |
| License | CC-BY-SA-4.0 |
| Last commit | October 15, 2026 (repository) |
| SKILL.md | 257 lines, 2,030 words |
| Bundled files | 9 files, including references, scripts, assets or templates |
| Quality score | 92/100 · A Passes all seven graded checks |
| Security scan | Not scanned |
| README badge | Get the badges for this listing |
Before you install
Read from the skill's files at the directory's October 19, 2026 snapshot: what ships with it, what its code reads, and the terms it is published under.
- Bundled scripts: 3 script files (2 Python, 1 Shell). Your agent may run them, so read them first.
- Network: its scripts use an HTTP client or a cloud SDK, and name
json.schemastore.org. - Tool permissions requested:
Bash Read Glob AskUserQuestion TaskCreate TaskList TaskUpdate(theallowed-toolsfield of SKILL.md). - License: CC-BY-SA-4.0, an open-source or open-content license.
Install semgrep
The skills CLI works with Claude Code, Codex, Cursor and other agents; the other routes copy the folder by hand.
npx skills add https://github.com/trailofbits/skills/tree/main/plugins/static-analysis/skills/semgrep
tmp="$(mktemp -d)"
git clone --depth 1 https://github.com/trailofbits/skills.git "$tmp/repo"
mkdir -p .claude/skills
cp -R "$tmp/repo/"plugins/static-analysis/skills/semgrep .claude/skills/
rm -rf "$tmp"
python3 ~/.codex/skills/.system/skill-installer/scripts/install-skill-from-github.py \
--repo trailofbits/skills \
--path plugins/static-analysis/skills/semgrep
trailofbits/skills is third-party code. Read SKILL.md and any bundled scripts before you install it.
How the author describes it
Runs a Semgrep security scan over a codebase: detects languages, selects rulesets, presents the plan for explicit approval, then runs every approved ruleset through scripts/run-scans.sh, which batches the semgrep processes and writes scans.json, and merges the output to SARIF. Supports two scan modes, "run all" for full ruleset coverage and "important only" for security findings at medium-to-high confidence and impact. Uses Semgrep Pro for cross-file taint analysis when it is available. Use when asked to scan code for vulnerabilities, run a security audit with Semgrep, find bugs, or perform static analysis. For the same scan without the approval gate, use the /static-analysis:semgrep-scan workflow.
From the description field of SKILL.md. Agents read this line to decide when to load the skill.
Sections in SKILL.md
- Essential Principles
- When to Use
- When NOT to Use
- Output Directory
- Prerequisites
- Scan Modes
- Orchestration Architecture
- Running it as a Workflow
- Workflow
- Workflow and agents
- Rationalizations to Reject
- Reference Index
- Success Criteria
Files in the skill folder
SKILL.mdagents/openai.yamlassets/trail-of-bits-mark.svgreferences/rulesets.mdreferences/scan-modes.mdscripts/merge_sarif.pyscripts/run-scans.shscripts/test_merge_sarif.pyworkflows/scan-workflow.md
Suede Skill Check: 92/100 · A
Report snapshot · · graded-v2
The rubric totals 100 points; published scores are capped at 99. Security scan: not scanned.
Source revision: 5c99c03fb8a9. Report version df9f535a7aa0. Badge URLs follow the latest listing; save the report to keep this version.
Download report · Request a fresh review
What to review next
- Boundary clause: 0 of 4 points. 4 when the description says when not to use the skill (“Not for …”, “Do not use …”, “Use … instead”).
- Description length: 3 of 5 points. 5 for 150–600 characters; 3 for 100–900; 1 for 50–1,024.
- Compatibility declared: 0 of 2 points. 2 when the frontmatter declares compatibility.
Add declarations and bundled files when they describe the skill’s actual needs. Update the source, then request a fresh review with the changed commit or PR.
semgrep passes the required frontmatter check and all seven graded checks, which cover the SKILL.md format, a declared license and a commit in the last year. Those checks earn 56 of the score’s points; the rest come from description quality, instruction depth, bundled files, maintenance and curated-list citations. How the score works.
See the checks and points
| Check | Result |
|---|---|
| Frontmatter parses and declares a name and a description | Pass |
| Name uses lowercase letters, digits and hyphens, 64 characters or fewer | Pass |
| Name matches the skill's folder name | Pass |
| Description is between 50 and 1,024 characters | Pass |
| Description says when an agent should use the skill | Pass |
| SKILL.md body is 500 lines or fewer | Pass |
| A license is declared in the frontmatter or the repository | Pass |
| Repository has a commit in the last 12 months | Pass |
| Score component | Points |
|---|---|
| Structural checks | 56 of 56 |
| Description length | 3 of 5 |
| Boundary clause | 0 of 4 |
| Example request | 3 of 3 |
| Instruction depth | 7 of 7 |
| Reference files | 3 of 3 |
| Bundled scripts | 2 of 2 |
| Recent maintenance | 9 of 9 |
| Curated-list citations | 7 of 7 |
| Tool permissions declared | 2 of 2 |
| Compatibility declared | 0 of 2 |
Two badges for semgrep
Choose the numeric badge, the letter badge, or both. Each links to this skill’s Suede listing; either valid linked badge can qualify for the feature offer.
[](https://skills.suedeai.ai/directory/trailofbits/skills/semgrep/)
[](https://skills.suedeai.ai/directory/trailofbits/skills/semgrep/)<a href="https://skills.suedeai.ai/directory/trailofbits/skills/semgrep/"><img src="https://skills.suedeai.ai/directory/trailofbits/skills/semgrep/score.svg" alt="Suede Skill Check: 92/100" width="160" height="175"></a>
<a href="https://skills.suedeai.ai/directory/trailofbits/skills/semgrep/"><img src="https://skills.suedeai.ai/directory/trailofbits/skills/semgrep/badge.svg" alt="Suede Skill Check: Grade A" width="160" height="175"></a>Suede Certified on the shield refers to this published structural quality check. Security scan: not scanned. Read the methodology.
Limited-time feature offer: display either the numeric or letter badge in your repository or skill README (both also qualify), then request badge verification. Eligible skills scoring 80–99 can receive a featured placement after Suede verifies at least one valid badge linked to the skill’s listing. Suede has not announced an end date.
Where this skill is cited
trailofbits/skills appears in 4 curated lists: BehiSecc/awesome-claude-skills, heilcheng/awesome-agent-skills, hesreallyhim/awesome-claude-code, travisvn/awesome-claude-skills.