smart-contract-security-audito
简介
smart-contract-security-audito
原始描述
Smart Contract Security Auditor: Analyzes Solidity and Go smart contracts for security vulnerabilities, provides gas optimization suggestions, and generates...
通过你的 Agent 添加
安装目录:smart-contract-security-auditor/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: smart-contract-security-auditor
description: "Smart Contract Security Auditor: Analyzes Solidity and Go smart contracts for security vulnerabilities, provides gas optimization suggestions, and generates corresponding test cases (Foundry or Go tests)."
smart-contract-security-auditor
A skill designed to enhance smart contract security, optimize gas costs, and ensure thorough test coverage for Solidity and Golang (Cosmos/Hyperledger) projects.
Workflows
1. Security Static Analysis
When you finish writing or modifying a smart contract, trigger this skill to analyze the code for common vulnerabilities.
- For Solidity, it checks for reentrancy, overflow, access control issues, and more.
- For Go, it checks for determinism issues and state access control.
How to trigger: "Audit this contract: [file_path]" or "Check my changes in [file_path] for security vulnerabilities."
2. Gas & Performance Optimization
Use this workflow to get suggestions on reducing EVM Gas costs or optimizing state read/write operations in Cosmos/Hyperledger.
How to trigger: "Optimize gas for [file_path]" or "Suggest performance improvements for [file_path]."
3. Automatic Test Generation
Whenever contract logic changes, this skill can automatically generate or update the corresponding tests.
- Solidity: Generates Foundry tests (
.t.sol). - Go: Generates Go tests using the
testingpackage (_test.go).
How to trigger: "Generate tests for [file_path]" or "Write a Foundry test script for my new logic."
Reference Materials
When performing tasks, reference the following documents to ensure standard compliance:
- Vulnerabilities: Known issues to look for during an audit.
- Gas Optimization: Strategies to reduce on-chain costs.
- Testing Strategies: Templates and principles for writing tests.
Usage Guidelines
- Be Explicit: If you want both an audit and test generation, ask for both (e.g., "Audit this file and write tests for it").
- Review Findings: The auditor will present findings and suggestions. Review them before requesting code changes.
- Test Context: When generating tests for Go, ensure you provide context on the specific framework (Cosmos SDK vs. Hyperledger Fabric) if it's not obvious from the code.
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。