Back to list
Optima-Financial

smart-contract-auditor

by Optima-Financial

Claude Code skills for microservices architecture, Optima platform implementation, and critical thinking

0🍴 0📅 Jan 22, 2026

SKILL.md


name: smart-contract-auditor description: Security auditor for smart contracts - identifies vulnerabilities, logic flaws, reentrancy, access control issues, MEV/economic attacks, and oracle manipulation. Use when auditing Solidity, Vyper, or Rust/Anchor contracts, reviewing PRs for security issues, checking for exploits, or analyzing DeFi protocols. Triggers on "audit", "security review", "vulnerability", "exploit", "reentrancy", "access control", "MEV", "frontrunning".

Smart Contract Auditor

Security auditor for smart contracts. Grounds all findings in actual code, identifies vulnerabilities and economic risks, and proposes minimal safe fixes with tests.

When to Use

  • Auditing smart contracts for security vulnerabilities
  • Reviewing PRs that modify contract code
  • Checking for exploits before deployment
  • Analyzing DeFi protocol risks
  • Investigating suspicious contract behavior
  • Pre-deployment security review

On Every Invocation

1. Detect Stack & Layout

Identify the smart contract framework and structure:

FrameworkIndicators
Foundryfoundry.toml, src/, forge
Hardhathardhat.config.js/ts, contracts/
Truffletruffle-config.js, migrations/
Anchor (Rust)Anchor.toml, programs/
Vyper.vy files

Map: contract directories, core contracts, libraries, test folders, deployment scripts.

2. Scan Recent Changes

# Check current state
git status

# View uncommitted changes in contracts
git diff -- "**/contracts/**" "**/src/**" "**/*.sol" "**/*.vy"

# Last 20 commits affecting contracts
git log --oneline -20 -- "**/contracts/**" "**/src/**" "**/*.sol"

Summarize security-relevant changes (new external calls, auth changes, token handling).

3. Build Contract Map

For each contract document:

  • Purpose: What it does
  • Trust boundaries: Owner/admin roles, upgrade authority
  • External interactions: Calls to other contracts, oracles, DEXs
  • Value flows: Token transfers, ETH handling

4. Structured Audit Pass

Run the AUDIT_CHECKLIST.md on:

  • All touched contracts (from git diff)
  • High-risk contracts (upgradeable, handles funds, external calls)

Output Format

Structure findings as:

## A) Scope Scanned
- Paths and contracts reviewed
- Commit range / diff analyzed

## B) High Severity Issues
For each:
- Vulnerability description
- Exploit scenario (step-by-step attack)
- Impacted functions
- Recommended fix

## C) Medium Severity Issues
[Same format as High]

## D) Low / Informational
[Brief description + recommendation]

## E) Suggested Patches
Step-by-step code edits with before/after

## F) Test Cases
Tests to verify fixes and prevent regression

Severity Classification

SeverityCriteria
HighDirect fund loss, privilege escalation, contract bricking
MediumConditional fund loss, griefing, DoS, value leakage
LowGas inefficiency, code quality, best practice violations
InfoSuggestions, documentation, style

Quick Checklist Reference

See AUDIT_CHECKLIST.md for the complete checklist. Key categories:

  • Access Control
  • Reentrancy
  • Arithmetic/Precision
  • Oracle/Price Manipulation
  • MEV/Economic Attacks
  • Upgradability
  • Signature Schemes
  • Token Handling
  • DoS/Gas
  • Chain Assumptions
  • Events & Monitoring
  • Invariants

Resources

Score

Total Score

60/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon