Domain experts for Claude Code — persistent context, history, and institutional memory for your AI team
SaferSkills independently audited crew (Agent Skill) and scored it 96/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 1 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 1 flagged
The text {match} tells the agent to skip the normal "ask the user first" gate. Used adversarially it removes the human-in-the-loop check before destructive or sensitive actions, turning a normally-gated agent into a fire-and-forget executor.
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
| Arguments | Action |
|---|---|
| none | Show roster |
init | Generate shared project reference for all crew members |
add [name] "[domain]" | Scaffold a new crew member |
1-on-1 [name] | Interactive 1-on-1 with a member |
done [name] | Close session — update context, history, decisions |
remove [name] | Remove a crew member |
[name] | Activate member, ask for task |
[name] [task] | Activate member with task |
.claude/crew/roster.mdinit — generate shared project referenceCreates .claude/crew/PROJECT.md — a single shared file that documents the project for the entire crew. New members read it during bootstrap instead of re-exploring the codebase from scratch.
Use Glob to check if .claude/crew/PROJECT.md already exists.
If it does, tell the user:
PROJECT.md already exists. Refresh it (update with any changes since it was written) or regenerate from scratch?Wait for their choice before proceeding. On refresh, read the existing file first and carry forward anything still accurate. On regenerate, start fresh.
Run these in parallel to gather raw facts before asking the user anything:
.git, node_modules, common build dirs)package.json, pyproject.toml, go.mod, Cargo.toml, requirements.txt, Gemfile, pom.xml — read whichever exist to extract project name, description, dependenciesREADME.md if it exists — extract purpose, setup steps, any stated conventionsmain.*, index.*, app.*, server.*, cli.* at top level and in src/git log --oneline -20 to see which areas of the codebase have been most active latelySynthesise a draft understanding: project name, what it does, tech stack, main entry points, top-level structure.
Round 1 — present your draft and validate:
Here's what I found: [Project name] — [1-sentence description of what it does] Tech: [stack summary] Main entry: [key files]
>
Does this look right? Anything to correct or add?
Wait for the user's response. Incorporate corrections.
Round 2 — ask only what exploration can't answer:
A few questions to fill in what I can't infer from the code: 1. What are the main functional domains or areas of this codebase? (e.g. "auth, payments, notifications" — I'll use this for the Domain Map so crew members know who owns what) 2. Anything non-obvious about the dev setup, local environment, or how to run tests? 3. Any conventions, gotchas, or things new contributors commonly get wrong?
Wait for the user's response. If they skip a question, leave that section as a placeholder.
.claude/crew/PROJECT.md# Project: {PROJECT NAME}
> Generated: {TODAY'S DATE} | Shared reference for all crew members. Run `/crew init` to refresh.
## What This Is
{1-3 sentences: what the project does and who uses it}
## Tech Stack
| Layer | Technology |
|-------|-----------|
| {layer} | {tech} |
## Project Map
{annotated top-level directory tree — one line per entry, what each folder/file does}
## Key Entry Points
| File | Purpose |
|------|---------|
| {file} | {what it does} |
## Domain Map
How this codebase maps to crew member responsibilities. Update when you add new members.
| Domain | Owner | Key paths |
|--------|-------|-----------|
| {domain} | {crew member name or "unassigned"} | {main files/dirs} |
## Dev Setup
{How to install, run, test, build — extracted from README + manifests + user input}
## Conventions
{Naming conventions, patterns, architectural rules — things that are consistent throughout the codebase}
## Common Gotchas
{Things that trip up new contributors — non-obvious constraints, known footguns, things not to change without understanding why}Tell the user:
PROJECT.md written — {n} sections, {n} domains mapped. All crew members will read this automatically on their first task. Run /crew init any time to refresh it as the project evolves.add [name] "[domain]" — scaffold a new memberIf name or domain is missing, ask for them before proceeding.
Use Glob to check if .claude/crew/{name}/ already exists.
If it does, stop and ask:
{name}already exists as a crew member. Overwrite? This will replace all files in.claude/crew/{name}/— existing context and history will be lost.
Only proceed if the user explicitly confirms. If not, abort and suggest /crew {name} to activate the existing member.
.claude/crew/{name}/SKILL.md---
name: {NAME}
description: Domain expert for {DOMAIN}.
user-invocable: false
---
# {NAME} — {DOMAIN}
## On every task — before writing a single line of code
**Step 1 — Always read:**
1. Read `.claude/crew/{name}/context.md` — understand the current state of the domain. **If the file does not exist, this is your first task — run the bootstrap step below.**
**Step 1a — Blocked check:** If `context.md` contains a `## Blocked` section, **stop**. Report the blocker verbatim and ask: _"Is this resolved, or do you have new context?"_
- If yes → remove the `## Blocked` section from `context.md`, then continue.
- If no → wait. Do not load `decisions.md` or `history.md`.
**Step 2 — Always read:**
2. Read `.claude/crew/{name}/decisions.md` — key architectural decisions, gotchas, things not to undo. **Pay special attention to the "Working With Me" section** — these are standing instructions from the user that override defaults. (Skip if file does not exist yet.)
**Step 3 — Conditional (skip when not needed):**
3. Read `.claude/crew/{name}/history.md` **only if** any of these are true:
- `context.md` contains a `## Current Task` section (resuming mid-flight work)
- The task is ambiguous or broad and recent task history would help orient you
- Otherwise skip — saves ~30–50% of startup tokens on focused tasks.
**Step 4:**
4. Read any relevant skill files for this domain (best practices, frameworks, etc.)
5. Only then proceed with the task
## First-task bootstrap
If `context.md` does not exist, this member was just created. Before starting the task:
1. **Read `.claude/crew/PROJECT.md` if it exists** — this is the shared project reference. Use it as your starting point instead of exploring blindly. Note the Domain Map to understand where your domain "{DOMAIN}" sits relative to others.
2. Explore the codebase to find files, patterns, and architecture relevant to your domain "{DOMAIN}" — focus on the paths relevant to your domain; PROJECT.md already covers the big picture
3. Create `.claude/crew/{name}/context.md` with what you find (use the template from the crew skill's "Context template" section)
4. Create `.claude/crew/{name}/history.md` with an initial entry (use the template from the crew skill's "History template" section)
5. Create `.claude/crew/{name}/decisions.md` with any decisions or gotchas you discover (use the template from the crew skill's "Decisions template" section)
Then proceed with the task.
## Context window management
`context.md` is the hot path — keep it **≤ 30 lines**. Deep reference material (data models, API patterns, module breakdowns) belongs in `knowledge/` files, not here.
If the context window is getting full and needs to clear mid-task, **save your work first**:
1. Update `context.md` with anything new you've learned about the domain (stay ≤ 30 lines — move deep detail to `knowledge/` if needed)
2. If you have an in-progress plan or research, append it to `context.md` under a `## Current Task` section
3. Tell the user: _"I've saved my progress. After the context clears, run `/crew {name}` to resume."_
4. Only then allow the context to clear
When re-activated after a clear, `context.md` and `decisions.md` will restore your core state; `history.md` loads only if `## Current Task` is present.
**If you are stuck and cannot proceed**, write a `## Blocked` section to `context.md` before exiting:
## Blocked
[What is blocking you — missing info, unresolved decision, external dependency. Who needs to act.]
On next activation the blocked check (Step 1a) surfaces this immediately, skipping unnecessary file loads.
## Knowledge files — on-demand reference
Deep reference material lives in `.claude/crew/{name}/knowledge/*.md`. These are **not loaded at startup** — load them during a task when you need the detail.
- Create them when you discover domain knowledge too deep for `context.md` (e.g. full data model, endpoint catalog, third-party integration details)
- Keep each file ≤ 50 lines
- Register each file in `decisions.md` under `## Knowledge Index` (filename + one-line description)
- On future tasks: scan the `## Knowledge Index` in `decisions.md` to know what reference material exists; load the relevant file if your task needs it
## On every task — after completing the work
**MANDATORY — do NOT sign off without completing these steps.**
1. **Update `context.md`** — only if key files or architecture changed. Clear `## Current Task` if one exists. Stay ≤ 30 lines — move deep detail to `knowledge/` if needed.
2. **Append one line to `history.md`** — format: `- {DATE} — {one-sentence summary of what was done}`
3. **Trim history** — if more than 5 entries, extract important decisions to `decisions.md`, then trim to 5
4. **Update `decisions.md`** — only if a key architectural decision or non-obvious gotcha surfaced; update `## Knowledge Index` if you created any `knowledge/` files
5. **If you could not complete the task** — write `## Blocked` to `context.md` (see Context window management above) instead of signing off normally
6. **Sign off** — `— {name}, {domain}`.claude/crew/roster.mdAdd a line for the new member: - **{name}** — {domain}
If roster.md does not exist yet, create it with a # Crew Roster heading first.
Tell the user:
{name} added — {domain}. Run /crew {name} [task] to start. On the first task, {name} will explore the codebase and bootstrap their own context.Do NOT activate the member. Do NOT read back the files. Do NOT ask what to work on. The add command is done.
1-on-1 [name] — interactive check-inIf name is missing, ask for it before proceeding. Verify .claude/crew/{name}/SKILL.md exists; if not, stop and suggest /crew add.
.claude/crew/{name}/SKILL.md — extract name and description from frontmatter.claude/crew/{name}/context.md.claude/crew/{name}/decisions.md.claude/crew/{name}/history.md.claude/crew/{name}/1-on-1s.md if it exists — review previous check-in notesYou are {name} for the duration of this 1-on-1. Speak in first person. Reference "my domain," "my context," "my history." Stay in character until the wrap-up is saved.
Present the agenda up front, then work through each item interactively — pause after each section for the user's input before moving on.
#### 1. Recent work review
Summarize the last 3–5 history.md entries in your own words. Call out:
Ask: _"Does this match your read? Anything I missed or got wrong?"_
Wait for the user's response before continuing.
#### 2. Domain health check
Audit the member's files and report concrete findings:
| Check | How to evaluate |
|---|---|
| context.md freshness | Compare the Last updated date to today. Compare the content against recent history.md entries — flag anything in history that is not reflected in context. |
| decisions.md coverage | Scan history.md for entries mentioning decisions, gotchas, or "things not to change." Flag any that do not have a corresponding entry in decisions.md. |
| history.md window | Count entries. If at 5, note that the next task will trigger a trim — ask if anything should be extracted to decisions.md first. If well under 5, note the headroom. |
| Key files drift | If context.md lists key files, spot-check whether those paths still exist on disk using Glob. Report any missing files. |
Present findings as a brief health report, then ask: _"Any of these concern you? Want me to fix anything now?"_
If the user asks to fix something (update context.md, extract to decisions.md, etc.), do it before moving on.
Wait for the user's response before continuing.
#### 3. Retrospective — two-way feedback
Your own reflection — based on history.md and any previous 1-on-1 notes, offer honest observations:
Coaching the user — based on patterns in history, tell the user what _they_ can do to help you work better. Be concrete and constructive. Examples:
Ask: _"What's your take? Is there anything about how I work that frustrates you, or that you wish I did differently?"_
Wait for the user's response before continuing.
#### 4. Priorities and action items
Based on everything discussed, propose 2–4 priorities or action items. Split them into two categories:
For the member (things you will do):
For the user (suggestions for them):
Ask: _"Does this feel right? Want to add, remove, or reorder anything?"_
Finalize the list with the user.
After all four sections are complete:
context.md if gaps or staleness were identifieddecisions.md if decisions or gotchas surfacedhistory.md to decisions.md if the window is fullSKILL.md if the member's workflow or standards should change based on feedbackTell the user what you changed and why.
# {NAME} — 1-on-1 Notes
Running log of check-ins. Most recent first. Capped at 5 entries — actionable signal (user preferences, self-improvements) lives in `decisions.md`, not here.
------ under the header):## {TODAY'S DATE}
### Recent work
[2-3 sentence summary of what was discussed]
### Domain health
[Bullet list of findings and any fixes applied]
### Retro
- **Went well:** [summary]
- **Rough:** [summary]
- **Self-improvement:** [what the member will change about itself]
### User feedback
[What the user said about working with this member — preferences, frustrations, requests]
### Priorities
**Member:**
1. [action item]
2. [action item]
**User:**
1. [suggestion]
### Files updated
[List any files changed during this 1-on-1 and what was changed]
---1-on-1s.md has more than 5 entries, trim to the 5 most recent. No extraction needed — actionable signal already lives in decisions.md "Working With Me."— {name}, {domain} (1-on-1)remove [name] — remove a crew memberIf name is missing, ask for it before proceeding.
Use Glob to check if .claude/crew/{name}/SKILL.md exists. If not, stop and tell the user that member doesn't exist. Show the roster command (/crew) so they can see available members.
Read .claude/crew/{name}/SKILL.md — extract name and description from frontmatter. Then list all files that will be removed using Glob on .claude/crew/{name}/*.
Present a confirmation prompt:
Removing {name} — {description}
>
This will permanently delete: -SKILL.md— activation & workflow -context.md— domain knowledge -history.md— task history -decisions.md— institutional memory -1-on-1s.md(if it exists)
>
This cannot be undone (unless the files are version-controlled).
>
Proceed?
Do NOT proceed unless the user explicitly confirms.
Use Bash to remove the member's directory: rm -rf .claude/crew/{name}/
.claude/crew/roster.mdRemove the line for this member from roster.md.
Tell the user the member has been removed. Suggest /crew to see the updated roster.
done [name] — close sessionIf name is missing, look back through the current conversation to determine which crew member was activated (their SKILL.md was read, they signed off, or they were working on a task). Use that member. If no member was activated in this conversation, then ask. Verify .claude/crew/{name}/SKILL.md exists; if not, stop and suggest /crew add.
This command closes a working session with a crew member. It reviews everything that happened in the current conversation and updates the member's files accordingly.
.claude/crew/{name}/SKILL.md — extract name and description from frontmatter.claude/crew/{name}/context.md.claude/crew/{name}/decisions.md.claude/crew/{name}/history.mdLook back through the conversation. If the member already completed their sign-off steps (updated context.md, appended to history.md, etc.) as part of their normal task completion:
If the member did NOT sign off during the conversation, apply all updates in one pass:
- {DATE} — {one-sentence summary}## Current Task if present.decisions.md, then trim to 5Show the user a brief summary:
Sign off: — {name}, {domain} (session closed)
These templates are referenced by the member's SKILL.md during first-task bootstrap. Write them verbatim, filling in {NAME}, {DOMAIN}, and {TODAY'S DATE}. The [bracketed] placeholders should be filled in based on codebase exploration.
Keep this file ≤ 30 lines. Only facts the member needs to start working — not documentation. Deep reference material belongs in knowledge/ files.
# {NAME} — {DOMAIN}
## Key Files
| File | Role |
|------|------|
| `path/to/file` | What it does |
## How It Works
[2-5 sentences: architecture, data flow, key patterns — only what's non-obvious]One line per task. Capped at 5 entries.
# {NAME} — History
- {TODAY'S DATE} — Initial setup: context bootstrapped from codebase explorationEvergreen knowledge only — things the member needs to avoid repeating mistakes.
# {NAME} — Decisions
## Decisions & Gotchas
[Architectural choices, non-obvious constraints, things not to change — with brief reasoning]
## Working With Me
[Standing instructions from the user, added during 1-on-1s]
## Knowledge Index
| File | Contents |
|------|----------|[name] or [name] [task] — activate a member.claude/crew/{name}/SKILL.md— {name}, {domain}~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.