A pattern for giving AI agents domain expertise through structured knowledge and skills.
A framework for building AI agents that have real expertise in specific domains. Instead of relying solely on an LLM's general knowledge, agents access structured domain knowledge:
- Principles - Core truths that guide judgment
- Rubrics - Evaluation frameworks with scoring criteria
- Examples - Contrast pairs (WEAK vs STRONG) that teach taste
- Frameworks - Decision trees and mental models
┌─────────────────────────────────────────────────────────────────┐
│ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ DOMAIN EXPERTISE ENGINE │ │
│ │ │ │
│ │ domains/ │ │
│ │ ├── copywriting/ │ │
│ │ │ ├── principles.md ← Core truths │ │
│ │ │ ├── rubrics/ ← Evaluation criteria │ │
│ │ │ └── examples/ ← WEAK vs STRONG pairs │ │
│ │ ├── landing_pages/ │ │
│ │ └── [your-domain]/ │ │
│ │ │ │
│ │ CLI: expertise query <domain> "<question>" │ │
│ │ │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ SKILLS │ │
│ │ │ │
│ │ .claude/skills/ │ │
│ │ ├── audit-landing-page/ ← Orchestrates expertise │ │
│ │ ├── grade-headline/ ← Single-purpose skill │ │
│ │ └── [your-skill]/ │ │
│ │ │ │
│ │ Skills tell Claude HOW to use domain expertise │ │
│ │ │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ EXECUTION ENVIRONMENT │ │
│ │ │ │
│ │ Local: Claude Code CLI │ │
│ │ Production: Vercel Sandbox / Cloud Run │ │
│ │ │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘
- Expertise is explicit - Not hoping the LLM "knows" copywriting; teaching it our specific standards
- Contrast examples teach taste - WEAK vs STRONG pairs with WHY annotations develop judgment
- Rubrics ensure consistency - Same evaluation criteria applied every time
- Skills orchestrate - Claude knows which expertise to pull for each task
- Portable across projects - Same domains work in any project
A standalone Python package with CLI. Contains structured knowledge in markdown files.
# Query domain expertise
expertise query copywriting "B2B SaaS headline for cold traffic"
# Get analysis context (token-budgeted)
expertise context landing_pages hero_evaluation "problem-aware visitor"Markdown files that tell Claude Code how to perform specific tasks using domain expertise.
# audit-landing-page/skill.md
You are performing a landing page audit.
## Step 1: Scrape the page
Use dev-browser to get page content...
## Step 2: Load domain expertise
expertise query landing_pages "hero section evaluation"
## Step 3: Evaluate and score
Apply rubric criteria to page content...- Development: Claude Code CLI running locally
- Production: Vercel Sandbox or similar (Claude + tools in VM)
| Use Case | Domains | Skills |
|---|---|---|
| Landing Page Analyzer | landing_pages, copywriting, trust_building |
audit-landing-page |
| Headline Grader | copywriting |
grade-headline |
| Email Sequence Reviewer | email_copy, copywriting |
review-email-sequence |
| Ad Copy Auditor | copywriting, advertising |
audit-ad-copy |
| Sales Page Scorer | landing_pages, copywriting, trust_building |
score-sales-page |
See Quick Start Guide to add this to your project in 15 minutes.
| Doc | Purpose |
|---|---|
| Quick Start | Get running in 15 minutes |
| Skill Authoring | How to create skills |
| Domain Authoring | How to create domain expertise |
| Sandbox Deployment | Deploy to production |
- Analysis, not generation - Agents evaluate and recommend; humans create
- Grounded in examples - Contrast pairs teach judgment better than rules
- Explicit over implicit - Document expertise, don't hope the LLM knows it
- Composable - Mix domains and skills for different use cases
- Portable - Same framework works across any project