agentleFS
AhmedTmorganAhmedTmorgan/crew/skills/setup/SKILL.md

setup

Skill1 starsChanged 3 months agoMITView on GitHub

Prepare a project for crew, once per repository: detect its real test/lint/typecheck/build, migration, and deploy commands, write .crew/config.json, create the BUGS.md problem journal, add the .gitignore and .gitattributes lines, add a short crew section to CLAUDE.md, and check the tools (codex, gh, node). Use when crew:feature finds no .crew/config.json, or when the user says "set up crew here" / "جهّز المشروع".

  • Installs packages

192 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use add-discord, add-slack and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • MicrosoftSkill

    add-discord

    Add Discord bot channel integration via Chat SDK.

    Also in 11 projects that use this

  • MicrosoftSkill

    add-slack

    Add Slack channel integration via Chat SDK.

    Also in 11 projects that use this

  • +10 more from microsoft

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 2 are distinctive, and 7 are very specific to this project.

  • 0

    Common

    Most of the 168 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 7

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do each step, and show the user the resulting config before writing it.

    line 13
  2. Very specific:

    Verify it: an LSP documentSymbol call on a real source file should return symbols, not an error.

    line 31
  3. Very specific:

    If Codex is missing or reports outdated_cli, tell the user the exact fix (npm i -g @openai/codex@latest) and ask before running it.

    line 35
  4. Very specific:

    If gh is not authenticated, the user must run gh auth login themselves.

    line 37
  5. Very specific:

    Read and don't guess. Check package.json scripts, Makefile, pyproject.toml, Cargo.toml, CI workflows (.github/workflows/*), and CLAUDE.md / …

    line 42
  6. Very specific:

    If a project documents a special deploy path (a deploy script, a guard), use exactly that.

    line 55
  7. Very specific:

    Never vercel --prod when a script exists.

    line 56
  8. Very specific:

    Start from ${CLAUDE_PLUGIN_ROOT}/templates/crew.config.json.

    line 82
  9. Distinctive:

    If the project already has scattered bug or audit docs, offer to import their still-open items as journal entries.

    line 105

“Common” is measured: kept by at least 6 in 10 of the 168 edited versions of this file we could read. “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

crew:setup

Do each step, and show the user the resulting config before writing it.

1. Tools

node --version; git --version; gh auth status; codex --version
node "${CLAUDE_PLUGIN_ROOT}/scripts/codex-run.mjs" --probe

Code intelligence is a token lever, so check it here. Crew's implementers are told to find code with the LSP tool instead of reading whole files, which needs a language server for this project's language:

  • TypeScript/JavaScript → the typescript-lsp plugin (/plugin install typescript-lsp@claude-plugins-official) plus npm i -g typescript-language-server typescript. Python → pyright-lsp, Go → gopls-lsp, Rust → rust-analyzer-lsp, and so on.
  • The server starts in the workspace, so the project's own toolchain must be installed there (for TypeScript: node_modules/typescript in each worktree, which the install command provides).
  • Verify it: an LSP documentSymbol call on a real source file should return symbols, not an error. If it errors, tell the user which plugin or package is missing — don't leave the agents guessing and reading whole files.
  • If Codex is missing or reports outdated_cli, tell the user the exact fix (npm i -g @openai/codex@latest) and ask before running it.
  • If gh is not authenticated, the user must run gh auth login themselves.
  • Crew still works without Codex. The roles fall back to Claude agents.

2. Detect the project's real commands

Read and don't guess. Check package.json scripts, Makefile, pyproject.toml, Cargo.toml, CI workflows (.github/workflows/*), and CLAUDE.md / AGENTS.md / README / runbooks. CI is the best evidence of which gates the project actually trusts.

