external/sentry-security-review/skill-scanner/SKILL.md
Scan agent skills for security issues. Use when asked to "scan a skill", "audit a skill", "review skill security", "check skill for injection", "validate SKILL.md", or assess whether an agent skill is safe to install. Checks for prompt injection, malicious scripts, excessive permissions, secret exposure, and supply chain risks.
npx skillsauth add seikaikyo/dash-skills skill-scannerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Scan agent skills for security issues before adoption. Detects prompt injection, malicious code, excessive permissions, secret exposure, and supply chain risks.
Requires: The uv CLI for python package management, install guide at https://docs.astral.sh/uv/getting-started/installation/
Important: Run all scripts from the repository root using the full path via ${CLAUDE_SKILL_ROOT}.
scripts/scan_skill.pyStatic analysis scanner that detects deterministic patterns. Outputs structured JSON.
uv run ${CLAUDE_SKILL_ROOT}/scripts/scan_skill.py <skill-directory>
Returns JSON with findings, URLs, structure info, and severity counts. The script catches patterns mechanically — your job is to evaluate intent and filter false positives.
Determine the scan target:
plugins/*/skills/<name>/ or .claude/skills/<name>/*/SKILL.md files and scan eachValidate the target contains a SKILL.md file. List the skill structure:
ls -la <skill-directory>/
ls <skill-directory>/references/ 2>/dev/null
ls <skill-directory>/scripts/ 2>/dev/null
Run the bundled scanner:
uv run ${CLAUDE_SKILL_ROOT}/scripts/scan_skill.py <skill-directory>
Parse the JSON output. The script produces findings with severity levels, URL analysis, and structure information. Use these as leads for deeper analysis.
Fallback: If the script fails, proceed with manual analysis using Grep patterns from the reference files.
Read the SKILL.md and check:
name and description must be presentname field should match the directory nameallowed-tools — is Bash justified? Are tools unrestricted (*)?Load ${CLAUDE_SKILL_ROOT}/references/prompt-injection-patterns.md for context.
Review scanner findings in the "Prompt Injection" category. For each finding:
Critical distinction: A security review skill that lists injection patterns in its references is documenting threats, not attacking. Only flag patterns that would execute against the agent running the skill.
This phase is agent-only — no pattern matching. Read the full SKILL.md instructions and evaluate:
Description vs. instructions alignment:
Config/memory poisoning:
CLAUDE.md, MEMORY.md, settings.json, .mcp.json, or hook configurations~/.claude/, ~/.agents/, or any agent configuration directoryScope creep:
Information gathering:
Structural attacks (check scanner output for these):
~/.ssh/id_rsa, ~/.aws/credentials, etc. as "example" filesPostToolUse/PreToolUse hooks in YAML — execute shell commands automatically, the model cannot prevent it!command`` syntax: Runs shell commands at skill load time during template expansion, before the model sees the promptconftest.py, test_*.py, *.test.js — test runners auto-discover and execute these as side effects of pytest or npm testpostinstall scripts in bundled package.json — run automatically on npm installIf the skill has a scripts/ directory:
${CLAUDE_SKILL_ROOT}/references/dangerous-code-patterns.md for contextdependencies — are they legitimate, well-known packages?Legitimate patterns: gh CLI calls, git commands, reading project files, JSON output to stdout are normal for skill scripts.
Review URLs from the scanner output and any additional URLs found in scripts:
Load ${CLAUDE_SKILL_ROOT}/references/permission-analysis.md for the tool risk matrix.
Evaluate:
Example assessments:
Read Grep Glob — Low risk, read-only analysis skillRead Grep Glob Bash — Medium risk, needs Bash justification (e.g., running bundled scripts)Read Grep Glob Bash Write Edit WebFetch Task — High risk, near-full access| Level | Criteria | Action | |-------|----------|--------| | HIGH | Pattern confirmed + malicious intent evident | Report with severity | | MEDIUM | Suspicious pattern, intent unclear | Note as "Needs verification" | | LOW | Theoretical, best practice only | Do not report |
False positive awareness is critical. The biggest risk is flagging legitimate security skills as malicious because they reference attack patterns. Always evaluate intent before reporting.
## Skill Security Scan: [Skill Name]
### Summary
- **Findings**: X (Y Critical, Z High, ...)
- **Risk Level**: Critical / High / Medium / Low / Clean
- **Skill Structure**: SKILL.md only / +references / +scripts / full
### Findings
#### [SKILL-SEC-001] [Finding Type] (Severity)
- **Location**: `SKILL.md:42` or `scripts/tool.py:15`
- **Confidence**: High
- **Category**: Prompt Injection / Malicious Code / Excessive Permissions / Secret Exposure / Supply Chain / Validation
- **Issue**: [What was found]
- **Evidence**: [code snippet]
- **Risk**: [What could happen]
- **Remediation**: [How to fix]
### Needs Verification
[Medium-confidence items needing human review]
### Assessment
[Safe to install / Install with caution / Do not install]
[Brief justification for the assessment]
Risk level determination:
| File | Purpose |
|------|---------|
| references/prompt-injection-patterns.md | Injection patterns, jailbreaks, obfuscation techniques, false positive guide |
| references/dangerous-code-patterns.md | Script security patterns: exfiltration, shells, credential theft, eval/exec |
| references/permission-analysis.md | Tool risk tiers, least privilege methodology, common skill permission profiles |
development
拋棄式 HTML mockup 比稿:產出 2 到 3 個設計立場不同的變體(密度 / 版式 / 強調軸,不是換色),各附取捨說明,最後給有立場的對比結論。適用:「畫個草圖」「比較 A 版 B 版」「先看方向再做」「給我看幾種做法」。要 production 元件或設計已定案時不適用。
tools
需求不明時的意圖萃取訪談:一次一題、每題附上自己的猜測、聽出「真正想要 vs 覺得應該要」,直到能預測使用者反應(約 95% 信心)才動工。適用:需求缺少對象 / 動機 / 成功標準 / 約束,或使用者點名「訪談我」「先確認一下」「我們確定嗎」。明確自足的指示、純資訊查詢、機械性操作不適用。
development
對非平凡決策啟動新鮮 context 對抗審查(找碴不背書),在修正還便宜的時候抓出錯誤方向。適用:高風險改動(production、資安敏感邏輯、不可逆操作)、不熟的程式碼、要宣稱「這樣是安全的 / 可行的」之前。機械性操作與一行修改不適用。
testing
Reference for writing and editing agent skills well — the vocabulary and principles that make a skill predictable. Consult when authoring, reviewing, or pruning a SKILL.md.