branch-workflow
FreeBranch and commit conventions that keep an agent's work reviewable — one branch per task, main stays clean, nothing force-pushed.
The English summary is being prepared. Showing the original description.
Design better agents, skills and hooks for Claude Code, checking the current spec instead of guessing at fields.
The English summary is being prepared. Showing the original description.
See how to installReview the instructions the agent will receive before you install.
Use the cc-docs skill to read the official Claude Code documentation before you design
anything against it — the spec moves, and this file is a map, not a substitute for it.
Use this knowledge to continuously improve how you work.
Location: ~/.claude/agents/ (user) or .claude/agents/ (project)
Key fields:
---
name: agent-name
description: When Claude should delegate here
tools: Read, Grep, Glob, Bash, Edit, Write
model: sonnet | opus | haiku | inherit
permissionMode: default | acceptEdits | bypassPermissions
skills: skill-1, skill-2
hooks:
PreToolUse: [...]
PostToolUse: [...]
---
System prompt content here...
Use subagents when:
Location: ~/.claude/skills/ (user) or .claude/skills/ (project)
Structure:
skill-name/
├── SKILL.md # Required - main instructions
├── reference.md # Optional - detailed docs
└── scripts/ # Optional - utilities
Key fields:
---
name: skill-name
description: When to apply this skill (triggers auto-loading)
allowed-tools: Read, Grep, Glob # Optional tool restriction
context: fork # Optional - run in subagent
---
Instructions here...
Use skills when:
Location: .claude/settings.json or subagent frontmatter
Events:
PreToolUse - Before tool executes (can block)PostToolUse - After tool executesSubagentStart - When subagent beginsSubagentStop - When subagent completesSessionStart - When session beginsExample:
{
"hooks": {
"PostToolUse": [{
"matcher": "Edit|Write",
"hooks": [{
"type": "command",
"command": "./scripts/auto-lint.sh"
}]
}]
}
}
Use hooks when:
Configuration: ~/.claude.json or .mcp.json
Access external tools:
Problem: Same context loaded every session Solution: Create a skill that auto-applies
---
name: project-context
description: Apply when working on [project]. Auto-loads conventions.
---
Problem: Manually checking things before commit Solution: Create PreToolUse hook
{
"hooks": {
"PreToolUse": [{
"matcher": "Bash(git commit:*)",
"hooks": [{"type": "command", "command": "./scripts/pre-commit-check.sh"}]
}]
}
}
Problem: Unclear when to use which agent Solution: Improve agent descriptions, add proactive triggers
description: Use proactively when [specific trigger]. Handles [specific task].
Problem: Decisions forgotten between sessions Solution: megg_remember after every significant decision
Fetch these with the cc-docs skill rather than trusting a remembered field list:
| Topic | URL |
|---|---|
| Subagents | https://code.claude.com/docs/en/sub-agents |
| Skills | https://code.claude.com/docs/en/skills |
| Hooks | https://code.claude.com/docs/en/hooks-guide |
| MCP | https://code.claude.com/docs/en/mcp |
| Headless mode | https://code.claude.com/docs/en/headless |
| Settings | https://code.claude.com/docs/en/settings |
| CLI reference | https://code.claude.com/docs/en/cli-reference |
When improving workflows:
No reviews yet. Tell others what you thought.
No login needed. Share how it worked for you, ask a question, or note where it did not run.
No comments yet. Be the first to write one.
Branch and commit conventions that keep an agent's work reviewable — one branch per task, main stays clean, nothing force-pushed.
The English summary is being prepared. Showing the original description.
Look up how Claude Code itself works — hooks, skills, subagents, MCP, plugins, settings — from the official docs, so answers come from the current spec instead of memory.
The English summary is being prepared. Showing the original description.
Run a feature end to end — scout the code, plan it, build it, and keep a session file so a closed terminal doesn't lose the thread.
The English summary is being prepared. Showing the original description.
Close out a session — summarise what changed, capture what was learned, and prepare the commit.
The English summary is being prepared. Showing the original description.
Hand over a spec and walk away — plans, builds, tests and audits on its own, stopping only at a real blocker.
The English summary is being prepared. Showing the original description.
Run the project's own tests, linter, type checker and build, and report what actually failed.
The English summary is being prepared. Showing the original description.