Claude Code AI Agents

Specialized AI assistants that handle specific development tasks with domain expertise. From code review to security audits, agents automate quality checks and streamline your workflow.

What Are AI Agents?

AI agents are specialized assistants with custom system prompts, specific tool access, and separate context windows designed to excel at particular development tasks.

Key Features
  • Domain Expertise - Each agent is trained for specific tasks
  • Tool Access - Restricted to relevant tools only
  • Separate Context - Independent memory and workflow
  • Automatic Activation - Triggered when tasks match their specialty
  • Quality Focus - Built-in best practices and standards
Benefits
  • Automated code quality checks
  • Consistent enforcement of standards
  • Security vulnerability detection
  • Comprehensive documentation generation
  • Test automation and failure fixing
  • Session context persistence
Think of agents as specialist developers on your team - each with deep expertise in their domain (security, testing, documentation, etc.) who work alongside Claude Code to maintain quality and consistency.

Agent Types

Session Orchestrators

Purpose: Manage session start and end

  • session-start - Loads project context at beginning
  • end-of-day - Wraps up session with quality checks

These agents ensure you start each session with full context and end with comprehensive quality reports and memory persistence.

Quality Enforcers

Purpose: Automated quality checks

  • test-runner - Runs tests, fixes failures
  • security-auditor - Scans for vulnerabilities
  • standards-enforcer - Enforces coding standards
  • code-documenter - Ensures documentation completeness

Automatically run by end-of-day agent to maintain code quality.

Code Improvers

Purpose: On-demand code enhancement

  • code-reviewer - Reviews code quality and patterns
  • refactorer - Refactors and modernizes code
  • gen-docs - Generates comprehensive documentation

Invoke these when you need deeper code analysis or improvements.

Development Helpers

Purpose: Development workflow assistance

  • git-helper - Git operations and workflow

Assists with common development tasks and operations.

Typical Session Workflow

Agents work together in a coordinated workflow throughout your development session:

SESSION START
  1. User opens Claude Code
  2. User asks "What should I work on?" or similar
  3. session-start agent activates automatically
  4. Agent loads memory files and project context
  5. Agent briefs user on:
    • What you were working on last
    • Priority tasks from TODO list
    • Outstanding quality issues
    • Recent decisions and gotchas
  6. User starts working with full context
ACTIVE DEVELOPMENT

During development, invoke agents as needed:

  • code-reviewer - "Review this code"
  • refactorer - "Refactor this service"
  • test-runner - "Run tests"
  • security-auditor - "Scan for security issues"
  • standards-enforcer - "Check coding standards"
  • code-documenter - "Document this code"
  • gen-docs - "Generate project documentation"
  • git-helper - "Create a commit"
SESSION END
  1. User says "End of day" or similar
  2. end-of-day agent activates
  3. Agent orchestrates quality checks:
    • Runs test-runner → Test results
    • Runs security-auditor → Security scan
    • Runs standards-enforcer → Compliance check
    • Runs code-documenter → Documentation coverage
  4. Creates memory files for next session
  5. Generates comprehensive session report
  6. User reviews summary and quality status
NEXT SESSION

session-start loads memory → Instant context restoration → Continue working

Quality trends tracked over time, ensuring continuous improvement.

All Agents Reference

session-start

Loads project context and briefs you at the start of each session.

What It Does
  • Reads memory files from previous session
  • Loads TODO.md and priority tasks
  • Reviews recent session reports
  • Checks quality status (tests, security, standards)
  • Briefs you on where you left off
  • Provides instant context restoration
When to Use

Automatic activation - triggers when you:

  • Ask "What should I work on?"
  • Say "What was I doing last?"
  • Request "Brief me on the project"
  • Start with "What's the status?"
Pro Tip: Always start your session by asking "What should I work on?" to get full context loading.

end-of-day

Comprehensive session wrap-up with quality checks and memory creation.

What It Does
  • Orchestrates all quality-enforcer agents
  • Runs tests and reports failures
  • Performs security vulnerability scan
  • Checks coding standards compliance
  • Validates documentation completeness
  • Creates memory files for next session
  • Generates HTML session report
  • Provides quality trend analysis
When to Use

End of every session - invoke by saying:

  • "End of day"
  • "Wrap up this session"
  • "Create session summary"
  • "Run quality checks"
Output Files
  • .claude/memory/session-notes-[date].md
  • .claude/memory/quick-ref.md
  • project_docs/session-reports/session-[date].html
Best Practice: Run end-of-day before committing to git to ensure all quality checks pass.

code-reviewer

Reviews code for quality, best practices, and consistency.

What It Reviews
  • Code structure and organization
  • Design patterns and architecture
  • Error handling and edge cases
  • Performance considerations
  • Security vulnerabilities
  • Naming conventions
  • Code duplication (DRY principle)
  • Documentation quality
When to Use
  • After implementing a new feature
  • Before creating a pull request
  • When refactoring existing code
  • For peer review automation
  • To identify improvement opportunities
Example Usage
"Review the UserService class"
"Review all changes in src/auth/"
"Check this code for issues"

