xarchitecture
Design, analyze, and evolve system architecture using Domain-Driven Design, 12-Factor App, and proven patterns
Design, implement, test, and document APIs with comprehensive automation and best practices
How it fires
How this command gets triggered: by you, by Claude, or both.
/xapiContext preview
What this command does when you run it.
Design, implement, test, and document APIs with comprehensive automation and best practices
description: Design, implement, test, and document APIs with comprehensive automation and best practices tags: [api, development, testing, documentation, openapi, rest, graphql]
Design, implement, test, and document APIs based on the arguments provided in $ARGUMENTS.
First, examine the project structure and API configuration: !ls -la | grep -E "(api|server|app|openapi|swagger)" !find . -name "*.json" -o -name "*.yml" -o -name "*.yaml" | grep -E "(api|openapi|swagger)" | head -10 !npm list express 2>/dev/null || python -c "import fastapi; print('FastAPI available')" 2>/dev/null || echo "No API framework detected"
Based on $ARGUMENTS, perform the appropriate API operation:
If designing new API (--design): !find . -name "*.yml" -o -name "*.yaml" | grep -E "(openapi|swagger)" | head -3 @openapi.yml 2>/dev/null || @swagger.yml 2>/dev/null || echo "No existing API specification found"
Design REST API structure:
If working with OpenAPI (--openapi): !find . -name "openapi.*" -o -name "swagger.*" | head -3 !python -c "import yaml; print('YAML parsing available')" 2>/dev/null || npm list js-yaml 2>/dev/null || echo "No YAML parser available"
Generate or validate OpenAPI spec:
If generating implementation (--generate): !find . -name "package.json" -o -name "requirements.txt" | head -1 !python -c "import fastapi" 2>/dev/null && echo "FastAPI available" || npm list express 2>/dev/null && echo "Express available" || echo "No API framework detected"
Generate server implementation:
If testing API (--test): !find . -name "*test*" | grep -E "(api|endpoint)" | head -5 !python -c "import requests" 2>/dev/null && echo "Python requests available" || npm list axios 2>/dev/null && echo "Axios available" || echo "No HTTP client available"
Execute comprehensive API testing:
If generating documentation (--docs): !find . -name "*.md" | grep -i api | head -5 !python -c "import markdown" 2>/dev/null || npm list markdown 2>/dev/null || echo "No markdown processor available"
Create comprehensive API documentation:
If adding security (--security): !find . -name "*.js" -o -name "*.py" | xargs grep -l "auth" | head -5 !npm list helmet 2>/dev/null || python -c "import security" 2>/dev/null || echo "No security middleware found"
Implement API security:
If optimizing performance (--optimize): !find . -name "*.log" | grep -E "(access|api)" | head -3 !ps aux | grep -E "(node|python)" | head -5
Optimize API performance:
If generating client SDKs (--sdk): !find . -name "openapi.*" -o -name "swagger.*" | head -1 !python -c "import openapi_python_client" 2>/dev/null || npm list swagger-codegen 2>/dev/null || echo "No codegen tools available"
Generate client libraries:
If deploying API (--deploy): !find . -name "Dockerfile" -o -name "docker-compose.yml" | head -2 !kubectl version --client 2>/dev/null || docker --version 2>/dev/null || echo "No deployment tools available"
Deploy API services:
Think step by step about API development requirements and provide:
1. **API Design Analysis**:
2. **Implementation Strategy**:
3. **Testing Approach**:
4. **Documentation and Deployment**:
Generate comprehensive API implementation with best practices, complete testing suite, and production-ready deployment configuration.
If no specific operation is provided, analyze existing API structure and suggest improvements for performance, security, and maintainability.
Transform Claude Code into a complete development platform with 45 AI-powered commands that automate your entire software development workflow. Now with improved git identity management!
Design, analyze, and evolve system architecture using Domain-Driven Design, 12-Factor App, and proven patterns
Manage project configuration files, environment variables, and application settings
Continue an execution plan from where it left off across sessions
Interactive debugging support with error analysis and fix suggestions - integrates with Debug Specialist sub-agent for complex…