five
Apply the Five Whys root cause analysis technique to investigate an issue
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/wesammustafa/Claude-Code-Everything-You-Need-to-Know/HEAD/.claude/commands/five.md -o ~/.claude/commands/five.mdfive.md
# Five Whys Analysis Apply the Five Whys root cause analysis technique to investigate issues. ## Description This command implements the Five Whys problem-solving methodology, iteratively asking "why" to drill down from symptoms to root causes. It helps identify the fundamental reason behind a problem rather than just addressing surface-level symptoms. ## Usage `five [issue_description]` ## Variables - ISSUE: The problem or symptom to analyze (default: prompt for input) - DEPTH: Number of "why" iterations (default: 5, can be adjusted) ## Steps 1. Start with the problem statement 2. Ask "Why did this happen?" and document the answer 3. For each answer, ask "Why?" again 4. Continue for at least 5 iterations or until root cause is found 5. Validate the root cause by working backwards 6. Propose solutions that address the root cause ## Examples ### Example 1: Application crash analysis ``` Problem: Application crashes on startup Why 1: Database connection fails Why 2: Connection string is invalid Why 3: Environment variable not set Why 4: Deployment script missing env setup Why 5: Documentation didn't specify env requirements Root Cause: Missing deployment documentation ``` ### Example 2: Performance issue investigation Systematically trace why a feature is running slowly by examining each contributing factor. ## Notes - Don't stop at symptoms; keep digging for systemic issues - Multiple root causes may exist - explore different branches - Document each "why" for future reference - Consider both technical and process-related causes - The magic isn't in exactly 5 whys - stop when you reach the true root cause
Use this agent for code quality review of completed implementations — assessing maintainability, performance, test coverage, and standards compliance as the final quality gate before security review. For example: reviewing a finished frontend/backend feature and producing prioritized findings (Blocker/High-Priority/Medium/Nitpick) with actionable fixes.
Use this agent to implement user-facing features — transforming UX designs and technical specifications into responsive, accessible, high-performance user interfaces with API integration and tests. Delegate frontend build work such as UI components, styling, client-side state and data handling, or web performance optimization.
Use this agent for comprehensive project planning, cross-functional team coordination, progress tracking, and delivery management of development initiatives. For example: planning a 6-week user authentication project across a UX designer, backend developer, and QA tester, or regaining control of a project facing delays and scope creep.
Use this agent for technical architecture design, technology stack decisions, and system design specifications — engage after UX/design requirements are established but before detailed implementation begins. For example: planning the architecture for an event management dashboard from completed UX designs, choosing the stack and patterns for a new microservices project, or recommending scaling strategies for performance issues under load.
Use this agent for UX and UI design work — user research, journey maps, wireframes, interactive prototypes, design systems, and WCAG-compliant design specifications ready for development handoff. Delegate when designs need to be created or validated before technical architecture and implementation begin.
Create a branch, split changes into logical commits, and open a pull request
Run a multi-perspective PR review (product, dev, QA, security, DevOps, UX) and post it to GitHub
Development practices and TDD workflow to follow before starting a feature