/ 目錄 / 演練場 / Trail of Bits Skills
● 社群 trailofbits ⚡ 即開即用

Trail of Bits Skills

作者 trailofbits · trailofbits/skills

Trail of Bits' Claude Code skills for security code review, vulnerability detection, and defensive audit workflows.

The security firm Trail of Bits packaged their internal code-review playbooks as Claude Code skills. Coverage includes common-weakness detection across languages, crypto mistake catching, input-validation review, and IaC misconfig checks. CC-BY-SA-4.0 — free to use and adapt.

為什麼要用

核心特性

即時演示

實際使用效果

就緒

安裝

選擇你的客戶端

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "trailofbits-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/trailofbits/skills",
        "~/.claude/skills/skills"
      ],
      "_inferred": true
    }
  }
}

開啟 Claude Desktop → Settings → Developer → Edit Config。儲存後重啟應用。

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "trailofbits-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/trailofbits/skills",
        "~/.claude/skills/skills"
      ],
      "_inferred": true
    }
  }
}

Cursor 使用與 Claude Desktop 相同的 mcpServers 格式。專案級設定優先於全域。

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "trailofbits-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/trailofbits/skills",
        "~/.claude/skills/skills"
      ],
      "_inferred": true
    }
  }
}

點擊 Cline 側欄中的 MCP Servers 圖示,然後選 "Edit Configuration"。

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "trailofbits-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/trailofbits/skills",
        "~/.claude/skills/skills"
      ],
      "_inferred": true
    }
  }
}

格式與 Claude Desktop 相同。重啟 Windsurf 生效。

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "trailofbits-skill",
      "command": "git",
      "args": [
        "clone",
        "https://github.com/trailofbits/skills",
        "~/.claude/skills/skills"
      ]
    }
  ]
}

Continue 使用伺服器物件陣列,而非映射。

~/.config/zed/settings.json
{
  "context_servers": {
    "trailofbits-skill": {
      "command": {
        "path": "git",
        "args": [
          "clone",
          "https://github.com/trailofbits/skills",
          "~/.claude/skills/skills"
        ]
      }
    }
  }
}

加入 context_servers。Zed 儲存後熱重載。

claude mcp add trailofbits-skill -- git clone https://github.com/trailofbits/skills ~/.claude/skills/skills

一行命令搞定。用 claude mcp list 驗證,claude mcp remove 移除。

使用場景

實戰用法: Trail of Bits Skills

Add a security-review pass to every PR

👤 Teams without a dedicated security engineer ⏱ ~30 min intermediate

何時使用: Your PRs currently go straight from code-review to merge — no security eyes.

前置條件
  • Skills installed — git clone https://github.com/trailofbits/skills ~/.claude/skills/trailofbits
步驟
  1. Scope the diff
    Use trailofbits/pr-review skill on the current PR. List files the skill thinks are security-relevant with reasons.✓ 已複製
    → Concrete file-by-file relevance reasons
  2. Deep review
    For each flagged file, run the appropriate domain skill (crypto, input-validation, auth). Report findings with severity.✓ 已複製
    → Severity-ranked list with code refs
  3. Summary for reviewer
    Write a 5-bullet PR comment summarizing the findings, non-scary but precise.✓ 已複製
    → Reviewer-friendly summary with exact line citations

結果: A security review comment on every PR that catches real issues without drowning you in false positives.

注意事項
  • Skill flags style issues as security — Calibrate by prompting: "focus on exploitable issues only"
搭配使用: github · filesystem

Audit cryptographic code paths in a service

👤 Devs maintaining auth/encryption code ⏱ ~90 min advanced

何時使用: You have a JWT/HMAC/encryption layer and want someone smart to double-check.

步驟
  1. Find crypto
    Use trailofbits/crypto-review. Scan /src for files that touch crypto APIs. Report them.✓ 已複製
    → Crypto call-site inventory
  2. Audit each
    For each site: what algorithm? Key management? Nonce reuse risk? IV handling? Cite source.✓ 已複製
    → Per-site audit with code refs
  3. Remediation plan
    For any medium+ finding, draft a remediation — concrete code change, not "consider using ...".✓ 已複製
    → Applicable diffs, not vague advice

結果: A crypto audit report with concrete fixes, from a baseline of common mistakes ToB has seen in real engagements.

注意事項
  • Not a substitute for a real audit — Use for self-review; hire professionals before launch of high-value surfaces
搭配使用: github

組合

與其他 MCP 搭配,撬動十倍槓桿

trailofbits-skill + github

Post findings as a PR review comment

Post the review as a PR comment — severities as labels.✓ 已複製
trailofbits-skill + filesystem

Scan the whole repo offline

Run the full security sweep across /src and write report to /audit/report.md.✓ 已複製

工具

此 MCP 暴露的能力

工具輸入參數何時呼叫成本
scope_review diff|path Before deep dive 0
crypto_review path Crypto code specifically 0
input_validation_review path API/boundary code 0
iac_review path Terraform / CloudFormation / K8s manifests 0

成本與限制

運行它的成本

API 配額
N/A
每次呼叫 Token 數
Review is reading-heavy; budget proportional to diff size
費用
Free (CC-BY-SA)
提示
Scope first — don't run deep skills on irrelevant files

安全

權限、密鑰、影響範圍

最小權限: filesystem-read
憑證儲存: None
資料出站: None from skill; reviewed code is in your LLM context
切勿授予: write access unless auto-remediating

故障排查

常見錯誤與修復

Skill flags safe code as vulnerable

Ask for rationale; if weak, dismiss with reason. Calibration improves over sessions.

Misses obvious bugs

The skill codifies Trail of Bits' patterns — if your stack is unusual (e.g. niche Rust crate), it may miss. Add custom patterns.

Outputs too long to review

Constrain: "top 5 highest-severity findings only"

替代方案

Trail of Bits Skills 對比其他方案

替代方案何時用它替代權衡
Semgrep rulesYou want static analysis in CI, not interactive reviewNarrower pattern set; no LLM reasoning
CodeQLYou want deep dataflow analysisMuch more setup; not a skill

更多

資源

📖 閱讀 GitHub 上的官方 README

🐙 查看未解決的 issue

🔍 瀏覽全部 400+ MCP 伺服器和 Skills