Agent skill

Audit Depth Analysis

by ccashwell in ccashwell/evm-cortex

A skill your agent uses when performing deep analysis of specific findings or high-risk areas during a security audit.

MITAuto-check passedSecurity

Install Audit Depth Analysis

skills CLI
$ npx skills add ccashwell/evm-cortex --skill audit-depth-analysis -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ccashwell/evm-cortex audit-depth-analysis --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ccashwell/evm-cortex.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/audit-depth-analysis .claude/skills/audit-depth-analysis && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
audit-depth-analysis
GitHub stars
131
Token cost
~1.6k tokens
SKILL.md length
137 words
Files
1
Skills in repo
89
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when performing deep analysis of specific findings or high-risk areas during a security audit.

  • Works in 5 steps: State Trace Analysis → Token Flow Tracing → Edge Case Enumeration → …
  • Performing deep analysis of specific findings
  • SKILL.md covers When to Use, Depth Analysis Techniques, Depth Analysis Framework and Checklist
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Audit Depth Analysis is an agent skill from ccashwell/evm-cortex. Use when performing deep analysis of specific findings or high-risk areas during a security audit. Covers state trace analysis, token flow tracing, edge case enumeration, cross-contract interaction analysis, invariant verification, and economic incentive analysis.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Security, covering Security review. The repository describes itself as: Ethereum protocol engineering squad for AI coding assistants. The licence is MIT.

When your agent uses it

  • Performing deep analysis of specific findings
  • High-risk areas during a security audit

Example prompts

  • “/audit-depth-analysis”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. State Trace Analysis
  2. Token Flow Tracing
  3. Edge Case Enumeration
  4. Cross-Contract Interaction Analysis
  5. Economic Incentive Analysis

What it can do on your machine

Read from SKILL.md and the folder at commit f8f3301. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Audit Depth Analysis loads about 1.6k tokens when it runs. Until then it costs about 71 tokens; SKILL.md has 137 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~71
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ccashwell/evm-cortex at commit f8f3301, republished under its MIT licence (© ccashwell). 137 words, ~1,605 tokens.

