Claude Code Development Workflow¶
This guide explains how to use Claude Code with projects built from the claude-project-template. The template provides a structured development workflow with rules, skills, hooks, and agents that enforce conventions and automate repetitive tasks.
Overview¶
Claude Code is Anthropic’s CLI tool for AI-assisted software development. The template configures it with:
Rules — Enforce coding standards (testing, comments, git conventions)
Skills — Automate workflows (steering, review, commit)
Hooks — Guard against mistakes (block force-push, validate edits)
Agents — Delegate specialized tasks (code review, build resolution)
Commands — Multi-step project setup workflows
All configuration lives in the .claude/ directory at the project root.
Directory Structure¶
.claude/
├── rules/ # Behavioral rules Claude Code follows
│ ├── testing.md
│ ├── code-comments.md
│ ├── git-conventions.md
│ ├── steering-workflow.md
│ └── documentation.md
├── skills/ # Slash-command workflows
│ ├── steering/ # /steering — plan/implement/review cycle
│ ├── catchup/ # /catchup — restore session state
│ ├── review/ # /review — code review
│ ├── review-docs/ # /review-docs — document quality review
│ ├── git-workflow/ # /git-workflow — branch/commit/PR automation
│ ├── add-feature/ # /add-feature — full feature implementation
│ ├── add-rule/ # /add-rule — add new rules
│ ├── development-guidelines/ # /development-guidelines
│ ├── implementation-validator/ # /implementation-validator
│ └── prd-writing/ # /prd-writing — PRD creation
├── commands/ # Multi-step command workflows
│ └── setup-project.md # Initial project setup
├── agents/ # Subagent definitions
│ ├── code-reviewer.md # Automated code review checklist
│ └── build-resolver.md # Build error diagnosis
├── hooks/ # Shell scripts triggered by events
│ ├── validate-bash.sh
│ ├── validate-file-edit.sh
│ ├── check-tasklist.sh
│ ├── pre-compact-save.sh
│ ├── session-info.sh
│ └── check-prohibition-language.sh
├── settings.json # Shared permissions and hook config
└── settings.local.json # Local-only permissions (not committed)
Rules¶
Rules are Markdown files in .claude/rules/ that define mandatory behavioral constraints. Claude Code reads these on every interaction.
Rule File |
Purpose |
|---|---|
|
Require tests for all code changes. Tests go in |
|
Require KDoc comments on classes and non-trivial methods in English |
|
Emoji commit prefixes, feature-unit commit granularity, branch naming |
|
Create |
|
Separate permanent docs ( |
Rules use imperative language and are treated as non-negotiable constraints. To add a new rule, create a .md file in .claude/rules/ and reference it from CLAUDE.md.
Skills¶
Skills are slash-command workflows invoked with /<skill-name>. Each skill has a SKILL.md file defining its behavior.
Core Workflow Skills¶
Skill |
Command |
Description |
|---|---|---|
Steering |
|
Create requirements, design, and tasklist documents |
|
Execute tasklist with progress tracking |
|
|
Post-implementation reflection |
|
Catchup |
|
Restore session state after |
Review |
|
Run code review on uncommitted changes |
Git Workflow |
|
Create branch following naming conventions |
|
Auto-detect emoji prefix and generate commit message |
|
|
Create PR with title, summary, and test plan |
|
|
Show branch state and convention reminder |
Code Quality Skills¶
Skill |
Command |
Description |
|---|---|---|
Review Docs |
|
Evaluate documents on 5 criteria (completeness, clarity, consistency, implementability, measurability) |
Implementation Validator |
|
Validate code on 5 criteria (spec compliance, code quality, test coverage, security, performance) |
Development Guidelines |
|
Check or create coding guidelines |
Project Setup Skills¶
Skill |
Command |
Description |
|---|---|---|
PRD Writing |
|
Create product requirements document from template |
Add Feature |
|
Full feature implementation workflow (steering + code + tests + commit) |
Add Rule |
|
Add a new rule file to |
Example: Using the Steering Skill¶
# 1. Plan a feature
> /steering plan jsx-highlighting
# Claude creates .steering/20260222-001-jsx-highlighting/ with:
# requirements.md, design.md, tasklist.md
# 2. Review and approve the documents, then implement
> /steering implement .steering/20260222-001-jsx-highlighting
# 3. After implementation, review
> /steering review .steering/20260222-001-jsx-highlighting
Commands¶
Commands in .claude/commands/ define multi-step workflows that combine multiple skills.
Command |
File |
Steps |
|---|---|---|
|
|
Read ideas → Create PRD → Create functional design |
Commands are invoked the same way as skills: /setup-project. Feature work is driven by the add-feature skill (skills/add-feature/).
Agents¶
Agents are subagent definitions that Claude Code spawns as specialized workers. They run in isolated contexts and return structured reports.
code-reviewer¶
Performs an 8-point automated code review:
Documentation comments present
Test files exist for changes
Auto-generated files not manually edited
Package/module structure follows conventions
Code style adherence
Test quality (meaningful assertions, no dead code)
Dead code detection (unused imports, commented blocks)
Edge case coverage (null/empty, boundaries, errors)
Output: Markdown checklist with PASS/WARN/FAIL per item.
build-resolver¶
Diagnoses build failures in 4 steps:
Reproduce the error using the build command from
CLAUDE.mdClassify: Compile / Build Config / Dependencies / Framework API / Code Generation
Identify root cause (file, line, context)
Present fix as concrete code changes
Hooks¶
Hooks are shell scripts that run automatically in response to Claude Code events. They are configured in .claude/settings.json.
Hook Script |
Trigger |
Behavior |
|---|---|---|
|
PreToolUse (Bash) |
Blocks |
|
PreToolUse (Edit/Write) |
Blocks edits to auto-generated files (customizable) |
|
PostToolUse (Edit/Write) |
Blocks negative phrasing in rule files |
|
Stop |
Warns if tasklist has incomplete tasks |
|
PreCompact |
Saves session state to |
|
SessionStart |
Displays dev environment info (branch, tool versions) |
Hook Exit Codes¶
Code |
Meaning |
|---|---|
|
Allow (no message) |
|
Allow with informational message |
|
Block the action with error message from stderr |
Example: validate-bash.sh¶
#!/bin/bash
# Reads tool input from stdin as JSON
INPUT=$(cat)
COMMAND=$(echo "$INPUT" | jq -r '.command // empty')
if echo "$COMMAND" | grep -qE 'git\s+push\s+.*--force'; then
echo "BLOCKED: Force push is not allowed." >&2
exit 2
fi
exit 0
Settings¶
settings.local.json (Local Only)¶
Local settings are for developer-specific permissions. This file is not committed to version control:
{
"permissions": {
"allow": [
"Bash(git commit *)"
]
}
}
Permanent Documentation¶
The docs/ directory contains permanent project documentation that evolves with the project:
File |
Purpose |
|---|---|
|
Product vision, user stories, feature roadmap |
|
Component design, extension point mapping |
|
Technology stack, constraints, performance requirements |
|
Coding conventions, test conventions |
|
Source code layout, file placement rules |
|
Domain terminology definitions |
These documents are referenced from CLAUDE.md using @docs/filename.md syntax, making them available as context in every Claude Code session.
Steering Workflow¶
The steering workflow is the core development process. Every non-trivial code change follows this cycle:
1. Plan¶
Create a .steering/ directory with three documents:
.steering/20260222-001-jsx-highlighting/
├── requirements.md # What to build (user-approved)
├── design.md # How to build it (user-approved)
└── tasklist.md # Step-by-step tasks (user-approved)
The directory name format is [YYYYMMDD]-[NNN]-[title] where NNN is a sequential number.
2. Implement¶
Work through tasklist.md one task at a time:
Mark
[ ]→[x]when starting each task (not when finishing)Implementation happens in a git worktree (isolated from main)
Commit at feature-unit granularity (implementation + test + config = 1 commit)
3. Review¶
After implementation:
Run
/reviewfor automated code reviewVerify build passes:
./gradlew buildPluginVerify tests pass:
./gradlew testMark all tasklist items as
[x], including the merge taskMerge to main with user approval
Session Recovery¶
If context is compacted or cleared, use /catchup to restore:
Reads saved state from
.claude/session-state.mdFinds the latest
.steering/*/tasklist.mdReports current branch, modified files, and next task
Customization¶
Adding a New Rule¶
Create
.claude/rules/<rule-name>.mdwith clear, imperative constraintsAdd
@.claude/rules/<rule-name>.mdtoCLAUDE.mdin the rules sectionUse the mandatory preamble for enforced rules:
The following are mandatory behavioral instructions to be followed without exception.
Adding a New Skill¶
Create
.claude/skills/<skill-name>/SKILL.mdDefine the skill’s trigger, inputs, steps, and output format
The skill becomes available as
/<skill-name>
Adding a New Hook¶
Create
.claude/hooks/<hook-name>.sh(make it executable)Register it in
.claude/settings.jsonunder the appropriate triggerUse exit code
0to allow,2to block
Adding a New Agent¶
Create
.claude/agents/<agent-name>.mdDefine the agent’s checklist, analysis steps, and output format
Reference it from skills or manual invocations