agent-browser-automati…
Automate browser interactions for development testing using Puppeteer MCP
Scaffold production-ready Go HTTP server with Grafana-inspired patterns and comprehensive best practices
How it fires
How this command gets triggered: by you, by Claude, or both.
/scaffold-go-http-serverContext preview
What this command does when you run it.
Scaffold production-ready Go HTTP server with Grafana-inspired patterns and comprehensive best practices
allowed-tools: Write, MultiEdit, Bash(go:*), Bash(gdate:*), Bash(mkdir:*), Bash(cd:*), Bash(pwd:*), Bash(touch:*), Bash(echo:*) name: "Scaffold Go Http Server" description: "Scaffold production-ready Go HTTP server with Grafana-inspired patterns and comprehensive best practices" author: "wcygan" tags: ["scaffold","go"] version: "1.0.0" created_at: "2025-07-14T00:00:00Z" updated_at: "2025-07-14T00:00:00Z"
STEP 1: Initialize project structure and session state
TRY:
# Initialize session state
echo '{
"sessionId": "'$SESSION_ID'",
"projectName": "'$PROJECT_NAME'",
"timestamp": "'$(gdate -Iseconds 2>/dev/null || date -Iseconds)'",
"status": "initializing",
"files_created": [],
"steps_completed": []
}' > /tmp/go-scaffold-session-$SESSION_ID.jsonCATCH (initialization_failed):
STEP 2: Scaffold production-ready Go HTTP server with comprehensive architecture
FOR EACH file in scaffold structure:
**A. Core Application Files (Grafana-Inspired Architecture):**
1. **main.go** - Minimal main function with run() pattern (no global state) 2. **server.go** - Server constructor returning http.Handler (dependency injection) 3. **routes.go** - Centralized route definitions with factory pattern 4. **handlers.go** - HTTP handlers with explicit dependency injection 5. **middleware.go** - Production-ready middleware stack 6. **health.go** - Comprehensive health check with graceful degradation
**B. Infrastructure Files:**
7. **go.mod** - Go module initialization with minimal dependencies 8. **Dockerfile** - Multi-stage Docker build for production 9. **docker-compose.yml** - Local development environment 10. **.gitignore** - Go-specific gitignore patterns 11. **README.md** - Concise quick-start documentation
**C. Documentation & Best Practices:**
12. **docs/best-practices.md** - Comprehensive production patterns guide
**Core Implementation Requirements (Grafana Gold Standard):**
**1. Server Constructor Pattern (No Global State):**
**2. Production Server Configuration (Critical Timeouts):**
**3. Essential Middleware Stack:**
**4. Handler Factory Pattern:**
**5. Health Check Implementation:**
**6. Graceful Shutdown (Signal Handling):**
STEP 3: Execute systematic file creation with production-ready implementations
FOR EACH file in project structure:
**Required API Endpoints:**
**Environment Configuration Support:**
STEP 4: Initialize Go module and validate project
STEP 5: Create comprehensive best practices documentation
**Best Practices Documentation Structure:**
**Core Sections to Include:**
1. **Core Architecture Patterns** - Server constructor, handler factories, minimal main 2. **Production Server Configuration** - Critical timeouts and HTTP/2 setup 3. **Middleware Design** - Composable patterns and essential middleware 4. **Handler Patterns** - JSON API handlers with comprehensive validation 5. **Security Hardening** - Input validation and security headers 6. **Performance Optimization** - Connection pooling and memory managemen
A lightweight (~46kB) and comprehensive CLI tool for managing Claude commands, configurations, and workflows.
Repo: kiliczsh/claude-cmd
Automate browser interactions for development testing using Puppeteer MCP
Prepare branches for merging across multiple worktrees and coordinate integration
Transform into accessibility expert for WCAG compliance and inclusive design
Transform into an API design specialist who creates well-structured, developer-friendly APIs
Transform into backend specialist for scalable API and system design
Cloud architect persona for designing scalable, secure cloud infrastructure using modern cloud-native technologies