From clone to working hooks in 5 minutes.
git clone https://github.com/Bluepandafox/claude-code-production-patterns
cd claude-code-production-patternsOpen Claude Code in this directory. The SessionStart hook fires immediately and prints a session brief (it will be empty since no tracker.md exists yet -- that's expected).
# Check that settings.json is wired up
cat .claude/settings.jsonYou should see hooks registered for SessionStart, PreToolUse, and PostToolUse.
python scripts/hygiene_audit.pyOn a fresh clone, expect 4 WARNs: skills directory missing, MANIFEST.sha256 not found, tracker.md missing, follow_ups.md missing. These are files you create as you customize the project. Zero FAILs means the architecture is intact.
Step A: Edit CLAUDE.md
Replace the placeholder skill descriptions with your own skills and trigger phrases.
Step B: Update paths in session_start.py
Change TRACKER_PATH, FOLLOWUPS_PATH, and LEARNING_LOG_PATH to match your project's file layout.
Step C: Update is_quality_target() in quality_check.py
Tell the quality gate which files to check. Default is output/ and reports/ directories.
Step D: Customize banned_patterns.md
Add or remove patterns for your domain. The quality gate will pick them up automatically.
Step E: Create your tracker
Create tracker.md with this format:
## **Project Name**
**Status:** 🟡 In Progress
## **Another Project**
**Status:** ✅ DoneRun the session brief manually to confirm it reads correctly:
echo '{}' | python .claude/hooks/session_start.pymkdir .claude/skills/my-skillCreate SKILL.md with frontmatter:
---
name: my-skill
description: One-line description of what this skill does
trigger: "do X", "run X", "start X"
---
# My Skill
...workflow steps...The architecture guard will enforce that you stay under 10 user-facing skills.
python -m pytest tests/ -vAll tests should pass on a fresh clone. Add tests as you extend the hooks.
Hook not firing:
- Check
settings.jsonhas the hook registered for the right event - Check the hook file exists at the path in the command string
- Run
python scripts/hygiene_audit.pyto surface configuration issues
Architecture guard blocking a write:
- Read the block message -- it will cite the specific rule being violated
- Check
.claude/ARCHITECTURE.mdfor the rule's rationale - Fix the underlying issue rather than disabling the guard
Quality gate blocking a write:
- The violation list tells you exactly what to fix
- Run
python scripts/hygiene_audit.py --jsonfor machine-readable output - If a check is wrong for your domain, update
is_quality_target()to exclude that path