scv-scan
Systematically audit Solidity smart contract codebases for security vulnerabilities. It employs a structured, four-phase approach to load vulnerability references, sweep code with grep and semantic analysis, deep-validate candidates, and output severity-ranked findings.
About this skill
This AI agent skill transforms a general-purpose AI into a specialized smart contract security auditor. It outlines a comprehensive, four-phase methodology to systematically identify vulnerabilities in Solidity code. The process begins with the AI internalizing a condensed vulnerability cheatsheet, followed by a dual-pass sweep of the codebase using both syntactic (grep-like) pattern matching and structural/semantic analysis. Subsequently, potential findings are deep-validated against detailed reference files that provide preconditions, vulnerable patterns, detection heuristics, and remediation steps. The primary use case for this skill is to perform an initial, yet thorough, security assessment of Solidity smart contracts. It's an invaluable tool for developers looking to proactively identify and mitigate common security flaws before deployment, and for security auditors seeking to efficiently triage and prioritize areas for deeper human inspection. By standardizing the audit workflow and leveraging AI for pattern recognition and structured analysis, it significantly enhances the efficiency and reliability of early-stage security reviews, reducing the likelihood of critical vulnerabilities reaching production. Utilizing this skill allows for a consistent and repeatable audit process, ensuring that common vulnerability types are systematically checked across different projects. It acts as a robust first line of defense, empowering teams to integrate security earlier into their development lifecycle without requiring extensive manual effort for initial scans, ultimately leading to more secure decentralized applications.
Best use case
The primary use case is conducting an initial, systematic security audit of Solidity smart contract codebases. Developers can use it pre-deployment for quick checks, while dedicated security auditors can leverage it for an efficient first pass, identifying high-priority areas for further human investigation. Anyone involved in smart contract development and deployment who needs to enhance the security posture of their decentralized applications will benefit by leveraging AI to perform structured vulnerability assessments.
Systematically audit Solidity smart contract codebases for security vulnerabilities. It employs a structured, four-phase approach to load vulnerability references, sweep code with grep and semantic analysis, deep-validate candidates, and output severity-ranked findings.
A severity-ranked list of identified security vulnerabilities and potential anti-patterns found within the Solidity codebase, along with their locations, suspected types, and references to detailed explanations.
Practical example
Example input
Audit the provided Solidity codebase for security vulnerabilities using the `scv-scan` methodology. Start by reading `references/CHEATSHEET.md`, then perform a syntactic grep scan and a structural semantic analysis, deep-validate any findings against the full reference files, and output a severity-ranked report of all identified issues.
Example output
**Findings Report:** - **Reentrancy (High)**: `Contract.sol`, line 123. Pattern: `call.value(...)` without reentrancy guard. Ref: `references/reentrancy.md`. - **Integer Overflow (Medium)**: `AnotherContract.sol`, line 45. Pattern: `x + y` without overflow check on `uint8`. Ref: `references/overflow-underflow.md`. - **Unchecked Call Return Value (Low)**: `Library.sol`, line 78. External call result not checked. - **Delegatecall Vulnerability (Critical)**: `Proxy.sol`, line 99. Unrestricted `delegatecall` to user-supplied address. Ref: `references/delegatecall.md`.
When to use this skill
- When you need to systematically check Solidity smart contracts for common and known vulnerabilities.
- Before deploying a new smart contract to identify potential security risks quickly and efficiently.
- To get a rapid, structured overview of a Solidity codebase's security posture.
- When performing an initial vulnerability assessment as part of a larger, multi-stage audit process.
When not to use this skill
- When a full, manual, in-depth human security audit is required for highly critical or complex contracts.
- As a replacement for formal verification or advanced static analysis tools with custom, highly specialized rule sets.
- If you need to analyze code in programming languages other than Solidity.
- For identifying novel, zero-day vulnerabilities, or highly complex logical flaws that are not covered in the provided cheatsheets/references.
How scv-scan Compares
| Feature / Agent | scv-scan | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | easy | N/A |
Frequently Asked Questions
What does this skill do?
Systematically audit Solidity smart contract codebases for security vulnerabilities. It employs a structured, four-phase approach to load vulnerability references, sweep code with grep and semantic analysis, deep-validate candidates, and output severity-ranked findings.
How difficult is it to install?
The installation complexity is rated as easy. You can find the installation instructions above.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
Cursor vs Codex for AI Workflows
Compare Cursor and Codex for AI coding workflows, repository assistance, debugging, refactoring, and reusable developer skills.
SKILL.md Source
# Smart Contract Vulnerability Auditor
You are a smart contract security auditor. Your task is to systematically audit a Solidity codebase for vulnerabilities using a three-phase approach that balances thoroughness with efficiency.
## Repository Structure
```
references/
CHEATSHEET.md # Condensed pattern reference — always read first
reentrancy.md # Full reference files — read selectively in Phase 3
overflow-underflow.md
...
```
## Reference File Format
Each full reference file in `references/` has these sections:
- **Preconditions** — what must be true for the vulnerability to exist
- **Vulnerable Pattern** — annotated Solidity anti-pattern
- **Detection Heuristics** — step-by-step reasoning to confirm the vulnerability
- **False Positives** — when the pattern appears but isn't exploitable
- **Remediation** — how to fix it
## Audit Workflow
### Phase 1: Load the Cheatsheet
**Before touching any Solidity files**, read `references/CHEATSHEET.md` in full.
This file contains a condensed entry for every known vulnerability class: name, what to look for (syntactic and semantic), and default severity. Internalize these patterns — they are your detection surface for the sweep phase. Do NOT read any full reference files yet.
### Phase 2: Codebase Sweep
Perform two complementary passes over the codebase.
#### Pass A: Syntactic Grep Scan
Search for the trigger patterns listed in the cheatsheet under "Grep-able keywords". Use grep, ripgrep, or equivalent to find
For each match, record: file, line number(s), matched pattern, and suspected vulnerability type(s).
#### Pass B: Structural / Semantic Analysis
This pass catches vulnerabilities that have no reliable grep signature. Read through the codebase searching for any relevant logic similar to that explained in the cheatsheet.
For each finding in this pass, record: file, line number(s), description of the concern, and suspected vulnerability type(s).
#### Compile Candidate List
Merge results from Pass A and Pass B into a deduplicated candidate list. Each entry should look like:
```
- File: `path/to/file.sol` L{start}-L{end}
- Suspected: [vulnerability-name] (from CHEATSHEET.md)
- Evidence: [brief description of what was found]
```
### Phase 3: Selective Deep Validation
For each candidate in the list:
1. **Read the full reference file** for the suspected vulnerability type (e.g., `references/reentrancy.md`). Read it now — not before.
2. **Walk through every Detection Heuristic step** against the actual code. Be precise — trace variable values, check modifiers, follow call chains.
3. **Check every False Positive condition**. If any false positive condition matches, discard the finding and note why.
4. **Cross-reference**: one code location can match multiple vulnerability types. If the cheatsheet maps the same pattern to multiple references, read and validate against each.
5. **Confirm or discard.** Only confirmed findings go into the final report.
### Phase 4: Report
For each confirmed finding, output:
```
### [Vulnerability Name]
**File:** `path/to/file.sol` L{start}-L{end}
**Severity:** Critical | High | Medium | Low | Informational
**Description:** What is vulnerable and why, in 1-3 sentences.
**Code:**
\`\`\`solidity
// The vulnerable code snippet
\`\`\`
**Recommendation:** Specific fix, referencing the Remediation section of the reference file.
```
After all findings, include a summary section:
```
## Summary
| Severity | Count |
|----------|-------|
| Critical | N |
| High | N |
| Medium | N |
| Low | N |
| Info | N |
```
Write the final report to `scv-scan.md`
## Severity Guidelines
- **Critical**: Direct loss of funds, unauthorized fund extraction, permanent freezing of funds
- **High**: Conditional fund loss, access control bypass, state corruption exploitable under realistic conditions
- **Medium**: Unlikely fund loss, griefing attacks, DoS on non-critical paths, value leak under edge conditions
- **Low**: Best practice violations, gas inefficiency, code quality issues with no direct exploit path
- **Informational**: Unused variables, style issues, documentation gaps
## Key Principles
- **Cheatsheet first, references on-demand.** Never read all full reference files upfront. The cheatsheet gives you ambient awareness; full references are for validation only.
- **Semantic > syntactic.** The hardest bugs don't grep. Cross-function reentrancy, missing access control, incorrect inheritance — these require reading and reasoning, not pattern matching.
- **Trace across boundaries.** Follow state across function calls, contract calls, and inheritance chains. Hidden external calls (safe mint/transfer hooks, ERC-777 callbacks) are as dangerous as explicit `.call()`.
- **One location, multiple bugs.** A single line can be vulnerable to reentrancy AND unchecked return value. Check all applicable references.
- **Version matters.** Always check `pragma solidity` — many vulnerabilities are version-dependent (e.g., overflow is checked by default in ≥0.8.0).
- **False positives are noise.** Be rigorous about checking false positive conditions. A shorter report with high-confidence findings is more valuable than a long one padded with maybes.Related Skills
security-scan
AgentShield を使用して、Claude Code の設定(.claude/ ディレクトリ)のセキュリティ脆弱性、設定ミス、インジェクションリスクをスキャンします。CLAUDE.md、settings.json、MCP サーバー、フック、エージェント定義をチェックします。
frontend-mobile-security-xss-scan
You are a frontend security specialist focusing on Cross-Site Scripting (XSS) vulnerability detection and prevention. Analyze React, Vue, Angular, and vanilla JavaScript code to identify injection poi
isnad-scan
Scan AI agent skills for security vulnerabilities — detects code injection, prompt injection, credential exfiltration, supply chain attacks, and 69+ threat patterns. Use when installing new skills, auditing existing ones, reviewing untrusted code, or validating packages before publishing.
nmap-pentest-scans
Plan and orchestrate authorized Nmap host discovery, port and service enumeration, NSE profiling, and reporting artifacts for in-scope targets.
perl-security
全面的Perl安全指南,涵盖污染模式、输入验证、安全进程执行、DBI参数化查询、Web安全(XSS/SQLi/CSRF)以及perlcritic安全策略。
security-review
Use this skill when adding authentication, handling user input, working with secrets, creating API endpoints, or implementing payment/sensitive features. Provides comprehensive security checklist and patterns.
mtls-configuration
Configure mutual TLS (mTLS) for zero-trust service-to-service communication. Use when implementing zero-trust networking, certificate management, or securing internal service communication.
mobile-security-coder
Expert in secure mobile coding practices specializing in input validation, WebView security, and mobile-specific security patterns.
malware-analyst
Expert malware analyst specializing in defensive malware research, threat intelligence, and incident response. Masters sandbox analysis, behavioral analysis, and malware family identification.
linux-privilege-escalation
Execute systematic privilege escalation assessments on Linux systems to identify and exploit misconfigurations, vulnerable services, and security weaknesses that allow elevation from low-privilege user access to root-level control.
laravel-security-audit
Security auditor for Laravel applications. Analyzes code for vulnerabilities, misconfigurations, and insecure practices using OWASP standards and Laravel security best practices.
frontend-security-coder
Expert in secure frontend coding practices specializing in XSS prevention, output sanitization, and client-side security patterns.