feat: Enhanced Claude Code configuration with comprehensive best practices
- Updated project CLAUDE.md with detailed commands, workflows, and guidelines - Added environment configuration and performance monitoring commands - Enhanced security guidelines and commit message conventions - Created 5 custom slash commands for common MEV bot development tasks: * /analyze-performance - Comprehensive performance analysis * /debug-issue - Structured debugging workflow * /implement-feature - Feature implementation framework * /security-audit - Security audit checklist * /optimize-performance - Performance optimization strategy - Updated global CLAUDE.md with universal best practices - Improved file organization and development standards 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
34
.claude/commands/analyze-performance.md
Normal file
34
.claude/commands/analyze-performance.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# Analyze Performance Issues
|
||||
|
||||
Perform a comprehensive performance analysis of the MEV bot: $ARGUMENTS
|
||||
|
||||
## Analysis Steps:
|
||||
1. **Memory Profiling**: Check for memory leaks and high allocation patterns
|
||||
2. **CPU Profiling**: Identify CPU bottlenecks and hot paths
|
||||
3. **Goroutine Analysis**: Look for goroutine leaks and blocking operations
|
||||
4. **I/O Performance**: Analyze network and disk I/O patterns
|
||||
5. **Concurrency Issues**: Check for race conditions and lock contention
|
||||
|
||||
## Performance Commands to Run:
|
||||
```bash
|
||||
# Memory profile
|
||||
go tool pprof http://localhost:9090/debug/pprof/heap
|
||||
|
||||
# CPU profile
|
||||
go tool pprof http://localhost:9090/debug/pprof/profile?seconds=30
|
||||
|
||||
# Goroutine analysis
|
||||
go tool pprof http://localhost:9090/debug/pprof/goroutine
|
||||
|
||||
# Enable race detector
|
||||
go run -race ./cmd/mev-bot
|
||||
```
|
||||
|
||||
## Analysis Focus Areas:
|
||||
- Worker pool efficiency in `pkg/market/pipeline.go`
|
||||
- Event parsing performance in `pkg/events/`
|
||||
- Uniswap math calculations in `pkg/uniswap/`
|
||||
- Memory usage in large transaction processing
|
||||
- Rate limiting effectiveness in `internal/ratelimit/`
|
||||
|
||||
Please provide specific performance metrics and recommendations for optimization.
|
||||
Reference in New Issue
Block a user