Starting a new repo is the best moment to set up Claude Code well. A small project settings file gets the whole team a sane baseline from day one. Here's a starter you can adapt.
A starter project file
Drop this into .claude/settings.json and commit it:
{
"model": "sonnet",
"permissions": {
"allow": [
"Read",
"Grep",
"Glob",
"Bash(npm run test:*)",
"Bash(npm run lint)"
],
"deny": [
"Bash(git push:*)"
]
},
"env": {
"NODE_ENV": "development"
},
"includeCoAuthoredBy": false,
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{ "type": "command", "command": "npx prettier --write \"$CLAUDE_FILE_PATHS\"" }
]
}
]
}
}
What each part buys you
modelpins the model so every teammate starts on the same one.permissionspre-approves reading and your test and lint scripts, and blocks pushing, so nobody gets surprise prompts on safe work while risky commands stay guarded.envsets the mode the project expects.includeCoAuthoredBykeeps the commit history in whatever style your team agreed on.hooksauto-formats files right after Claude edits them, so the code stays tidy without anyone thinking about it.
Tune it to the project
This is a starting point, not a law. Swap npm for your package manager, change the allowed scripts to match your setup, and adjust the model to fit the work. Keep secrets out — the project file is committed, so anything sensitive belongs elsewhere.
With a file like this in place, everyone who clones the repo gets a working, safe, consistent setup without any manual fiddling.
Comments
Be the first to comment.