How Kits Work
Under the hood of aiorg kits.
Kit Architecture
Every kit contains four components that work together:
.claude/
├── commands/ # Procedures Claude executes
├── knowledge/ # Domain knowledge Claude reads
├── skills/ # Reusable capabilities
└── guides/ # Guides for YOU to read
Commands
Commands are procedures Claude executes.
Located in .claude/commands/. Each command is a markdown file that tells Claude exactly what to do.
Example: /setup Command
# /setup
Set up the project for first use.
## Steps
1. Check prerequisites (Node.js, Docker)
2. Install dependencies with pnpm
3. Create .env.local from template
4. Start local services
5. Verify everything works
## Prerequisites Check
Run these commands to verify:
- node --version (requires 20+)
- docker --version (requires Docker Desktop)
How It Works
When you type /setup in Claude Code:
- Claude reads
.claude/commands/setup.md - Follows the steps exactly
- Uses tools (Bash, Read, Write) to execute
- Reports progress and results
Command Patterns
| Pattern | Example | Use Case |
|---|---|---|
| Setup wizards | /setup | Initial configuration |
| Generators | /new-feature | Create code scaffolds |
| Analysis | /diagnose | Analyze and report |
| Workflows | /deploy | Multi-step processes |
| Browsers | /recipes | Navigate options |
Knowledge
Knowledge is information Claude reads to understand your domain.
Located in .claude/knowledge/. Claude reads these files at session start.
Example: Kit Ecosystem Knowledge
# Kit Ecosystem
## Which Kit for Which Problem
| Problem | Kit |
|---------|-----|
| "Is this worth building?" | Idea OS |
| "How do I get users?" | Marketing OS |
| "Users sign up but leave" | PMF OS |
| "How do I keep users?" | Success OS |
How It Works
- Claude loads knowledge files on session start
- Uses them to answer questions accurately
- References them when relevant
Knowledge vs Commands
| Knowledge | Commands |
|---|---|
| Claude reads for context | Claude executes as procedures |
| Passive reference | Active execution |
| "What is X?" | "Do X" |
.claude/knowledge/*.md | .claude/commands/*.md |
Skills
Skills are reusable capabilities Claude can activate.
Located in .claude/skills/. Each skill gives Claude specialized expertise.
Example: Supabase Expert Skill
# Supabase Expert
## Activation
Activate when user asks about:
- Database queries
- RLS policies
- Migrations
- Supabase functions
## Knowledge
### RLS Best Practices
- Always use auth.uid() for user isolation
- Enable RLS on every table
- Test policies with different users
### Common Patterns
[Database patterns, query examples, etc.]
How It Works
- Skills activate based on context
- Claude gains specialized knowledge
- Better answers for that domain
Built-in Skills
| Kit | Skills Included |
|---|---|
| SaaS Dev Team | supabase-expert, stripe-billing |
| Marketing OS | seo-expert, content-strategist |
| PMF OS | user-researcher, data-analyst |
Guides
Guides are documentation for YOU, not Claude.
Located in .claude/guides/ or recipes/. These are meant for human reading.
Example: Recipe
# Add Google OAuth
Step-by-step guide to add Google authentication.
## Prerequisites
- Google Cloud Console account
- OAuth credentials created
## Steps
### 1. Create OAuth Credentials
Go to console.cloud.google.com...
### 2. Configure Supabase
In your Supabase dashboard...
### 3. Update Environment Variables
Add to .env.local...
How It Works
- You run
/recipesto browse guides - Select a guide to read
- Follow the steps yourself (or ask Claude to help)
Guides vs Commands
| Guides | Commands |
|---|---|
| For humans to read | For Claude to execute |
| Step-by-step instructions | Automated procedures |
| "Here's how to..." | "Do this now" |
recipes/*.md | .claude/commands/*.md |
CLAUDE.md
The main context file at the project root.
What It Contains
# Project Name
## Overview
What this project does.
## Tech Stack
- Framework: Next.js 15
- Database: Supabase
- Payments: Stripe
## Project Structure
Where things are located.
## Key Commands
Available slash commands.
## Development
How to run and build.
How It Works
- Claude reads CLAUDE.md on every session start
- Uses it to understand your project
- References it when answering questions
Best Practices
- Keep it accurate and up-to-date
- Focus on what Claude needs to know
- Include project-specific conventions
Session Flow
When you start a Claude Code session:
1. Claude reads CLAUDE.md
└── Understands project context
2. Claude reads .claude/knowledge/*
└── Gains domain knowledge
3. Welcome hook runs (if configured)
└── Greets you with context
4. You type a command or question
│
├── Command (/setup)
│ └── Claude reads .claude/commands/setup.md
│ └── Executes the procedure
│
└── Question ("How do RLS policies work?")
└── Claude uses knowledge + skills
└── Provides informed answer
Kit Types
Templates (Bootstrap Mode)
Create new projects from scratch.
npx @aiorg/cli init saas-starter ~/my-project
Includes:
- Full codebase (
src/,supabase/, etc.) - Claude configuration (
.claude/,CLAUDE.md) - Ready to run
Examples: SaaS Dev Team, Landing Page
Companion Tools (Inject Mode)
Add to existing projects.
cd ~/my-existing-project
npx @aiorg/cli add marketing-os
Includes:
- Kit data folder (
.marketing-os/) - Claude configuration (merged)
- No code changes to your project
Examples: Marketing OS, PMF OS, Success OS, QA Team
File Categories
During upgrades, files are handled differently:
| Category | Files | Upgrade Behavior |
|---|---|---|
| Always Replace | .claude/commands/*, CLAUDE.md | Overwritten |
| Never Touch | .env*, config/*, content/* | Never modified |
| Merge | package.json, .claude/settings.json | Deep merge |
| Add Only | supabase/migrations/* | Only if missing |
This ensures:
- You get new features
- Your data is preserved
- Your customizations are respected
Creating Custom Commands
Add your own commands:
1. Create the File
# .claude/commands/my-command.md
2. Write the Command
# /my-command
Description of what this command does.
## Steps
1. First, do this
2. Then, do that
3. Finally, verify
## Notes
- Important consideration
- Another note
3. Use It
> /my-command
Claude reads your file and executes it.