CCA-F Prep — P4: Claude Code Dev Workflow
CCA-F exam project P4 — Claude Code dev workflow (hands-on lab).
Open this folder in Claude Code to exercise D2 (Claude Code) + D4 (MCP connection).
Build steps (verify each)
- 1. Write CLAUDE.md for a real project → CLAUDE
- 2. Create one custom skill from scratch → .claude/skills/exam-review/skill
- 3. Configure PostToolUse hook with exit codes → .claude/hooks/post_tool_use.py
- 4. Configure PreToolUse hook with exit code 2 (block) → .claude/hooks/pre_tool_use.py
- 5. Connect one MCP server in Claude Code → .mcp.json → p5-custom-mcp-server
- 6. Test all components working together (run verification below)
Quick start
cd examples\CCA-F-PREP\p4-claude-code-workflow
claude
In Claude Code:
/exam-review
Then ask Claude to call the cca-f-tools MCP server (ticket lookup or health check).
Hook exit codes (exam-critical)
| Code | PreToolUse | PostToolUse |
|---|---|---|
| 0 | Allow | Success — continue |
| 1 | — | Warning logged — continue |
| 2 | Block tool | — |
Configured in .claude/settings.json.
MCP connection
.mcp.json launches the P5 server via stdio:
"cca-f-tools": {
"command": "python",
"args": ["../p5-custom-mcp-server/server.py"],
"env": { "MCP_API_KEY": "${MCP_API_KEY}" }
}
Set MCP_API_KEY=dev-local-key for local testing (must match P5 server).
Verification script
cd examples\CCA-F-PREP\p4-claude-code-workflow
python verify_setup.py
Expected: all checks pass.
Exam traps this project covers
- D2: Project-scoped CLAUDE.md, skills, hook exit codes, permissions
- D4: stdio MCP transport, env-based API key auth
See docs/02-domain-traps.