security-auditor

Scans codebase for security vulnerabilities and OWASP Top 10 issues.

Security Checks
  • SQL Injection vulnerabilities
  • Cross-Site Scripting (XSS)
  • Authentication and authorization flaws
  • Sensitive data exposure
  • Security misconfigurations
  • Broken access control
  • Insecure dependencies
  • API security issues
  • Hardcoded secrets or credentials
Report Includes
  • Vulnerability severity ratings
  • OWASP Top 10 category mapping
  • CWE (Common Weakness Enumeration) references
  • Remediation recommendations
  • Code examples of fixes
  • Risk impact assessment
Run security audit before every production deployment.

test-runner

Runs tests and automatically fixes failures while preserving test intent.

Capabilities
  • Runs unit, feature, and integration tests
  • Analyzes test failures
  • Suggests fixes for failing tests
  • Preserves original test intent
  • Updates tests for code changes
  • Generates missing tests
  • Reports test coverage
Workflow
  1. Runs test suite
  2. Identifies failures
  3. Analyzes root cause
  4. Proposes fixes
  5. Re-runs to verify
  6. Reports results
Automatically run by end-of-day agent to ensure code quality.

standards-enforcer

Ensures all code follows project coding standards.

Standards Checked
  • PSR-12 PHP standards
  • ES6+ JavaScript standards
  • File structure conventions
  • Naming conventions
  • Documentation requirements
  • Logging format compliance
  • Database naming standards
  • Git workflow compliance
Configuration

Reads standards from:

  • coding-standards/ directory
  • CLAUDE.md project guidance
  • .editorconfig file
  • .eslintrc and phpcs.xml

Reports violations with:

  • File path and line number
  • Standard violated
  • Correction guidance
  • Code examples

code-documenter

Documents codebase to quality standards with PHPDoc-style output.

Documentation Generated
  • Class and method documentation
  • PHPDoc / JSDoc comments
  • README files
  • API documentation
  • Code examples
  • Architecture diagrams
  • Usage guides
Quality Standards
  • Every public method documented
  • Parameter types and descriptions
  • Return type documentation
  • Exception documentation
  • Usage examples where helpful
  • Complex logic explained

gen-docs

Generate comprehensive documentation in multiple formats (Markdown, HTML, API docs).

Documentation Types
  • Project README
  • Architecture documentation
  • API reference (OpenAPI/Swagger)
  • Developer guides
  • Deployment guides
  • Troubleshooting guides
  • Change logs
Output Formats
  • Markdown (.md)
  • HTML (styled)
  • PDF (via HTML)
  • OpenAPI/Swagger JSON
  • PHPDoc HTML
Usage
"Generate project documentation"
"Create API documentation"
"Generate README for this module"

refactorer

Refactors and modernizes code while maintaining functionality.

Refactoring Techniques
  • Extract method/class
  • Rename variables/methods
  • Remove code duplication
  • Simplify complex conditionals
  • Modernize syntax (ES6+, PHP 8+)
  • Improve error handling
  • Optimize performance
  • Apply design patterns
Safety Measures
  • Creates backups before changes
  • Runs tests after each refactor
  • Preserves functionality
  • Documents changes made
  • Provides rollback instructions
Always review refactored code and run full test suite.

git-helper

Assists with git operations (commits, branches, merges, conflict resolution).

Git Operations
  • Create commits with descriptive messages
  • Branch creation and management
  • Merge conflict resolution
  • Cherry-pick commits
  • Rebase operations
  • Tag management
  • Stash operations
Commit Message Standards

Follows conventional commits:

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation
  • refactor: Code refactoring
  • test: Tests
  • chore: Maintenance
Example
"Create a commit for these changes"
"Resolve merge conflicts in auth module"
"Create feature branch for user-roles"

Installation & Setup

Agents are included with the Claude Code Baseline. Choose your installation method:

Option 1: New Project (Automatic)

Agents are automatically included when creating a new project:

.\new-project.ps1 `
    -ProjectName "MyApp" `
    -DestinationPath "E:\projects\myapp"

Agents will be copied to .claude/agents/

Option 2: Existing Project

Add agents to an existing project:

.\add-baseline-to-existing-project.ps1 `
    -ProjectPath "E:\projects\myapp"

Agents will be merged into existing .claude/agents/

Option 3: Manual Installation

Copy agents manually to your project:

Copy-Item -Recurse `
    {{BASELINE_ROOT}}\agents\*.md `
    E:\your-project\.claude\agents\
Option 4: Global Installation

Install agents globally for all projects:

Copy-Item -Recurse `
    {{BASELINE_ROOT}}\agents\*.md `
    $env:USERPROFILE\.claude\agents\

Agents will be available to every Claude Code project

Verification: After installation, agents will automatically activate when you invoke tasks matching their expertise.

Next Steps

Get Started

Getting Started Guide

Step-by-step walkthrough of setting up your first project with agents

How It Works

Architecture Guide

Understand how all components work together

View Examples

Sample Reports

See what agents produce with fictional data examples