Commands Skill
Purpose
Provides structured command patterns for invoking audit capabilities through the plugin. Each command maps to one or more underlying skills, loads the correct context, and executes the appropriate workflow.
Command Reference
/audit <contract|directory>
Purpose: Run a full comprehensive security audit.
| Parameter |
Required |
Example |
Description |
<target> |
Yes |
Vault.sol, src/ |
Contract file or directory to audit |
--chain |
No |
ethereum, arbitrum |
Target chain (default: ethereum) |
--type |
No |
defi, nft, bridge |
Protocol type for checklist selection |
--depth |
No |
quick, comprehensive |
Audit depth (default: comprehensive) |
Skills invoked: solidity-scanner → methodology/comprehensive-audit → checklists → report-writer
Example:
/audit src/Vault.sol --chain arbitrum --type defi
Output: Full audit report with findings grouped by severity, root cause analysis, PoC code, and fix recommendations.
/scan <contract>
Purpose: Fast 15–20 minute vulnerability scan for triage or contest warm-up.
| Parameter |
Required |
Example |
Description |
<target> |
Yes |
Token.sol |
Contract file to scan |
--focus |
No |
reentrancy, access |
Narrow scan to specific area |
Skills invoked: solidity-scanner/workflows/quick-scan → severity/SKILL.md
Example:
/scan src/LendingPool.sol --focus reentrancy
Output: Prioritized list of potential vulnerabilities with severity estimates and quick-fix suggestions.
/checklist <protocol-type>
Purpose: Load a protocol-specific security checklist.
| Parameter |
Required |
Example |
Description |
<type> |
Yes |
erc20, erc4626, amm, lending, bridge |
Protocol or token standard |
--format |
No |
markdown, interactive |
Output format |
Available checklists:
| Type |
Description |
Items |
erc20 |
ERC-20 token compliance + security |
Transfer, approval, supply checks |
erc721 |
NFT contract security |
Minting, ownership, royalty checks |
erc4626 |
Tokenized vault security |
Share math, first depositor, inflation |
amm |
Automated market maker |
Slippage, oracle, MEV, pool manipulation |
lending |
Lending protocol |
Liquidation, interest, collateral, oracle |
bridge |
Cross-chain bridge |
Message verification, replay, finality |
governance |
DAO governance |
Flash loan voting, quorum, timelock |
staking |
Staking contracts |
Reward calculation, withdrawal, unbonding |
proxy |
Upgradeable contracts |
Storage layout, initialization, access |
Skills invoked: checklists/ → protocol-specific checklist file
Example:
/checklist erc4626
/report
Purpose: Generate formatted audit report from collected findings.
| Parameter |
Required |
Example |
Description |
--format |
No |
markdown, pdf, json |
Report format (default: markdown) |
--template |
No |
standard, contest, client |
Report template |
--include-gas |
No |
flag |
Include gas optimization findings |
Skills invoked: report-writer/SKILL.md
Output structure:
1. Executive Summary
2. Scope and Methodology
3. Findings (Critical → High → Medium → Low → Informational)
4. Each finding: Title, Severity, Description, Impact, PoC, Recommendation
5. Appendix: Tool outputs, gas analysis
Example:
/report --format markdown --template contest
/severity <finding-description>
Purpose: Classify a finding's severity using structured criteria.
| Parameter |
Required |
Example |
Description |
<description> |
Yes |
"unchecked return value in withdraw" |
Brief description of the finding |
--context |
No |
"vault holds 10M USDC" |
Additional context for severity |
Skills invoked: severity/SKILL.md → scoring/SKILL.md
Assessment criteria applied:
- Impact: What can go wrong? (fund loss, DoS, governance)
- Likelihood: How likely is exploitation? (attacker cost, prerequisites)
- Scope: Who is affected? (single user, all users, protocol)
- Existing mitigations: Any guards already in place?
Example:
/severity "reentrancy in withdraw() allows drain" --context "vault holds 10M USDC"
Output: Severity rating (Critical/High/Medium/Low) with detailed justification and comparable historical findings.
/patterns <category>
Purpose: Browse the vulnerability pattern catalog for a specific category.
| Parameter |
Required |
Example |
Description |
<category> |
Yes |
reentrancy, oracle, access, token, math |
Pattern category |
--chain |
No |
solana, move |
Chain-specific patterns |
Available categories:
| Category |
Patterns Covered |
reentrancy |
Single, cross-function, cross-contract, read-only, ERC777, ERC721 |
oracle |
Spot price, stale price, reserve-based, circular dependency, decimal mismatch |
access |
Missing modifier, unprotected init, wrong role, delegatecall bypass |
token |
Fee-on-transfer, rebasing, non-standard decimals, approve race, blacklist |
math |
Rounding, first depositor, precision loss, overflow, fee calculation |
mev |
Sandwich, missing deadline, missing slippage, permit front-running |
signature |
Replay, malleable, missing nonce, missing chainId, ecrecover zero |
proxy |
Storage collision, uninitialized impl, UUPS missing guard, selector clash |
dos |
Unbounded loop, external call revert, griefing, self-destruct force-send |
Skills invoked: patterns/SKILL.md → variant-analysis/resources/variant-patterns.md
Example:
/patterns reentrancy
/chain-guide <chain>
Purpose: Load chain-specific security considerations and audit context.
| Parameter |
Required |
Example |
Description |
<chain> |
Yes |
ethereum, solana, move, cosmos |
Target chain |
--focus |
No |
gas, consensus, bridges |
Specific area within chain |
Supported chains:
| Chain |
Scanner |
Key Differences |
| Ethereum / EVM |
solidity-scanner/ |
Baseline — reentrancy, MEV, gas |
| Solana |
solana-scanner/ |
Account model, PDA, CPI, no reentrancy guard |
| Move (Aptos/Sui) |
move-scanner/ |
Resource model, abilities, module publish |
| Cairo (Starknet) |
cairo-scanner/ |
Felt252, storage proofs, Sierra |
| CosmWasm |
cosmos-scanner/ |
IBC, message handling, gas metering |
| Fuel (Sway) |
fuel-scanner/ |
UTXO, predicates, scripts |
| TON (FunC/Tact) |
ton-scanner/ |
Actor model, async messages, bouncing |
| Aztec (Noir) |
aztec-scanner/ |
Privacy, encrypted state, kernel proofs |
Skills invoked: chain-guides/ → chain-specific scanner SKILL.md
Example:
/chain-guide solana --focus accounts
/fix-review <finding-id>
Purpose: Review a proposed fix to verify it correctly addresses the vulnerability.
| Parameter |
Required |
Example |
Description |
<finding> |
Yes |
H-01, reentrancy in withdraw |
Finding ID or description |
--diff |
No |
fix-branch..main |
Git diff to review |
Skills invoked: fix-review/SKILL.md → variant-analysis/SKILL.md
Checks performed:
- Root cause addressed (not just symptom)
- No new vulnerabilities introduced
- All variant instances also fixed
- Edge cases covered
- Tests added for the vulnerability
- No regressions to existing functionality
Example:
/fix-review H-01 --diff fix/reentrancy..main
/variant <bug-description>
Purpose: Run variant analysis from a known bug to find all related instances.
| Parameter |
Required |
Example |
Description |
<description> |
Yes |
"reentrancy in withdraw()" |
Bug description to hunt variants for |
--scope |
No |
all, contract, module |
Search scope (default: all) |
Skills invoked: variant-analysis/SKILL.md → variant-analysis/workflows/variant-hunt.md
Example:
/variant "unchecked return value in transfer" --scope all
/exploit <protocol-name>
Purpose: Load historical exploit forensics for a protocol or exploit category.
| Parameter |
Required |
Example |
Description |
<name> |
Yes |
euler, curve, reentrancy |
Protocol name or exploit category |
Skills invoked: exploit-forensics/ → specific case study file
Example:
/exploit euler
Command Chaining
Commands can be logically chained for complex workflows:
/scan Vault.sol → Find initial vulnerabilities
/variant "reentrancy in withdraw()" → Find all variants
/severity "reentrancy across 3 functions" → Classify aggregate severity
/report --template contest → Generate contest submission
Error Handling
| Error |
Response |
| Unknown command |
Suggest closest matching command |
| Missing required parameter |
Prompt with parameter description and example |
| Unsupported chain |
List all supported chains |
| No findings found |
Report clean result with confidence level and areas covered |
| File not found |
Prompt for correct path with workspace file listing |
Resources
1---2name: commands3description: Structured command patterns for invoking audit capabilities through slash commands. Use when triggering /audit, /scan, /checklist, /report, /severity, /patterns, or other slash commands that map to underlying skills and load the correct context for each workflow.4---56# Commands Skill78## Purpose910Provides structured command patterns for invoking audit capabilities through the plugin. Each command maps to one or more underlying skills, loads the correct context, and executes the appropriate workflow.1112## Command Reference1314### `/audit <contract|directory>`1516**Purpose**: Run a full comprehensive security audit.1718| Parameter | Required | Example | Description |19|---|---|---|---|20| `<target>` | Yes | `Vault.sol`, `src/` | Contract file or directory to audit |21| `--chain` | No | `ethereum`, `arbitrum` | Target chain (default: ethereum) |22| `--type` | No | `defi`, `nft`, `bridge` | Protocol type for checklist selection |23| `--depth` | No | `quick`, `comprehensive` | Audit depth (default: comprehensive) |2425**Skills invoked**: `solidity-scanner` → `methodology/comprehensive-audit` → `checklists` → `report-writer`2627**Example**:28```29/audit src/Vault.sol --chain arbitrum --type defi30```3132**Output**: Full audit report with findings grouped by severity, root cause analysis, PoC code, and fix recommendations.3334---3536### `/scan <contract>`3738**Purpose**: Fast 15–20 minute vulnerability scan for triage or contest warm-up.3940| Parameter | Required | Example | Description |41|---|---|---|---|42| `<target>` | Yes | `Token.sol` | Contract file to scan |43| `--focus` | No | `reentrancy`, `access` | Narrow scan to specific area |4445**Skills invoked**: `solidity-scanner/workflows/quick-scan` → `severity/SKILL.md`4647**Example**:48```49/scan src/LendingPool.sol --focus reentrancy50```5152**Output**: Prioritized list of potential vulnerabilities with severity estimates and quick-fix suggestions.5354---5556### `/checklist <protocol-type>`5758**Purpose**: Load a protocol-specific security checklist.5960| Parameter | Required | Example | Description |61|---|---|---|---|62| `<type>` | Yes | `erc20`, `erc4626`, `amm`, `lending`, `bridge` | Protocol or token standard |63| `--format` | No | `markdown`, `interactive` | Output format |6465**Available checklists**:6667| Type | Description | Items |68|---|---|---|69| `erc20` | ERC-20 token compliance + security | Transfer, approval, supply checks |70| `erc721` | NFT contract security | Minting, ownership, royalty checks |71| `erc4626` | Tokenized vault security | Share math, first depositor, inflation |72| `amm` | Automated market maker | Slippage, oracle, MEV, pool manipulation |73| `lending` | Lending protocol | Liquidation, interest, collateral, oracle |74| `bridge` | Cross-chain bridge | Message verification, replay, finality |75| `governance` | DAO governance | Flash loan voting, quorum, timelock |76| `staking` | Staking contracts | Reward calculation, withdrawal, unbonding |77| `proxy` | Upgradeable contracts | Storage layout, initialization, access |7879**Skills invoked**: `checklists/` → protocol-specific checklist file8081**Example**:82```83/checklist erc462684```8586---8788### `/report`8990**Purpose**: Generate formatted audit report from collected findings.9192| Parameter | Required | Example | Description |93|---|---|---|---|94| `--format` | No | `markdown`, `pdf`, `json` | Report format (default: markdown) |95| `--template` | No | `standard`, `contest`, `client` | Report template |96| `--include-gas` | No | flag | Include gas optimization findings |9798**Skills invoked**: `report-writer/SKILL.md`99100**Output structure**:101```1021. Executive Summary1032. Scope and Methodology1043. Findings (Critical → High → Medium → Low → Informational)1054. Each finding: Title, Severity, Description, Impact, PoC, Recommendation1065. Appendix: Tool outputs, gas analysis107```108109**Example**:110```111/report --format markdown --template contest112```113114---115116### `/severity <finding-description>`117118**Purpose**: Classify a finding's severity using structured criteria.119120| Parameter | Required | Example | Description |121|---|---|---|---|122| `<description>` | Yes | "unchecked return value in withdraw" | Brief description of the finding |123| `--context` | No | "vault holds 10M USDC" | Additional context for severity |124125**Skills invoked**: `severity/SKILL.md` → `scoring/SKILL.md`126127**Assessment criteria applied**:1281. **Impact**: What can go wrong? (fund loss, DoS, governance)1292. **Likelihood**: How likely is exploitation? (attacker cost, prerequisites)1303. **Scope**: Who is affected? (single user, all users, protocol)1314. **Existing mitigations**: Any guards already in place?132133**Example**:134```135/severity "reentrancy in withdraw() allows drain" --context "vault holds 10M USDC"136```137138**Output**: Severity rating (Critical/High/Medium/Low) with detailed justification and comparable historical findings.139140---141142### `/patterns <category>`143144**Purpose**: Browse the vulnerability pattern catalog for a specific category.145146| Parameter | Required | Example | Description |147|---|---|---|---|148| `<category>` | Yes | `reentrancy`, `oracle`, `access`, `token`, `math` | Pattern category |149| `--chain` | No | `solana`, `move` | Chain-specific patterns |150151**Available categories**:152153| Category | Patterns Covered |154|---|---|155| `reentrancy` | Single, cross-function, cross-contract, read-only, ERC777, ERC721 |156| `oracle` | Spot price, stale price, reserve-based, circular dependency, decimal mismatch |157| `access` | Missing modifier, unprotected init, wrong role, delegatecall bypass |158| `token` | Fee-on-transfer, rebasing, non-standard decimals, approve race, blacklist |159| `math` | Rounding, first depositor, precision loss, overflow, fee calculation |160| `mev` | Sandwich, missing deadline, missing slippage, permit front-running |161| `signature` | Replay, malleable, missing nonce, missing chainId, ecrecover zero |162| `proxy` | Storage collision, uninitialized impl, UUPS missing guard, selector clash |163| `dos` | Unbounded loop, external call revert, griefing, self-destruct force-send |164165**Skills invoked**: `patterns/SKILL.md` → `variant-analysis/resources/variant-patterns.md`166167**Example**:168```169/patterns reentrancy170```171172---173174### `/chain-guide <chain>`175176**Purpose**: Load chain-specific security considerations and audit context.177178| Parameter | Required | Example | Description |179|---|---|---|---|180| `<chain>` | Yes | `ethereum`, `solana`, `move`, `cosmos` | Target chain |181| `--focus` | No | `gas`, `consensus`, `bridges` | Specific area within chain |182183**Supported chains**:184185| Chain | Scanner | Key Differences |186|---|---|---|187| Ethereum / EVM | `solidity-scanner/` | Baseline — reentrancy, MEV, gas |188| Solana | `solana-scanner/` | Account model, PDA, CPI, no reentrancy guard |189| Move (Aptos/Sui) | `move-scanner/` | Resource model, abilities, module publish |190| Cairo (Starknet) | `cairo-scanner/` | Felt252, storage proofs, Sierra |191| CosmWasm | `cosmos-scanner/` | IBC, message handling, gas metering |192| Fuel (Sway) | `fuel-scanner/` | UTXO, predicates, scripts |193| TON (FunC/Tact) | `ton-scanner/` | Actor model, async messages, bouncing |194| Aztec (Noir) | `aztec-scanner/` | Privacy, encrypted state, kernel proofs |195196**Skills invoked**: `chain-guides/` → chain-specific scanner `SKILL.md`197198**Example**:199```200/chain-guide solana --focus accounts201```202203---204205### `/fix-review <finding-id>`206207**Purpose**: Review a proposed fix to verify it correctly addresses the vulnerability.208209| Parameter | Required | Example | Description |210|---|---|---|---|211| `<finding>` | Yes | `H-01`, `reentrancy in withdraw` | Finding ID or description |212| `--diff` | No | `fix-branch..main` | Git diff to review |213214**Skills invoked**: `fix-review/SKILL.md` → `variant-analysis/SKILL.md`215216**Checks performed**:2171. Root cause addressed (not just symptom)2182. No new vulnerabilities introduced2193. All variant instances also fixed2204. Edge cases covered2215. Tests added for the vulnerability2226. No regressions to existing functionality223224**Example**:225```226/fix-review H-01 --diff fix/reentrancy..main227```228229---230231### `/variant <bug-description>`232233**Purpose**: Run variant analysis from a known bug to find all related instances.234235| Parameter | Required | Example | Description |236|---|---|---|---|237| `<description>` | Yes | "reentrancy in withdraw()" | Bug description to hunt variants for |238| `--scope` | No | `all`, `contract`, `module` | Search scope (default: all) |239240**Skills invoked**: `variant-analysis/SKILL.md` → `variant-analysis/workflows/variant-hunt.md`241242**Example**:243```244/variant "unchecked return value in transfer" --scope all245```246247---248249### `/exploit <protocol-name>`250251**Purpose**: Load historical exploit forensics for a protocol or exploit category.252253| Parameter | Required | Example | Description |254|---|---|---|---|255| `<name>` | Yes | `euler`, `curve`, `reentrancy` | Protocol name or exploit category |256257**Skills invoked**: `exploit-forensics/` → specific case study file258259**Example**:260```261/exploit euler262```263264---265266## Command Chaining267268Commands can be logically chained for complex workflows:269270```271/scan Vault.sol → Find initial vulnerabilities272/variant "reentrancy in withdraw()" → Find all variants273/severity "reentrancy across 3 functions" → Classify aggregate severity274/report --template contest → Generate contest submission275```276277## Error Handling278279| Error | Response |280|---|---|281| Unknown command | Suggest closest matching command |282| Missing required parameter | Prompt with parameter description and example |283| Unsupported chain | List all supported chains |284| No findings found | Report clean result with confidence level and areas covered |285| File not found | Prompt for correct path with workspace file listing |286287## Resources288- [Implementation Guide](resources/implementation-guide.md)