ExFabrica Agentic Factory - Claude Code Plugin
A comprehensive Claude Code plugin for the ExFabrica Agentic Factory project, providing specialized commands, agents, and integrations for efficient development workflows.
Overview
This plugin extends Claude Code with project-specific capabilities tailored for the ExFabrica Agentic Factory monorepo, which uses:
- Backend: NestJS 11.1.4 with PostgreSQL and Drizzle ORM
- Frontend: Angular 20 with SSR
- Monorepo: Yarn 4.9.2 (Berry) workspaces
- CI/CD: Azure DevOps Pipelines
- Node.js: Version 22+
Features
Custom Slash Commands
/deploy - Deploy applications to different environments with validation
/test-all - Run comprehensive test suite (backend, frontend, e2e)
/analyze-code - Perform code quality analysis and generate reports
/generate-api-client - Generate OpenAPI client from backend specifications
/db-operations - Manage database migrations, seeding, and operations
Specialized Agents
- Azure DevOps Expert - Pipeline optimization, infrastructure, and CI/CD
- Backend Expert - NestJS, Drizzle ORM, PostgreSQL expertise
- Frontend Expert - Angular 20, SSR, TypeScript best practices
- Fullstack Expert - Complete monorepo and architecture knowledge
MCP Integrations
- Filesystem - Controlled access to apps/ and libs/ directories
- Azure DevOps - Pipeline management and repository operations
- PostgreSQL - Database operations and schema management
Lifecycle Hooks
- Pre-deployment validation and testing
- Post-deployment notifications and logging
- Pre-commit code quality checks
Installation
- Clone or copy this plugin to your Claude Code plugins directory
- Configure environment variables for MCP servers (see Configuration section)
- Reload Claude Code to activate the plugin
Configuration
Environment Variables
For Azure DevOps integration:
AZURE_DEVOPS_ORG=your-organization
AZURE_DEVOPS_PAT=your-personal-access-token
For PostgreSQL integration:
DATABASE_URL=postgresql://user:password@localhost:5432/dbname
Plugin Structure
exfabrica-af-plugin/
├── plugin.json # Main plugin configuration
├── README.md # This file
├── CHANGELOG.md # Version history
├── LICENSE # MIT License
├── custom/
│ ├── commands/ # Custom slash commands
│ │ ├── deploy.md
│ │ ├── test-all.md
│ │ ├── analyze-code.md
│ │ ├── generate-api-client.md
│ │ └── db-operations.md
│ └── agents/ # Specialized AI agents
│ ├── azure-devops-expert.md
│ ├── backend-expert.md
│ ├── frontend-expert.md
│ └── fullstack-expert.md
├── config/
│ └── hooks.json # Lifecycle hooks
└── mcp-config.json # MCP server configuration
Usage Examples
Deployment Workflow
# Deploy to development environment
/deploy dev
# Deploy to production with all validations
/deploy production
Testing
# Run all tests (unit, integration, e2e)
/test-all
# Run specific test suite
/test-all backend
/test-all frontend
Code Quality
# Analyze code quality and generate report
/analyze-code
# Analyze specific workspace
/analyze-code backend
API Client Generation
# Generate OpenAPI client from backend
/generate-api-client
Database Operations
# Run pending migrations
/db-operations migrate
# Seed database with test data
/db-operations seed
# Reset database (WARNING: destructive)
/db-operations reset
Using Specialized Agents
Agents are automatically available and can be invoked based on context:
User: "Help me optimize my Azure pipeline"
Claude: [Uses Azure DevOps Expert agent]
User: "I need to add a new NestJS module"
Claude: [Uses Backend Expert agent]
User: "Create an Angular component with SSR support"
Claude: [Uses Frontend Expert agent]
Development
Adding New Commands
- Create a new markdown file in
custom/commands/
- Follow the command template structure
- Add the command path to
plugin.json
- Test thoroughly before committing
Adding New Agents
- Create a new markdown file in
custom/agents/
- Define the agent's role, expertise, and behavior
- The agent will be automatically available via the agents directory
Modifying Hooks
Edit config/hooks.json to add or modify lifecycle hooks. Available hook types:
beforeCommand - Runs before a command executes
afterCommand - Runs after a command completes
onError - Runs when an error occurs
Best Practices
-
Always run tests before deployment
/test-all
/deploy production
-
Use code analysis regularly
/analyze-code
-
Keep API client in sync
/generate-api-client