Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔗 Blockchain Engineer Agent

A full-stack blockchain development agent powered by the Claude Agent SDK. This agent provides expert guidance on smart contract development, blockchain architecture, security auditing, and decentralized application (dApp) implementation across multiple blockchain platforms.

✨ Features

  • Multi-Platform Support: Ethereum, Solana, Polygon, Arbitrum, Optimism, BSC, NEAR, and more
  • Smart Contract Development: Solidity, Rust, Vyper, Move
  • Security Auditing: Comprehensive vulnerability detection and best practices
  • Gas Optimization: Expert techniques for reducing transaction costs
  • DeFi Expertise: AMMs, lending protocols, staking, yield farming
  • NFT Standards: ERC-721, ERC-1155, royalty systems
  • Web3 Integration: ethers.js, web3.js, wagmi integration guidance

🚀 Quick Start

Prerequisites

Installation

  1. Install dependencies:

    npm install
  2. Set up your API key:

    cp .env.example .env

    Then edit .env and add your Anthropic API key:

    ANTHROPIC_API_KEY=your-actual-api-key-here
    
  3. Run the agent:

    npm start

Usage Examples

Example 1: Get started with blockchain development

npm start

This runs the default example that provides an overview of dApp development on Ethereum.

Example 2: Audit a smart contract

npm start "<task_type>audit</task_type>
<blockchain_platform>ethereum</blockchain_platform>
<context>Please audit this ERC-20 token contract for security vulnerabilities</context>
<code>
// Your Solidity code here
</code>"

Example 3: Design a blockchain architecture

npm start "<task_type>architecture</task_type>
<blockchain_platform>ethereum</blockchain_platform>
<context>Design a scalable NFT marketplace with royalty distribution</context>"

🛠️ Development

Type Checking

Run TypeScript type checking:

npm run typecheck

Project Structure

Blockchain-Engineer/
├── src/
│   └── index.ts          # Main agent implementation
├── .env.example          # Environment variable template
├── .gitignore           # Git ignore rules
├── package.json         # Project dependencies
├── tsconfig.json        # TypeScript configuration
└── README.md           # This file

📋 Agent Capabilities

The Blockchain Engineer agent can help with:

Smart Contract Development

  • Write secure, gas-optimized smart contracts
  • Implement token standards (ERC-20, ERC-721, ERC-1155, etc.)
  • Build DeFi protocols and mechanisms
  • Create DAO governance systems

Security Auditing

  • Identify common vulnerabilities (reentrancy, front-running, etc.)
  • Access control validation
  • Oracle manipulation detection
  • Flash loan attack prevention

Optimization

  • Gas optimization techniques
  • Storage pattern optimization
  • Batch processing strategies
  • Upgrade mechanisms (UUPS, Transparent Proxy)

Architecture & Integration

  • Blockchain platform selection
  • Layer 2 solution recommendations
  • Cross-chain bridge design
  • Web3 frontend integration

🔧 Configuration

API Key Options

The agent supports multiple API providers:

  • Anthropic API (default): Set ANTHROPIC_API_KEY
  • Amazon Bedrock: Set CLAUDE_CODE_USE_BEDROCK=1 and configure AWS credentials
  • Google Vertex AI: Set CLAUDE_CODE_USE_VERTEX=1 and configure Google Cloud credentials
  • Microsoft Foundry: Set CLAUDE_CODE_USE_FOUNDRY=1 and configure Azure credentials

Agent Options

You can customize the agent behavior in src/index.ts:

{
  systemPrompt: BLOCKCHAIN_ENGINEER_PROMPT,  // Custom system prompt
  allowedTools: [...],                       // Available tools
  model: "claude-sonnet-4-5-20250929",      // Claude model
  permissionMode: "bypassPermissions",       // Permission handling
  maxBudgetUsd: 1.0,                        // Budget limit
}

📖 Input Format

When interacting with the agent, structure your requests as:

<task_type>
[audit | develop | optimize | architecture | debug | explain]
</task_type>

<blockchain_platform>
[ethereum | solana | polygon | arbitrum | optimism | etc.]
</blockchain_platform>

<context>
[Describe your project or problem]
</context>

<code>
[Optional: Your smart contract code]
</code>

<specific_requirements>
[Optional: Specific requirements or constraints]
</specific_requirements>

📚 Resources

⚠️ Security Notice

This agent provides security guidance and recommendations, but:

  • Always conduct professional audits for production smart contracts
  • Test thoroughly on testnets before mainnet deployment
  • Never deploy contracts handling real funds without comprehensive testing
  • The agent's suggestions should be validated by experienced developers

📝 License

ISC

🤝 Contributing

This is a personal blockchain development agent. Feel free to fork and customize for your own needs!


Built with ❤️ using the Claude Agent SDK

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages