Back to Agents

Usage Guide

docs/usage.md

latest15.6 KB
Original Source

Usage Guide

Complete guide to using agents, slash commands, and multi-agent workflows.

Overview

The plugin ecosystem provides two primary interfaces:

  1. Slash Commands - Direct invocation of tools and workflows
  2. Natural Language - Claude reasons about which agents to use

Slash Commands

Slash commands are the primary interface for working with agents and workflows. Each plugin provides namespaced commands that you can run directly.

Command Format

bash
/plugin-name:command-name [arguments]

Discovering Commands

List all available slash commands from installed plugins:

bash
/plugin

Benefits of Slash Commands

  • Direct invocation - No need to describe what you want in natural language
  • Structured arguments - Pass parameters explicitly for precise control
  • Composability - Chain commands together for complex workflows
  • Discoverability - Use /plugin to see all available commands

Natural Language

Agents can also be invoked through natural language when you need Claude to reason about which specialist to use:

"Use backend-architect to design the authentication API"
"Have security-auditor scan for OWASP vulnerabilities"
"Get performance-engineer to optimize this database query"

Claude Code automatically selects and coordinates the appropriate agents based on your request.

Command Reference by Category

Development & Features

CommandDescription
/backend-development:feature-developmentEnd-to-end backend feature development
/full-stack-orchestration:full-stack-featureComplete full-stack feature implementation
/multi-platform-apps:multi-platformCross-platform app development coordination

Testing & Quality

CommandDescription
/unit-testing:test-generateGenerate comprehensive unit tests
/tdd-workflows:tdd-cycleComplete TDD red-green-refactor cycle
/tdd-workflows:tdd-redWrite failing tests first
/tdd-workflows:tdd-greenImplement code to pass tests
/tdd-workflows:tdd-refactorRefactor with passing tests

Code Quality & Review

CommandDescription
/comprehensive-review:full-reviewMulti-perspective analysis
/comprehensive-review:pr-enhanceEnhance pull requests

Debugging & Troubleshooting

CommandDescription
/debugging-toolkit:smart-debugInteractive smart debugging
/incident-response:incident-responseProduction incident management
/incident-response:smart-fixAutomated incident resolution
/error-debugging:error-analysisDeep error analysis
/error-debugging:error-traceStack trace debugging
/error-diagnostics:smart-debugSmart diagnostic debugging
/distributed-debugging:debug-traceDistributed system tracing

Security

CommandDescription
/security-scanning:security-hardeningComprehensive security hardening
/security-scanning:security-sastStatic application security testing
/security-scanning:security-dependenciesDependency vulnerability scanning
/security-compliance:compliance-checkSOC2/HIPAA/GDPR compliance
/frontend-mobile-security:xss-scanXSS vulnerability scanning

Infrastructure & Deployment

CommandDescription
/observability-monitoring:monitor-setupSetup monitoring infrastructure
/observability-monitoring:slo-implementImplement SLO/SLI metrics
/deployment-validation:config-validatePre-deployment validation
/cicd-automation:workflow-automateCI/CD pipeline automation

Data & ML

CommandDescription
/machine-learning-ops:ml-pipelineML training pipeline orchestration
/data-engineering:data-pipelineETL/ELT pipeline construction
/data-engineering:data-driven-featureData-driven feature development

Documentation

CommandDescription
/code-documentation:doc-generateGenerate comprehensive documentation
/code-documentation:code-explainExplain code functionality
/documentation-generation:doc-generateOpenAPI specs, diagrams, tutorials
/c4-architecture:c4-architectureGenerate comprehensive C4 architecture documentation (Context, Container, Component, Code)

Refactoring & Maintenance

CommandDescription
/code-refactoring:refactor-cleanCode cleanup and refactoring
/code-refactoring:tech-debtTechnical debt management
/codebase-cleanup:deps-auditDependency auditing
/codebase-cleanup:tech-debtTechnical debt reduction
/framework-migration:legacy-modernizeLegacy code modernization
/framework-migration:code-migrateFramework migration
/framework-migration:deps-upgradeDependency upgrades

Database

CommandDescription
/database-migrations:sql-migrationsSQL migration automation
/database-migrations:migration-observabilityMigration monitoring
/database-cloud-optimization:cost-optimizeDatabase and cloud optimization

Git & PR Workflows

CommandDescription
/git-pr-workflows:pr-enhanceEnhance pull request quality
/git-pr-workflows:onboardTeam onboarding automation
/git-pr-workflows:git-workflowGit workflow automation

Project Scaffolding

CommandDescription
/python-development:python-scaffoldFastAPI/Django project setup
/javascript-typescript:typescript-scaffoldNext.js/React + Vite setup
/systems-programming:rust-projectRust project scaffolding

AI & LLM Development

CommandDescription
/llm-application-dev:langchain-agentLangChain agent development
/llm-application-dev:ai-assistantAI assistant implementation
/llm-application-dev:prompt-optimizePrompt engineering optimization
/agent-orchestration:multi-agent-optimizeMulti-agent optimization
/agent-orchestration:improve-agentAgent improvement workflows

Testing & Performance

CommandDescription
/performance-testing-review:ai-reviewPerformance analysis
/application-performance:performance-optimizationApp optimization

Team Collaboration

CommandDescription
/team-collaboration:issueIssue management automation
/team-collaboration:standup-notesStandup notes generation

Accessibility

CommandDescription
/accessibility-compliance:accessibility-auditWCAG compliance auditing

API Development

CommandDescription
/api-testing-observability:api-mockAPI mocking and testing

Context Management

CommandDescription
/context-management:context-saveSave conversation context
/context-management:context-restoreRestore previous context

Multi-Agent Workflow Examples

Plugins provide pre-configured multi-agent workflows accessible via slash commands.

Full-Stack Development

bash
# Command-based workflow invocation
/full-stack-orchestration:full-stack-feature "user dashboard with real-time analytics"

# Natural language alternative
"Implement user dashboard with real-time analytics"

Orchestration: backend-architect → database-architect → frontend-developer → test-automator → security-auditor → deployment-engineer → observability-engineer

What happens:

  1. Database schema design with migrations
  2. Backend API implementation (REST/GraphQL)
  3. Frontend components with state management
  4. Comprehensive test suite (unit/integration/E2E)
  5. Security audit and hardening
  6. CI/CD pipeline setup with feature flags
  7. Observability and monitoring configuration

Security Hardening

bash
# Comprehensive security assessment and remediation
/security-scanning:security-hardening --level comprehensive

# Natural language alternative
"Perform security audit and implement OWASP best practices"

Orchestration: security-auditor → backend-security-coder → frontend-security-coder → mobile-security-coder → test-automator

Data/ML Pipeline

bash
# ML feature development with production deployment
/machine-learning-ops:ml-pipeline "customer churn prediction model"

# Natural language alternative
"Build customer churn prediction model with deployment"

Orchestration: data-scientist → data-engineer → ml-engineer → mlops-engineer → performance-engineer

Incident Response

bash
# Smart debugging with root cause analysis
/incident-response:smart-fix "production memory leak in payment service"

# Natural language alternative
"Debug production memory leak and create runbook"

Orchestration: incident-responder → devops-troubleshooter → debugger → error-detective → observability-engineer

C4 Architecture Documentation

bash
# Generate comprehensive C4 architecture documentation
/c4-architecture:c4-architecture

# Natural language alternative
"Create C4 architecture documentation for this codebase"

Orchestration: c4-code → c4-component → c4-container → c4-context

What happens:

  1. Code Level: Bottom-up analysis of all subdirectories, creating code-level documentation with function signatures and dependencies
  2. Component Level: Synthesizes code documentation into logical components with interfaces and relationships
  3. Container Level: Maps components to deployment containers with OpenAPI/Swagger API specifications
  4. Context Level: Creates high-level system context with personas, user journeys, and external dependencies

Output: Complete C4 documentation in C4-Documentation/ directory with Mermaid diagrams at all levels (Context, Container, Component, Code)

Command Arguments and Options

Many slash commands support arguments for precise control:

bash
# Test generation for specific files
/unit-testing:test-generate src/api/users.py

# Feature development with methodology specification
/backend-development:feature-development OAuth2 integration with social login

# Security dependency scanning
/security-scanning:security-dependencies

# Component scaffolding
/frontend-mobile-development:component-scaffold UserProfile component with hooks

# TDD workflow cycle
/tdd-workflows:tdd-red User can reset password
/tdd-workflows:tdd-green
/tdd-workflows:tdd-refactor

# Smart debugging
/debugging-toolkit:smart-debug memory leak in checkout flow

# Python project scaffolding
/python-development:python-scaffold fastapi-microservice

# C4 architecture documentation generation
/c4-architecture:c4-architecture

Combining Natural Language and Commands

You can mix both approaches for optimal flexibility:

# Start with a command for structured workflow
/full-stack-orchestration:full-stack-feature "payment processing"

# Then provide natural language guidance
"Ensure PCI-DSS compliance and integrate with Stripe"
"Add retry logic for failed transactions"
"Set up fraud detection rules"

Best Practices

When to Use Slash Commands

  • Structured workflows - Multi-step processes with clear phases
  • Repetitive tasks - Operations you perform frequently
  • Precise control - When you need specific parameters
  • Discovery - Exploring available functionality

When to Use Natural Language

  • Exploratory work - When you're not sure which tool to use
  • Complex reasoning - When Claude needs to coordinate multiple agents
  • Contextual decisions - When the right approach depends on the situation
  • Ad-hoc tasks - One-off operations that don't fit a command

Workflow Composition

Compose multiple plugins for complex scenarios:

bash
# 1. Start with feature development
/backend-development:feature-development payment processing API

# 2. Add security hardening
/security-scanning:security-hardening

# 3. Generate comprehensive tests
/unit-testing:test-generate

# 4. Review the implementation
/comprehensive-review:full-review

# 5. Set up CI/CD
/cicd-automation:workflow-automate

# 6. Add monitoring
/observability-monitoring:monitor-setup

Agent Skills Integration

Agent Skills work alongside commands to provide deep expertise:

User: "Set up FastAPI project with async patterns"
→ Activates: fastapi-templates skill
→ Invokes: /python-development:python-scaffold
→ Result: Production-ready FastAPI project with best practices

User: "Implement Kubernetes deployment with Helm"
→ Activates: helm-chart-scaffolding, k8s-manifest-generator skills
→ Guides: kubernetes-architect agent
→ Result: Production-grade K8s manifests with Helm charts

See Agent Skills for details on the 107 specialized skills.

See Also