Community编程与开发github.com

trailofbits/guidelines-advisor

基于 Trail of Bits 最佳实践的智能合约开发顾问。分析代码库以生成文档/规范、审查架构、检查可升级性模式、评估实现质量、识别陷阱、审查依赖项并评估测试。提供可操作的建议。

guidelines-advisor 是什么?

trailofbits/guidelines-advisor 是一个基于 Trail of Bits 最佳实践的智能合约开发顾问技能。它可以分析代码库以生成文档和规范,审查架构设计,检查可升级性模式,评估实现质量,识别常见陷阱,审查外部依赖项,并评估测试覆盖率和质量。该技能支持多种 AI 代理平台(如 Claude Code、Coder 等),通过详细的 SKILL.md 文件提供指导。对于开发者来说,它有助于在开发早期发现潜在问题,确保代码遵循行业认可的安全和编码标准。该技能的关键工作流程包括自动扫描文件结构、识别合约依赖关系、生成设计文档,并提出改进建议。最终输出结构化的分析报告,包含架构图、风险评分和具体的修复步骤。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/trailofbits/skills/tree/main/skills/guidelines-advisor

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

guidelines-advisor 是做什么的?

基于 Trail of Bits 最佳实践的智能合约开发顾问。分析代码库以生成文档/规范、审查架构、检查可升级性模式、评估实现质量、识别陷阱、审查依赖项并评估测试。提供可操作的建议。

功能概述

该技能帮助你遵循 Trail of Bits(一家领先的区块链安全公司)的研究成果进行智能合约开发。它可以在开发周期的早期发现协议逻辑错误、实现缺陷、里程碑风险以及安全补偿措施中的不足之处。

使用方法

  1. 将技能添加到你的 AI 代理项目中。
  2. 在包含智能合约代码的目录下运行该技能。
  3. 按照提示分析特定文件或整个代码库。
  4. 查看生成的报告,其中包含架构见解、代码质量问题和安全建议。

功能列表

  • 文档生成:自动生成智能合约架构、函数接口和数据流的设计文档。
  • 架构审查:识别合约之间的依赖关系和潜在的权限问题。
  • 可升级性检查:验证使用代理模式时的初始化、存储布局变更以及版本控制纪律。
  • 质量评估:评估 Solidity 安全性、Gas 优化、错误处理和代码复杂性。
  • 陷阱检测:标记常见漏洞,如重入攻击、整数溢出、未检查的外部调用等。
  • 依赖审查:检查外部库的版本和安全公告。
  • 测试评估:评估测试覆盖率,并识别逻辑分支是否被充分测试。

使用示例

# 将技能集成到 AI 代理会话中
agent install trailofbits/guidelines-advisor

# 在合约目录中运行技能
agent run guidelines-advisor ./contracts

输出示例

运行技能后,你将获得包含以下内容的结构化报告:

  • 架构摘要:显示合约关系图的 Mermaid 图。
  • 风险矩阵:按严重程度分类的风险表格。
  • 实施建议:具体、可操作的代码修改建议,附有代码示例。

平台支持

  • Claude Code
  • Cursor
  • Codex
  • 其他兼容 AI 代理框架的平台

依赖

  • 目标智能合约项目(Solidity、Vyper 或其他 EVM 语言)
  • AI 代理环境(Claude Code、Coder 等)

许可证

MIT

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

trailofbits/address-sanitizer

AddressSanitizer detects memory errors during fuzzing. Use when fuzzing C/C++ code to find buffer overflows and use-after-free bugs.

trailofbits/aflpp

AFL++ is a fork of AFL with better fuzzing performance and advanced features. Use for multi-core fuzzing of C/C++ projects.

trailofbits/agentic-actions-auditor

Audits GitHub Actions workflows for security vulnerabilities in AI agent integrations including Claude Code Action, Gemini CLI, OpenAI Codex, and GitHub AI Inference. Detects attack vectors where attacker-controlled input reaches AI agents running in CI/CD pipelines, including env var intermediary patterns, direct expression injection, dangerous sandbox configurations, and wildcard user allowlists. Use when reviewing workflow files that invoke AI coding agents, auditing CI/CD pipeline security for prompt injection risks, or evaluating agentic action configurations.

trailofbits/algorand-vulnerability-scanner

Scans Algorand smart contracts for 11 common vulnerabilities including rekeying attacks, unchecked transaction fees, missing field validations, and access control issues. Use when auditing Algorand projects (TEAL/PyTeal).

