agentleFS
aykyusufaykyusuf/crew-chief/skills/crew-setup/SKILL.md

crew-setup

Skill8 starsChanged 10 days agoMITView on GitHub

Installs crew-chief's tiered agents, read-only guard, and routing policy into the current project's .claude/ directory and CLAUDE.md, for use without the plugin (for example after npx skills add). Optionally adds session handoff files.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Do not write any effort or model setting into .claude/settings.json: project settings would override each user's own effort preference.

    line 26
  2. Very specific:

    Run the guard once to prove it blocks writes from a read-only agent and leaves others alone: printf '%s' …

    line 30
  3. Very specific:

    Check that .claude/settings.json still parses as JSON and that the crew-chief guard entry's matcher is …

    line 35
  4. Very specific:

    If .claude/agents/ did not exist before this run, Claude Code must be restarted before the new agents appear.

    line 37
  5. Very specific:

    Only if the user passed --handoff or says yes when offered.

    line 42
  6. Distinctive:

    Do not commit anything. Report what was created and anything you could not fill in.

    line 59

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Set up crew-chief in the current project. Arguments: $ARGUMENTS. Assets are in ${CLAUDE_SKILL_DIR}/assets/.

1. Check what is already there

  • If agent types named crew-chief:scanner and so on are available to you, the crew-chief plugin is installed: its agents, guard, and policy are already active. Do not copy agents or hooks (that would create duplicates). Say so, and continue only with step 5 (--handoff) or step 6 (--explore) if the user passed that flag or wants it.
  • List .claude/agents/, .claude/hooks/, .claude/settings.json, and CLAUDE.md in the project root. Note any file that setup would overwrite: scanner.md, deep-reader.md, implementer.md, implementer-hard.md, mechanic.md, planner.md, reviewer.md, ui-implementer.md, ui-designer.md, ui-scout.md, ui-smoke.md, ui-tester.md, crew-chief-guard.sh.

2. Confirm the plan

Show the user, in their language, exactly which files will be created or replaced, that a guard hook (Bash, Write, Edit) will be added to .claude/settings.json, or an older Bash-only crew-chief guard entry there widened, and that a ## Model and subagent routing block will be added to CLAUDE.md. If any existing file would be overwritten, ask before replacing it; offer to skip that file. Do not continue without confirmation.

3. Install

  1. Copy every file in ${CLAUDE_SKILL_DIR}/assets/agents/ to .claude/agents/.
  2. Copy ${CLAUDE_SKILL_DIR}/assets/hooks/crew-chief-guard.sh to .claude/hooks/, then make the guard executable (chmod +x .claude/hooks/crew-chief-guard.sh).
  3. Merge ${CLAUDE_SKILL_DIR}/assets/settings-hook.json into .claude/settings.json (create it if missing): append its entry to hooks.PreToolUse, keep every existing key and hook. If a hook command containing crew-chief-guard.sh is already there, do not append a second entry; instead set the matcher of that existing crew-chief entry to Bash|Write|Edit|NotebookEdit|MultiEdit (older installs have Bash only, and then the copied deep-reader and reviewer, which can write reports, would be unguarded). Keep the file valid JSON. This wires the read-only guard; it is deliberately not in the agents' frontmatter, because frontmatter hooks of project agents are skipped until the folder's trust dialog is accepted and never run in -p sessions.
  4. Insert ${CLAUDE_SKILL_DIR}/assets/claude-md-section.md into CLAUDE.md (create the file if missing). If a block between <!-- crew-chief:start and <!-- crew-chief:end --> already exists, replace that block; otherwise append it at the end. Leave the rest of CLAUDE.md untouched.

Do not write any effort or model setting into .claude/settings.json: project settings would override each user's own effort preference.

4. Verify

  • Run the guard once to prove it blocks writes from a read-only agent and leaves others alone: printf '%s' '{"agent_type":"scanner","tool_input":{"command":"touch x"}}' | .claude/hooks/crew-chief-guard.sh --project; echo "exit $?" must print exit 2. printf '%s' '{"agent_type":"scanner","tool_input":{"command":"git log -1"}}' | .claude/hooks/crew-chief-guard.sh --project; echo "exit $?" must print exit 0. printf '%s' '{"agent_type":"implementer","tool_input":{"command":"touch x"}}' | .claude/hooks/crew-chief-guard.sh --project; echo "exit $?" must print exit 0. printf '%s' '{"agent_type":"deep-reader","tool_name":"Write","tool_input":{"file_path":"'"$PWD"'/x.txt"}}' | .claude/hooks/crew-chief-guard.sh --project; echo "exit $?" must print exit 2 (a read-only agent may write only into the crew-chief reports folder).
  • Check that .claude/settings.json still parses as JSON and that the crew-chief guard entry's matcher is Bash|Write|Edit|NotebookEdit|MultiEdit.
  • Tell the user:
    • If .claude/agents/ did not exist before this run, Claude Code must be restarted before the new agents appear.
    • How to override: "do it yourself", "use agents", "give X to Sonnet at medium", @agent-implementer-hard ....

5. Optional: session handoff files (--handoff)

Only if the user passed --handoff or says yes when offered. Follow the crew-handoff skill (/crew-chief:crew-handoff, or /crew-handoff when installed with npx): it creates STATUS.md, tasks.json, and PROGRESS.md only where nothing equivalent exists, shows a preview first, and adds a marked routine block to CLAUDE.md.

6. Optional: a cheap Explore (--explore)

Only if the user passed --explore or says yes when offered. In current Claude Code the built-in Explore subagent runs on the session's model instead of always on Haiku (Anthropic's model guide says so and suggests the fix below; not yet seen live by crew-chief). A plugin cannot replace it, because plugin agents are namespaced, so this step writes a user-level agent. Show the file and where it goes (~/.claude/agents/Explore.md for every project, or .claude/agents/Explore.md for this one; ask which), and never overwrite an existing file of that name. Content:

---
name: Explore
description: Read-only search of the codebase: where something is defined, which files use it, what the structure looks like. Use for broad lookups so the main session's context stays small.
tools: Read, Grep, Glob, Bash
model: haiku
---
Search the codebase and report what you found with file paths and line numbers. Never edit files, change git state or install anything. Answer with the findings, not file dumps.

Tell the user it takes effect after a restart, and that deleting the file brings the built-in back.

Do not commit anything. Report what was created and anything you could not fill in.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.