Create project-owned agent files (`.claude/agents/<name>.md`). Use when the user explicitly asks to create, add, scaffold, draft, or design a new agent, or when repeated conversation patterns or `git log` activity suggest the same workflow keeps being handled manually and should become an agent.
Audit and improve agent files (`.claude/agents/*.md`). Use when the user asks to check, audit, review, score, or improve agents, mentions "agent maintenance" or "agent quality", wonders which agents are missing or duplicated, wants to tighten tool allowlists, or wants to know if their agent descriptions trigger reliably.
Use when onboarding a repository to the AI workflow, when .ai/project.yaml has project_name: unknown, or when project metadata is incomplete or stale.
Use when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing
Maintain project-specific workflow metadata (project.yaml, memory.md, decisions.md) after bootstrap, CI changes, restructuring, or refresh requests—never alter the immutable core; also use when asked to consolidate, compact, or tighten memory/tokens.
Use when a development task has testable behavior and should be built test-first with independently verified failing-then-passing gates. Default route for medium/large TDD-able code tasks; non-testable tasks belong to the orchestrate skill.
Use when a coding request needs breaking into phases before implementation — any task larger than a tiny local edit (trivial is ~1 file, under 10 lines). Produces a minimal, executable plan with narrow execution packets. Normally dispatched by the orchestrator; invoke directly only when the user wants a plan without execution.
Recover from failed implementation attempts by isolating wrong assumptions and proposing the next narrow experiment. Use when a task has hit repeated failure, unclear regressions, or implementation drift that spans systems — not for a bug localized to a single file.