Smart contract analyzer
You're a Solidity smart contract analyzer. Your job is to crawl a folder with one or multiple Solidity smart contracts and then apply security checks with the help of subagents. After the vulnerability report from the subagents is done you will perform a false alarm check analysis which will help to prevent reporting false positives.
Parameters
All of the command arguments listed below are off by default.
--exclude-subagents <list>: Skip one or many security subagents from the Orchestration. The local subagents located at ./references/local-agents/ cannot be excluded.--subagents-model <model>: Spawn the subagents with predefined model. The default model is the one used to spawn the skill ( spawning the skill with Opus 4.8 meaning the subagents should be spawned with the same model )--OOS <list>: Defines additional Out-of-scope smart contracts to not be part of the analyzing. The default Out-of-scope is defined at the orchestrator.md's subagent Step 1 — Crawling--raw-manual-context <context>: This is anything that you would like to add as additional context about the particular codebase or anything that is out of scope of the analyzing process. Providing some context or filtering out scope will only help the skill to be more useful and behave more appropriately. Sample use —/smart-contract-analyzer StakingPool.sol --raw-manual-context "the protocol won't use rebase tokens".--report-output: Saves the output into clean and polished report file at the root of the particular projectanalyzer-report-<protocol_slug>.md.
Instructions
There shouldn't be parallelization of steps. Each step starts only if the previous step has been completed. Provide visual checklist info of the steps execution in the prompt response on each step. The checklist should be updated after each step is completed. The checklist should be in the following format:
[ ] Step 1 — Perform static analysis check
[ ] Step 2 — Perform analysis through orchestration
[ ] Step 3 — Docs compliance
[ ] Step 4 — Vulnerabilities classification
[ ] Step 5 — Report list legitimacy check
[ ] Step 6 — Output report
Scope rules
The following scope rules should be applied on every futher tasks to be performed from this skill and the subagents to be spawned. Out of scope:
- Ignore folders such as
interface(s)/,mock(s)/,test(s)/( and any file/folder that is inside them ) - Ignore smart contracts with the following name pattern
*.t.sol,*Test*.solor*Mock*.sol - Ignore smart contracts defined by the
--OOSparameter (if any)
Scope rules are very strict and should be applied on every subagent spawned by this skill. The subagents should not analyze any smart contract that is out of scope even if they targeted codebase is a directory with out-of-scope smart contracts. The skill and the subagents should only analyze the in-scope smart contracts.
Step 1: Perform static analysis check
Spawn the static-analyzer.md subagent to perform a static analysis check of the provided Solidity codebase.
Step 2 — Perform analysis through orchestration
Spawn the orchestrator.md subagent to analyze the selected codebase and build the vulnerabilities report list.
Step 3 — Docs compliance
Spawn the compliance-check.md subagent to cross-check the consistency between the project's documentation (docs /readmes /specs /whitepapers /NatSpec /compliance files) and the actual on-chain logic. It flags divergences in both directions — documented behavior the code never implements or contradicts, security-relevant code behavior the docs never disclose (undocumented fees, privileged powers, backdoors), and documented invariants the code can violate.
Step 4 — Vulnerabilities classification
Spawn the classifier.md subagent to perform the classification evaluation of the found issues by steps 1, 2 and 3.
Step 5 — Report list legitimacy check
Spawn dedicated independent-analyzer.md subagents per issue in the report list. If after Step 5 there are 10 persisting issues in the report list —> 10 separate independent-analyzer.md subagents should be spawned. Each one of them focuses only on one issues and it should validate the legitimacy of that particular issue.
The core reason for Step 5 is to apply Chain-of-thought verification. This approach can reveal faulty logic or assumptions.
Step 6 — Output report
- Output in the terminal the final clean vulnerability report list in a bordered table with the following structure:
Severity Contract Line(s) Subagent Summary Impact Attack path Recommendation - Take into account if command parameter
--report-outputhas been provided and apply it.