Download SKILL.mdSave it as .claude/skills/audit-depth-analysis/SKILL.md (or your agent's skills folder).
name
audit-depth-analysis
description
Use when performing deep analysis of specific findings or high-risk areas during a security audit. Covers state trace analysis, token flow tracing, edge case enumeration, cross-contract interaction analysis, invariant verification, and economic incentive analysis.

Audit Depth Analysis

When to Use

Depth analysis is applied to specific leads identified during breadth scanning. Each lead gets focused attention from one or more depth analysis techniques.

Depth Analysis Techniques

1. State Trace Analysis

Trace state changes through a function to find inconsistencies:

markdown
## State Trace: Vault.withdraw()

### Entry State
- totalAssets: 1,000,000 USDC
- totalSupply: 900,000 shares
- user.shares: 100,000
- strategy.deployed: 800,000 USDC
- vault.idle: 200,000 USDC

### Execution Trace
1. shares = previewWithdraw(assets)           // shares = 90,000
2. _spendAllowance(owner, msg.sender, shares) // approval check
3. _burn(owner, shares)                       // totalSupply: 810,000
4. strategy.withdraw(assets - idle)           // ← EXTERNAL CALL
5. token.transfer(receiver, assets)           // ← EXTERNAL CALL

### Post State
- totalAssets: 900,000 USDC
- totalSupply: 810,000 shares

### Issues Found
- Step 4: External call to strategy BEFORE state is finalized
  - If strategy.withdraw() calls back into vault → reentrancy
  - Mitigation: ReentrancyGuard present ✓
- Step 3→4: _burn reduces totalSupply before strategy withdrawal
  - If strategy.withdraw() reads totalSupply → stale value
  - Impact: share price temporarily inflated during callback
2. Token Flow Tracing

Track every token movement to find value leaks:

markdown
## Token Flow: deposit() -> harvest() -> withdraw()

### deposit(100 USDC)
| From | To | Amount | Token |
|------|-----|--------|-------|
| User | Vault | 100 USDC | USDC |
| Vault | User | 100 shares | Vault Share |

### harvest()
| From | To | Amount | Token |
|------|-----|--------|-------|
| Aave | Strategy | 5 USDC (yield) | USDC |
| Strategy | Vault | 5 USDC | USDC |
| Vault | Treasury | 0.5 USDC (10% fee) | USDC |

### withdraw(all)
| From | To | Amount | Token |
|------|-----|--------|-------|
| User | Vault | 100 shares | Vault Share (burned) |
| Vault | User | 104.5 USDC | USDC |

### Accounting Check
In:  100 USDC (user) + 5 USDC (yield) = 105 USDC
Out: 104.5 USDC (user) + 0.5 USDC (treasury) = 105 USDC ✓
3. Edge Case Enumeration

Systematically enumerate boundary conditions:

markdown
## Edge Cases: Vault.deposit()

### Zero/Min Values
- deposit(0) → should revert or return 0 shares
- deposit(1) → might round to 0 shares → value lost
- deposit(1) when totalAssets is very large → 0 shares (dust attack)

### Max Values
- deposit(type(uint256).max) → overflow in share calculation?
- deposit when totalSupply near type(uint256).max → overflow?

### First/Last Operations
- First deposit (totalSupply == 0) → initial share price
- First deposit attack (donate + deposit 1 wei)
- Last withdrawal (totalSupply → 0) → dust remaining

### Concurrent Operations
- Deposit during harvest → share price changes mid-tx?
- Deposit + donate in same tx → price manipulation
- Multiple deposits in same block → frontrunning

### External State
- Deposit when token is paused (USDC blacklist)
- Deposit when oracle is stale
- Deposit after strategy loss (totalAssets < totalSupply)
4. Cross-Contract Interaction Analysis
markdown
## Cross-Contract: Vault <-> Strategy <-> Aave

### Call Chain
Vault.withdraw() → Strategy.withdraw() → Aave.withdraw() → USDC.transfer()

### Trust Assumptions at Each Boundary
1. Vault trusts Strategy return values → what if Strategy lies?
   - Strategy reports more deployed than actual → withdrawal fails
   - Strategy reports less deployed → some funds stuck

2. Strategy trusts Aave withdrawal amount → what if Aave gives less?
   - Slippage on Aave withdrawal (not normal, but possible)
   - Aave paused → Strategy.withdraw() reverts → user stuck

3. USDC.transfer → what if USDC blacklists vault?
   - All withdrawals fail
   - Mitigation: emergency mode to switch tokens?

### Reentrancy Paths
Vault → Strategy → Aave → [callback?] → Vault
- Aave V3 does not have callback reentrancy → safe
- But if Strategy uses other protocols with callbacks → check
5. Economic Incentive Analysis
markdown
## Economic Analysis: Share Price Manipulation

### Attack: First Depositor Inflation
1. Attacker deposits 1 wei → gets 1 share
2. Attacker sends 1,000,000 USDC directly to vault
3. Share price: 1,000,000 USDC / 1 share
4. Victim deposits 999,999 USDC → gets 0 shares (rounded down)
5. Attacker redeems 1 share → gets ~2,000,000 USDC

**Mitigation Check**: Virtual shares offset present?
- VIRTUAL_SHARES = 1e3 → attack cost = 1e3 * donation = 1e9 USDC
- Cost exceeds profit → mitigated ✓

### Attack: Sandwich Vault Deposit
1. Attacker front-runs large deposit with donation
2. Donation inflates share price
3. Victim gets fewer shares
4. Attacker has no direct way to profit → not viable ✓

### Attack: Flash Loan Price Manipulation
1. Flash borrow large amount
2. Manipulate oracle price
3. Deposit at favorable rate
4. Oracle returns to normal
5. Withdraw at inflated rate

**Mitigation Check**: Oracle uses TWAP or Chainlink? Time-weighted = resistant ✓

Depth Analysis Framework

markdown
## Depth Report: [Finding ID]

### Observation
What was observed during breadth scan

### Hypothesis
What could go wrong

### Analysis
Detailed investigation using techniques above

### Proof of Concept
[Reference to PoC test or step-by-step]

### Conclusion
- Confirmed vulnerability, OR
- False positive (explain why), OR
- Informational finding

### Severity (if confirmed)
Impact: [Critical | High | Medium | Low]
Likelihood: [High | Medium | Low]
Overall: Impact × Likelihood

Checklist

  • Each breadth-scan lead has a depth analysis entry
  • State traces cover all state-changing paths
  • Token flows balance (in == out + fees)
  • Edge cases enumerated for zero, min, max, first, last
  • Cross-contract trust assumptions documented
  • Economic incentives analyzed for attack profitability
  • Reentrancy paths traced through all external calls
  • Findings classified as confirmed, false positive, or informational
  • Each confirmed finding has severity + rationale

© ccashwell, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/audit-depth-analysis of ccashwell/evm-cortex.

Open the folder on GitHubat commit f8f3301

Compare with similar skills

Audit Depth Analysis next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Audit Depth Analysis compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Audit Depth Analysis this skillccashwell/evm-cortex131—~1.6kAutomated safety check: PassMIT
Deepsec Documentation Guidevercel-labs/deepsec8.1k—~956Automated safety check: PassApache-2.0
Kubernetes Network Security Auditkubeshark/kubeshark12k—~7.3kAutomated safety check: NotesApache-2.0
Agentlas Security Scanagentlas-ai/Agentlas-OS1.6k1 repos~822Automated safety check: PassApache-2.0
Native Dependency Updatemono/SkiaSharp5.6k—~4.1kAutomated safety check: PassMIT
Semgrep Security Scantrailofbits/skills7.4k—~3.7kAutomated safety check: NotesCC-BY-SA-4.0

Similar skills

  • Deepsec Documentation Guide

    vercel-labs/deepsec

    Official

    Points the agent at deepsec's own docs to answer questions about initializing, configuring, resuming, scanning with and extending the vulnerability scanner.

    8.1k GitHub stars~956 tokensUpdated 9 days ago
    SecurityAuto-check passed
  • Hunts for compromised workloads and malicious traffic in a Kubernetes cluster by sweeping network data through Kubeshark MCP, mapped to MITRE ATT&CK.

    12k GitHub stars~7.3k tokensUpdated yesterday
    SecurityAuto-check: notes
  • Agentlas Security Scan

    agentlas-ai/Agentlas-OS

    A skill your agent uses when an agent folder must pass the Agentlas Cloud 2-stage security scan (static rules + BYOK LLM judgment) before private sync or public publish, or when asked to…

    1.6k GitHub starsUsed in 1 repo~822 tokens
    SecurityAuto-check passed
  • Update native dependencies (libpng, libexpat, zlib, libwebp, harfbuzz, freetype, libjpeg-turbo, etc.) in SkiaSharp's Skia fork.

    5.6k GitHub stars~4.1k tokensUpdated today
    SecurityAuto-check passed
  • Semgrep Security Scan

    trailofbits/skills

    Official

    Detects languages, proposes rulesets for approval, then runs the approved Semgrep scan across a codebase and merges the output into one SARIF file.

    7.4k GitHub stars~3.7k tokensUpdated yesterday
    SecurityAuto-check: notes
  • Skillward Audit

    Fangcun-AI/SkillWard

    Security-audit a third-party skill bundle (folder with SKILL.md, or .zip / .tar.gz archive) before installing it, using the SkillWard cloud scanner.

    143 GitHub stars~2.9k tokensUpdated 2 mo ago
    SecurityAuto-check passed

More from ccashwell/evm-cortex

All 89 skills in this repo
  • Xray Pre Audit

    ccashwell/evm-cortex

    A skill your agent uses when preparing for a security audit, performing reconnaissance on a new codebase, or creating a protocol overview.

    131 GitHub stars~25k tokensUpdated 8 days ago
    Auto-check passed
  • Aave Integration

    ccashwell/evm-cortex

    A skill your agent uses when integrating with Aave V3 for lending, borrowing, flash loans, or building on top of Aave markets.

    131 GitHub stars~1.3k tokensUpdated 8 days ago
    Auto-check passed
  • Access Control Patterns

    ccashwell/evm-cortex

    Access control design patterns for Solidity protocols. An agent skill from ccashwell/evm-cortex.

    131 GitHub stars~1.8k tokensUpdated 8 days ago
    Auto-check passed
  • Anvil Patterns

    ccashwell/evm-cortex

    A skill your agent uses when running a local Ethereum node with Anvil.

    131 GitHub stars~1.3k tokensUpdated 8 days ago
    Auto-check passed
  • Audit Breadth Scan

    ccashwell/evm-cortex

    A skill your agent uses when performing systematic breadth-first review of all contracts during a security audit.

    131 GitHub stars~1.4k tokensUpdated 8 days ago
    Auto-check passed
  • Audit Prep

    ccashwell/evm-cortex

    A skill your agent uses when preparing a codebase for security audit.

    131 GitHub stars~1.4k tokensUpdated 8 days ago
    Auto-check passed

Categories

Questions about Audit Depth Analysis

What does Audit Depth Analysis do?

A skill your agent uses when performing deep analysis of specific findings or high-risk areas during a security audit. Audit Depth Analysis is an agent skill from ccashwell/evm-cortex. Use when performing deep analysis of specific findings or high-risk areas during a security audit.

When should I use Audit Depth Analysis?

Audit Depth Analysis fits situations like: performing deep analysis of specific findings; high-risk areas during a security audit.

How do I install Audit Depth Analysis in Claude Code?

Run `npx skills add ccashwell/evm-cortex --skill audit-depth-analysis -a claude-code`. Or copy the skill folder (skills/audit-depth-analysis in ccashwell/evm-cortex) into .claude/skills/audit-depth-analysis in your project. Claude Code loads it when a task matches its description.

How do I install Audit Depth Analysis in Codex?

Run `npx skills add ccashwell/evm-cortex --skill audit-depth-analysis -a codex`. Or copy the skill folder (skills/audit-depth-analysis in ccashwell/evm-cortex) into .agents/skills/audit-depth-analysis in your project. Codex loads it when a task matches its description.

Can I use Audit Depth Analysis in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ccashwell/evm-cortex --skill audit-depth-analysis -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/audit-depth-analysis, .gemini/skills/audit-depth-analysis, .github/skills/audit-depth-analysis and .opencode/skills/audit-depth-analysis in your project.

What does Audit Depth Analysis need to run?

SKILL.md names no scripts, command-line tools or credentials: Audit Depth Analysis is instructions for the agent only.

Does Audit Depth Analysis access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Audit Depth Analysis safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Audit Depth Analysis use?

Audit Depth Analysis is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Audit Depth Analysis use?

About 1.6k tokens (SKILL.md is roughly 6.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Audit Depth Analysis?

Skills that share tags, products or a category with Audit Depth Analysis: Deepsec Documentation Guide (vercel-labs/deepsec, 8.1k stars), Kubernetes Network Security Audit (kubeshark/kubeshark, 12k stars), Agentlas Security Scan (agentlas-ai/Agentlas-OS, 1.6k stars) and Native Dependency Update (mono/SkiaSharp, 5.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Audit Depth Analysis?

ccashwell (a GitHub user) maintains it in ccashwell/evm-cortex, which has 131 GitHub stars. The repository holds 89 skills in this directory. The repository was last updated on September 30, 2026.

Source: ccashwell/evm-cortex on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.