trailofbits/ask-questions-if-underspecified

Clarify requirements before implementing. Use when serious doubts arise.

trailofbits/atheris

Atheris is a coverage-guided Python fuzzer based on libFuzzer. Use for fuzzing pure Python code and Python C extensions.

trailofbits/audit-augmentation

Augments Trailmark code graphs with external audit findings from SARIF static analysis results and weAudit annotation files. Maps findings to graph nodes by file and line overlap, creates severity-based subgraphs, and enables cross-referencing findings with pre-analysis data (blast radius, taint, etc.). Use when projecting SARIF results onto a code graph, overlaying weAudit annotations, cross-referencing Semgrep or CodeQL findings with call graph data, or visualizing audit findings in the context of code structure.

trailofbits/audit-context-building

Enables ultra-granular, line-by-line code analysis to build deep architectural context before vulnerability or bug finding.

trailofbits/audit-prep-assistant

Prepares codebases for security review using Trail of Bits' checklist. Helps set review goals, runs static analysis tools, increases test coverage, removes dead code, ensures accessibility, and generates documentation (flowcharts, user stories, inline comments).

trailofbits/burpsuite-project-parser

Searches and explores Burp Suite project files (.burp) from the command line. Use when searching response headers or bodies with regex patterns, extracting security audit findings, dumping proxy history or site map data, or analyzing HTTP traffic captured in a Burp project.

trailofbits/cairo-vulnerability-scanner

Scans Cairo/StarkNet smart contracts for 6 critical vulnerabilities including felt252 arithmetic overflow, L1-L2 messaging issues, address conversion problems, and signature replay. Use when auditing StarkNet projects.

trailofbits/cargo-fuzz

cargo-fuzz is the de facto fuzzing tool for Rust projects using Cargo. Use for fuzzing Rust code with libFuzzer backend.

trailofbits/chrome-mcp-troubleshooting

Diagnose and fix Claude in Chrome MCP extension connectivity issues. Use when mcp__claude-in-chrome__* tools fail, return "Browser extension is not connected", or behave erratically.

trailofbits/claude-in-chrome-troubleshooting

Diagnose and fix Claude in Chrome MCP extension connectivity issues. Use when mcp__claude-in-chrome__* tools fail, return "Browser extension is not connected", or behave erratically.

trailofbits/code-improver

Runs an autonomous review-and-fix improvement loop over any code target — a skill, plugin, module, or directory — using a reviewer the user names: any installed skill or agent. Keeps a cross-round findings ledger, escalates when fixes stop converging, and guards scope mechanically. Use when asked to 'improve this code until review passes', 'run an improvement loop with <reviewer>', or to iterate review-and-fix with a specific reviewer. For skills prefer the skill-improver entry; for a branch prefer pr-improver.

trailofbits/code-maturity-assessor

Systematic code maturity assessment using Trail of Bits' 9-category framework. Analyzes codebase for arithmetic safety, auditing practices, access controls, complexity, decentralization, documentation, MEV risks, low-level code, and testing. Produces professional scorecard with evidence-based ratings and actionable recommendations.

trailofbits/codeql

Scans a codebase for security vulnerabilities using CodeQL's interprocedural data flow and taint tracking analysis. Triggers on "run codeql", "codeql scan", "codeql analysis", "build codeql database", or "find vulnerabilities with codeql". Supports "run all" (security-and-quality + security-experimental suites) and "important only" (high-precision security findings) scan modes. Also handles creating data extension models and processing CodeQL SARIF output.

trailofbits/constant-time-analysis

Detects timing side-channel vulnerabilities in cryptographic code. Use when implementing or reviewing crypto code, encountering division on secrets, secret-dependent branches, or constant-time programming questions in C, C++, Go, Rust, Swift, Java, Kotlin, C#, PHP, JavaScript, TypeScript, Python, or Ruby.

trailofbits/constant-time-testing

Constant-time testing detects timing side channels in cryptographic code. Use when auditing crypto implementations for timing vulnerabilities.

trailofbits/cosmos-vulnerability-scanner

Scans Cosmos SDK blockchain modules and CosmWasm contracts for consensus-critical vulnerabilities — chain halts, fund loss, state divergence. 25 core + 16 IBC + 10 EVM + 3 CosmWasm patterns. Use when auditing custom x/ modules, reviewing IBC integrations, or assessing pre-launch chain security. Updated for SDK v0.53.x.

相关技能