One guardrail
Claude Code can read your project, see git state, and use your terminal with your user permissions. Set permissions before you ask it to code.
Your hackathon repo should show this clearly. Commit shared settings that protect secrets, then verify Claude loaded them.
Pick a mode
Use Manual for real repo work. It asks before edits or commands and shows diffs for approval.
Use Accept edits only for small, low-risk changes. It auto-accepts file edits and common filesystem commands like mkdir, touch, and mv, but still asks before other terminal commands.
Use Plan first
Plan mode lets Claude read files and propose a plan without editing source files until you approve.
Use it for multi-file changes, unfamiliar code, auth, database work, payment flows, deployment config, or anything that can break your demo.
claude --permission-mode plan
# Or toggle during a session with Shift+Tab
# until the status bar shows plan mode on.Settings files
Shared project settings are committed at .claude/settings.json. Use this for team rules, like blocking .env reads.
Your user settings live at ~/.claude/settings.json. Personal settings for one repo live at .claude/settings.local.json. Keep personal overrides out of commits.
Deny wins
Settings precedence is managed settings, command-line arguments, project-local settings, shared project settings, then user settings.
Deny rules are stronger than allow rules. If a tool is denied at any level, no other setting can allow it back.
Block env reads
Example: your campus food app has a frontend, backend, and local .env with database URLs or test keys. Claude does not need real secrets to build features.
Add shared settings from the repo root. This protects root .env and files like .env.local, .env.production, and .env.test.
pwd
# /Users/you/hackindia-campus-food
mkdir -p .claude
cat > .claude/settings.json <<'EOF'
{
"permissions": {
"deny": [
"Read(./.env)",
"Read(./.env.*)"
]
}
}
EOF
git diff -- .claude/settings.json
git add .claude/settings.json
git commit -m "Add Claude Code safety settings"Avoid broad trust
Do not run Claude Code from your home folder or Downloads. Run it from the repo root so the workspace stays narrow.
Do not treat Bypass permissions as a speed boost. It skips permission prompts and should be used only in sandboxed containers or VMs.
Do this now
Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.
0 of 5 done
# From the repo root
claude
# Inside Claude Code
/status
# In your terminal, if settings look wrong
claude doctor