Skip to content

A Context Prime is a slash command whose only job is to load focused context for one area of work — a surgical CLAUDE.md that activates only when invoked, keeping the always-on brief lean.

Primitive

Context Priming

The tradeoff it resolves

CLAUDE.md can't be lean AND rich. Primes can.

CLAUDE.md

Always-on memory

ScopeEvery conversation in this project

LayerSystem prompt (durable, broad)

SizeTight — 500–1500 words max

LoadedAlways — every agent invocation

Prime command

On-demand domain context

ScopeOne invocation, per domain area

LayerUser prompt (ephemeral, focused)

SizePer-domain — as big as needed

LoadedExplicitly/prime_billing

Shrink CLAUDE.md and put the domain-specific stuff in primes. Agents working on unrelated tasks never load it.

What a prime looks like

Four sections. Everything fits on a screen.

.claude/commands/prime_billing.md

# Prime: Billing## What you are working onStripe subscriptions, invoices, webhook handlers.## Files to read first- src/billing/webhook.ts- src/billing/subscription.service.ts- app_docs/stripe-integration.md# keep this list tight — 5-10 files, not the whole dir## Key constraints for this area- Never mutate Stripe objects from webhook handlers- All subscription changes must be idempotent## Current statePlus tier just shipped; annual billing pending.

The anti-pattern

Prime DOWN, not UP.

Files your prime should reference (for a 40-file domain)

✓ Right

8 files

✗ Anti-pattern

40 files

Temptation: load everything about the area. That defeats the purpose. Pick the 5-10 files an agent genuinely needs, not all 40. If the prime file grows past ~300 lines, you're over-contextualizing — cut it back.

One codebase, many primes

Each prime is a domain. Agents load only what matches.

/prime_billing

Stripe, subs, webhooks

/prime_auth

OAuth, sessions, tokens

/prime_ui

Vue components, stores

/prime_db

Schema, migrations

/prime_ai

Agents, prompts, tools

/prime_infra

Deploy, CI, secrets

Agent working on billing? /prime_billing then task. Other five primes never touch the context. The context budget stays proportional to the task area, not the whole project.

Priming vs a Context Bundle

Both pre-load context. Opposite directions.

Context Priming

Forward declaration — hand-authored, invoked before work starts. "Here's what matters for this domain."

Context Bundle

Replay log — auto-captured by hooks, loadable after. "Here's what the prior agent already did."

A session can use both: prime the domain, then load a bundle from a recent run in that domain.

The discipline

Load what this task needs, nothing more.

CLAUDE.md stays lean because domain context lives in primes. Primes stay useful because they scope DOWN — 5-10 files, not 40. The agent working on auth never sees the billing context; the agent working on billing never sees the UI context. The context budget goes to the domain, not the directory.