Pump shell scripts

From x402agent/solana-clawd · View interactive version

Pump shell scripts is an AI agent skill from the GitHub repository x402agent/solana-clawd. Production-quality Bash scripts for Solana vanity generation, keypair verification, batch operations, dependency auditing, and test orchestration — with security-hardened patterns including file permissions, input validation, and cleanup traps.

How to use this skill

Skill file

Shell Scripting & CLI Tools — Production Bash Scripts

Production-quality Bash scripts for vanity generation, keypair verification, batch operations, dependency auditing, and test orchestration with security-hardened patterns.

Scripts Overview

| Script | Purpose |

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

| scripts/utils.sh | Shared library (colors, logging, validation, cleanup) |

| scripts/generate-vanity.sh | Vanity address generation via solana-keygen |

| scripts/batch-generate.sh | Parallel batch generation |

| scripts/verify-keypair.sh | 7-point keypair verification |

| scripts/test-rust.sh | 10-step Rust test orchestration |

| tools/audit-dependencies.sh | Dependency security audit |

| tools/check-file-permissions.sh | File permission validation |

| tools/verify-keypair.ts | TypeScript 9-point verifier |

Keypair Verification (7 Points)

verify_keypair() {
    # 1. File exists
    # 2. Valid JSON array
    # 3. Exactly 64 bytes
    # 4. File permissions are 0600
    # 5. solana-keygen verify passes
    # 6. Public key matches filename
    # 7. Re-derive public key from secret matches
}

Security Patterns

# Cleanup trap
trap 'cleanup_temp_files' EXIT ERR INT TERM

# File permissions
chmod 600 "$keypair_file"

# Input validation
validate_base58() {
    [[ "$1" =~ ^[1-9A-HJ-NP-Za-km-z]+$ ]] || die "Invalid Base58"
}

# No shell injection
# Use "$var" (quoted) everywhere, never $var

Makefile Integration

| Target | Description |

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

| make test-rust | Run Rust test suite |

| make bench | Run Criterion benchmarks |

| make generate | Generate a vanity address |

| make verify | Verify a keypair file |

| make audit | Audit dependencies |

Patterns to Follow

Common Pitfalls

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.