Auditing wallet security

From jeremylongshore/claude-code-plugins-plus-skills · View interactive version

Auditing wallet security is an AI agent skill from the GitHub repository jeremylongshore/claude-code-plugins-plus-skills. Audit wallet security by analyzing token approvals, permissions, and transaction patterns. Use when checking wallet security, reviewing approvals, or assessing risk exposure. Trigger with phrases like "audit wallet", "check approvals", "security scan", or "revoke tokens".

How to use this skill

Skill file

Wallet Security Auditor

Overview

Security analysis tool for cryptocurrency wallets. Scans ERC20 token approvals, analyzes transaction patterns, calculates security risk scores, and provides actionable recommendations to improve wallet security.

Important: This is a read-only analysis tool. It does NOT execute transactions, manage private keys, or perform revocations.

Prerequisites

Before using this skill, ensure you have:

Instructions

1. List Token Approvals

Scan wallet for all active ERC20 token approvals:

cd ${CLAUDE_SKILL_DIR}/scripts
python wallet_auditor.py approvals <address> --chain <chain>

Options:

  1. --chain: ethereum, bsc, polygon, arbitrum, optimism, base (default: ethereum)
  2. --unlimited: Show only unlimited approvals
  3. --verbose: Detailed output

2. Full Security Scan

Comprehensive security analysis including approvals, transaction history, and patterns:

python wallet_auditor.py scan <address> --verbose

Analyzes:

  1. Active token approvals (unlimited, risky)
  2. Transaction history patterns
  3. Contract interactions (verified vs unverified)
  4. Suspicious activity detection

3. Calculate Security Score

Get weighted security risk score (0-100, higher = safer):

python wallet_auditor.py score <address>
python wallet_auditor.py score <address> --json  # JSON output

Score components:

  1. Approvals (40%): Unlimited, risky, stale approvals
  2. Interactions (30%): Contract verification, flagged addresses
  3. Patterns (20%): Transaction frequency, diversity
  4. Age (10%): Wallet maturity

Risk levels:

  1. 90-100: SAFE
  2. 70-89: LOW
  3. 50-69: MEDIUM
  4. 30-49: HIGH
  5. 0-29: CRITICAL

4. Analyze Transaction History

Review recent contract interactions and patterns:

python wallet_auditor.py history <address> --days 30

Detects:

  1. Rapid approval patterns
  2. Interaction bursts (many contracts in short time)
  3. High failure rates
  4. Dust attacks

5. Generate Revoke List

Get prioritized list of approvals to revoke:

python wallet_auditor.py revoke-list <address>

Flags:

  1. Unlimited approvals to unknown contracts
  2. Risky/flagged spenders
  3. Stale approvals (>6 months)

6. Generate Full Report

Create comprehensive security audit report:

python wallet_auditor.py report <address> --output report.txt
python wallet_auditor.py report <address> --json  # JSON format

7. List Supported Chains

python wallet_auditor.py chains

Output

Security Score Report

╔═══════════════════════════════════════════════════════════════════╗
║                    WALLET SECURITY SCORE                          ║
╠═══════════════════════════════════════════════════════════════════╣
║  Overall Score:  [████████████████····] 82/100                    ║
║  Risk Level:     🟢 LOW                                           ║
╠═══════════════════════════════════════════════════════════════════╣
║  Component Scores:                                                ║
║    Approvals:     [██████████████······] 70/100                   ║
║    Interactions:  [██████████████████··] 90/100                   ║
║    Patterns:      [████████████████████] 100/100                  ║
╚═══════════════════════════════════════════════════════════════════╝

Approval Summary

Risk Factors

Recommendations

Error Handling

See CODE0 for comprehensive error handling:

| Error | Cause | Solution |

|-------|-------|----------|

| Address validation failed | Invalid format | Use 0x + 40 hex characters |

| RPC timeout | Node unresponsive | Retry or use different RPC |

| Rate limited | Too many requests | Add ETHERSCAN_API_KEY |

| No approvals found | Wallet clean | Normal - no action needed |

Examples

See CODE0 for detailed examples.

Quick Security Check

# Check wallet approvals
python wallet_auditor.py approvals 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045

# Full security scan
python wallet_auditor.py scan 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 --verbose

# Get security score
python wallet_auditor.py score 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045

# Check other chains
python wallet_auditor.py approvals 0x... --chain polygon
python wallet_auditor.py approvals 0x... --chain arbitrum

Generate Audit Report

# Text report
python wallet_auditor.py report 0x... --output security_audit.txt

# JSON for integration
python wallet_auditor.py report 0x... --json --output audit.json

Resources

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.