Guide
What you get: After one session the repo has a CLAUDE.md with verified commands, three slash commands in .claude/commands/, a .claude/settings.json permission split, and a report of what couldn't be verified and the top 3 risks. Best for Teams starting to use Claude Code in a repo that has no Claude setup yet..
Before you start
- Run it in an interactive Claude Code session and approve writes to .claude/ (headless claude -p blocks them)
- Fill safe_commands (we used npm test, npm run lint, npm run typecheck, git status, git diff)
- Review CLAUDE.md for rules copied from your personal ~/.claude/CLAUDE.md
Worked example (Nov 14, 2026, Claude Code 2.1.318 (claude-opus-5-5); Codex 0.151.0 (gpt-5.6-sol))
Input
bakehouse-api (Express 5 + TypeScript, CI workflow, generated types, a dangerous prod reset script, one failing test). Claude Code headless, twice (run 2 also allowed Write/Edit on ./.claude/**); Codex workspace-write.
Result
Codex: created CLAUDE.md, .claude/commands/test-file.md, check.md, review.md and a valid .claude/settings.json (allow tests/lint/typecheck/status/diff; ask for installs, git writes, db commands, the reset script). Claude Code: "I created `CLAUDE.md`, but the three slash commands and `.claude/settings.json` weren't written: permission to write in `.claude/` wasn't granted".
Claude Code FAILED here. Headless Claude Code refused every write under .claude/ in both runs, even with Write(./.claude/**) allowed, so steps 3-4 only produced drafts. Its CLAUDE.md copied the tester's personal rule ('Never commit, push or deploy without an explicit "commit to GitHub"', naming the tester in run 2) into the shared project file, and run 1 listed `npm run generate:types` under verified commands although it can't run (missing openapi-typescript). It did run the tests, report the failing test and name good risks (client-set prices, off-by-one discount, prod reset script). Codex's files were accurate (it flagged generate:types as unavailable); its CLAUDE.md includes a note that route tests were blocked by its sandbox. Codex also ran `claude doctor` and did a web search on Claude Code permission syntax on its own. After this test the prompt says not to copy personal or global rules into the project file (Claude Code did), to print files it can't write, and to show settings.json rather than write it.
How to check it worked
- Run every command in CLAUDE.md
- Check CLAUDE.md for rules from your personal config
- Open .claude/settings.json in /permissions and try one allowed and one ask command
Common problems
- claude -p (headless) can't write .claude/ files
- Personal ~/.claude/CLAUDE.md rules copied into the project file
- Commands listed as verified that were never run
Log in to join the discussion.