Claude Code
Set up pair with Claude Code — configure AGENTS.md, CLAUDE.md, the .claude/ directory, invoke skills, and customize distribution.
Prerequisites
- Claude Code installed and authenticated
- A pair-enabled project (
pair-cli initcompleted,.pair/directory exists) - Node.js 18+
Configure Agent File
Claude Code reads two files at the repository root plus the .claude/ directory:
Project Structure
AGENTS.md
The universal bridge file. pair generates it during pair-cli init. It contains:
- Task selection algorithm (which how-to guide to follow)
- Essential commands (
pnpm install,pnpm test,pnpm lint) - Key references to adoption files and guidelines
- Quick rules (testing, commits, adoption checks)
Claude Code reads AGENTS.md automatically when entering a repository. No manual configuration needed.
CLAUDE.md — Generated from AGENTS.md
CLAUDE.md is not written manually — pair generates it automatically from AGENTS.md using the transform pipeline defined in config.json. The agents registry controls this:
The transform: { "prefix": "claude" } applies marker-based rewrites — the KB source AGENTS.md can include or exclude sections for specific targets using markers:
After transformation, all markers are stripped from the output. This lets a single source file produce tool-specific variants without duplication.
The .claude/ Directory
The .claude/ directory is Claude Code's native configuration location:
.claude/skills/— the canonical copy of all pair skills. Other AI tool directories (.github/skills/,.cursor/skills/, etc.) are symlinks pointing here..claude/settings.local.json— Claude Code permissions (allowed Bash commands, MCP tools, additional directories).
The Bridge Pattern
All files point to .pair/ — the single source of truth:
When you update adoption files or install new skills, Claude Code picks up the changes at the next session start.
Use Skills
Skills are invoked as slash commands in Claude Code:
Common Skills
| Skill | Purpose |
|---|---|
/pair-next | Determine next action based on project state |
/pair-process-specify-prd | Create or update Product Requirements Document |
/pair-process-plan-initiatives | Plan strategic initiatives from PRD |
/pair-process-plan-epics | Break initiatives into epics |
/pair-process-plan-stories | Break epics into user stories |
/pair-process-refine-story | Refine a story with acceptance criteria |
/pair-process-plan-tasks | Break a story into implementation tasks |
/pair-process-implement | Implement a story task by task |
/pair-process-review | Structured code review |
For the full catalog, see Skills Catalog.
Skill Discovery
Claude Code discovers skills in .claude/skills/. pair installs skills there during pair-cli init or pair-cli update. Each skill is a SKILL.md file that Claude Code reads when you invoke the corresponding slash command.
Skills are installed through the transform pipeline — the KB source uses a category structure (.skills/process/implement/) which gets flattened and prefixed:
This happens automatically during pair-cli init and pair-cli update.
Workflow Tips
Start Every Session with /pair-next
This reads your adoption files and PM tool state, then recommends the most relevant action. It keeps sessions focused and prevents context loss between conversations.
Commit Strategy
pair supports two strategies configured in your way-of-working.md:
- Commit per task — one commit per task, with checkpoints between tasks
- Commit per story — continuous flow, single commit at story end
Both strategies produce a single PR per story. The choice affects how granular your Git history is during development.
Session Context
Claude Code maintains context within a session but starts fresh in new sessions. AGENTS.md and CLAUDE.md ensure it recovers project context automatically. For long-running work, the /pair-process-implement skill tracks progress in the PM tool so you can resume across sessions.
Verify It Works
Open Claude Code in your pair-enabled project and run:
Expected output: Claude Code reads your adoption files and suggests the next action (e.g., "Story #42 is refined and ready — run /pair-process-implement #42"). If it can't find .pair/, check that pair-cli init completed successfully.
Related
- Agent Integration concept
- Skills Catalog
- CLI Reference
- Configuration Reference — full
config.jsondocumentation - Skill Management — transform pipeline details