Implement CodeRabbit reference architecture with best-practice project layout. Use when designing new CodeRabbit integrations, reviewing project structure, or establishing architecture standards for CodeRabbit applications. Trigger with phrases like "coderabbit architecture", "coderabbit best practices", "coderabbit project structure", "how to organize coderabbit", "coderabbit layout".
View on GitHubjeremylongshore/claude-code-plugins-plus-skills
coderabbit-pack
plugins/saas-packs/coderabbit-pack/skills/coderabbit-reference-architecture/SKILL.md
February 1, 2026
Select agents to install to:
npx add-skill https://github.com/jeremylongshore/claude-code-plugins-plus-skills/blob/main/plugins/saas-packs/coderabbit-pack/skills/coderabbit-reference-architecture/SKILL.md -a claude-code --skill coderabbit-reference-architectureInstallation paths:
.claude/skills/coderabbit-reference-architecture/# CodeRabbit Reference Architecture
## Overview
Production-ready architecture patterns for CodeRabbit integrations.
## Prerequisites
- Understanding of layered architecture
- CodeRabbit SDK knowledge
- TypeScript project setup
- Testing framework configured
## Project Structure
```
my-coderabbit-project/
├── src/
│ ├── coderabbit/
│ │ ├── client.ts # Singleton client wrapper
│ │ ├── config.ts # Environment configuration
│ │ ├── types.ts # TypeScript types
│ │ ├── errors.ts # Custom error classes
│ │ └── handlers/
│ │ ├── webhooks.ts # Webhook handlers
│ │ └── events.ts # Event processing
│ ├── services/
│ │ └── coderabbit/
│ │ ├── index.ts # Service facade
│ │ ├── sync.ts # Data synchronization
│ │ └── cache.ts # Caching layer
│ ├── api/
│ │ └── coderabbit/
│ │ └── webhook.ts # Webhook endpoint
│ └── jobs/
│ └── coderabbit/
│ └── sync.ts # Background sync job
├── tests/
│ ├── unit/
│ │ └── coderabbit/
│ └── integration/
│ └── coderabbit/
├── config/
│ ├── coderabbit.development.json
│ ├── coderabbit.staging.json
│ └── coderabbit.production.json
└── docs/
└── coderabbit/
├── SETUP.md
└── RUNBOOK.md
```
## Layer Architecture
```
┌─────────────────────────────────────────┐
│ API Layer │
│ (Controllers, Routes, Webhooks) │
├─────────────────────────────────────────┤
│ Service Layer │
│ (Business Logic, Orchestration) │
├─────────────────────────────────────────┤
│ CodeRabbit Layer │
│ (Client, Types, Error Handling) │
├─────────────────────────────────────────┤
│ Infrastructure Layer │
│ (Cache, Queue, Monitoring) │
└─────────────────────────────────────────┘
```
## Key Components
### Step 1: Client Wrapper