KeyMeaningExamples
installinstall deps in a fresh worktreenpm ci
typecheck / lint / test / buildthe gatesnpx tsc --noEmit, npm run lint, npm test
migrateDevapply migrations to a non-production databasenpx supabase db push --db-url $DEV_DB_URL, npx prisma migrate dev
migrateProdapply migrations to productionnpx supabase db push
deploythe ONLY sanctioned production deploy commandpwsh scripts/deploy-prod.ps1
verifyUrla real page that proves the deploy workshttps://example.com/login
  • If a project documents a special deploy path (a deploy script, a guard), use exactly that. Never vercel --prod when a script exists.
  • Unknown commands stay null. crew:ship stops and asks when it needs one.
  • baseBranch: gh repo view --json defaultBranchRef -q .defaultBranchRef.name.
  • guard.askPatterns: extra command substrings that must always prompt the user (production scripts, production DB CLIs). guard.denyPatterns: substrings that must never run. guard.externalWritePatterns: substrings of commands that write to third-party services (a provider's API scripts, scripts/probes/*-create*, an SDK CLI) — the guard prompts on them, so a "live proof" never creates something at Meta, Stripe, or Shopify without the owner.
  • The guard matches command text; it is a second lock, not a permission system. Offer real branch protection on the forge, and enable it only after the user says yes:
    gh api -X POST repos/{owner}/{repo}/rulesets --input - <<'JSON'
    {"name":"crew: PRs only on <base>","target":"branch","enforcement":"active",
     "conditions":{"ref_name":{"include":["~DEFAULT_BRANCH"],"exclude":[]}},
     "rules":[{"type":"deletion"},{"type":"non_fast_forward"},{"type":"pull_request","parameters":{"required_approving_review_count":0,"dismiss_stale_reviews_on_push":false,"require_code_owner_review":false,"require_last_push_approval":false,"required_review_thread_resolution":false}}]}
    JSON
    With this, even a command the guard misses cannot push to the base branch or delete it. Also point the user at Claude Code's own permission rules (/permissions) for the same commands.
  • limits.parallel: how many tickets crew:run builds at once (default 3). Lower it on a slow machine, or when every worktree needs a heavy install.
  • tracker: local (the default: tickets are files) or github (also mirror the spec and tickets as issues).

3. Write the config

Start from ${CLAUDE_PLUGIN_ROOT}/templates/crew.config.json. Keep only the keys that differ from it, plus commands and baseBranch. Show the result to the user, adjust, then write .crew/config.json.

Role defaults:

  • orchestrator: Fable 5.1, effort medium
  • backend: Codex gpt-5.6-sol, effort high
  • frontend and integration: Opus 5
  • review: Codex gpt-6-astra, effort high
  • migrations: Opus 5

Change a role only if the user asks. For example, to run the backend on Claude only: "backend": {"implementer": "agent", "agent": "crew:backend-builder"}.

4. Journal, ignores, attributes

node "${CLAUDE_PLUGIN_ROOT}/scripts/bugs.mjs" init --project "<name>"
  • .gitignore: add .crew/tasks/ and .crew/worktrees/. Commit .crew/config.json.
  • .gitattributes: add BUGS.md merge=union. Parallel branches that each add journal entries then merge without conflicts, and bugs.mjs check --fix repairs ids afterwards.
  • If the project already has scattered bug or audit docs, offer to import their still-open items as journal entries. Don't do it unasked.

5. CLAUDE.md section

Append this short section to the project's CLAUDE.md (create the file if missing). Keep it short. The skills carry the detail.

## crew
- Problem journal: `BUGS.md`. Before working in an area, check its open entries. Record every
  problem you hit, its root cause and fix, and every security issue — use the `crew:bugs` skill.
- Big tasks run through `/crew:feature`. Production deploys and production migrations happen only
  after the owner approves in chat.

If the owner writes to Claude in an RTL language (check git log messages, the issue tracker, or how they talk in this session), add this too — mixed-direction lines arrive scrambled on their screen, and every crew question round and report is full of ids and numbers:

- Writing to the owner in Arabic: start every Arabic line with an Arabic word (never an id, a
  version, or a digit), keep one direction per line, put identifiers in backticks at the end of the
  line or in their own table column, and never put an em dash between Arabic and Latin text.

The full version, with a worked question round, is in ${CLAUDE_PLUGIN_ROOT}/references/rtl-output.md. Offer to put the same rules in the owner's ~/.claude/CLAUDE.md, where they apply to every project, not just this one — and only write that file if they say yes.

6. Report

Tell the user in their language:

  • what was detected
  • what is still null
  • the role table
  • whether Codex is ready

Then commit the setup on a branch, or leave it staged if they prefer.

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.