This skill should be used when debugging failures, "test is failing", "error I can't explain", "something broke", or any situation requiring structured diagnosis. Provides a 4-phase root-cause approach. Do not use for planning tests or writing new code.
From forgenpx claudepluginhub flox/forge-plugin --plugin forgeThis skill uses the workspace's default tool permissions.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Facilitates interactive brainstorming sessions using diverse creative techniques and ideation methods. Activates when users say 'help me brainstorm' or 'help me ideate'.
A structured 4-phase approach to debugging that prevents wild goose chases and thrashing. Adapted from proven debugging methodologies for Forge workflows.
Anti-pattern (debugging thrash):
Systematic approach:
Goal: Understand WHY the error is happening, not just WHAT the error is.
Actions:
For Python errors:
For TypeScript/JavaScript errors:
For build errors:
Output:
Root Cause: {Specific reason the error occurs}
Evidence: {Error message, stack trace, or log showing this}
Goal: Identify if this is a known pattern or new failure mode.
Actions:
Common patterns:
Output:
Pattern: {Known pattern name or "New failure mode"}
Similar cases: {Related errors or fixes in codebase}
Goal: Form testable hypothesis BEFORE making changes.
Actions:
Good hypothesis characteristics:
Example hypotheses:
❌ Bad: "The file path is wrong"
✅ Good: "The cd command failed silently because directory
doesn't exist, so subsequent commands run in wrong location"
Output:
Hypothesis: {Specific prediction of what will fix it}
Test: {How to verify if hypothesis is correct}
Expected outcome: {What should happen if hypothesis is right}
Goal: Apply fix and verify it solves the problem without creating new issues.
Actions:
Validation methods:
Anti-patterns:
Output:
Fix applied: {What changed}
Validation: {Test/verification performed}
Result: {Pass/Fail with evidence}
Side effects: {Any new issues observed}
Phase 1: Root Cause
Error: bash: cd: _worktrees/my-feature: No such file or directory
Root Cause: Relative path check succeeded (from repo root),
but cd failed (running from inside worktree).
Evidence:
- test -d "_worktrees/my-feature" returned success
- cd _worktrees/my-feature failed
- pwd showed /home/user/project/_worktrees/other-feature
The agent is already INSIDE a different worktree, so relative
path doesn't exist from there.
Phase 2: Pattern
Pattern: Path confusion — relative vs absolute paths
Similar cases: Common issue when shell CWD isn't repo root
Related: Always use absolute paths for worktree navigation
Phase 3: Hypothesis
Hypothesis: Using absolute paths from git worktree list will
work from any location, unlike relative paths.
Test: Replace relative check with:
path=$(git worktree list | grep "my-feature" | awk '{print $1}')
cd "$path"
Expected outcome: cd succeeds regardless of current location
Phase 4: Fix
Fix applied: Updated to use absolute paths from git worktree list
Validation: Ran from three locations:
- Repo root: ✅ navigated successfully
- Different worktree: ✅ navigated successfully
- Target worktree: ✅ detected "already there"
Result: PASS — all scenarios work
Side effects: None observed
Always use for:
Optional for:
During implementation (implementation-worker agent):
During code review (code-reviewer agent):
In retrospectives:
When to skip systematic debugging:
When to use lightweight version:
Full 4-phase process recommended for:
When debugging reveals important insights, document them:
In commit messages:
fix(agent): Prevent worktree navigation failures
Root cause: Agents used relative paths which only work from
repo root.
Pattern: Path confusion (relative vs absolute).
Fix: Use absolute paths from git worktree list.
Validated: Tested from repo root, other worktree, and target.
In PR descriptions:
## Debugging Summary
Root cause: {brief}
Fix: {what changed}
Validation: {tests run, output observed}
| Phase | Question | Output |
|---|---|---|
| 1. Root Cause | WHY is this failing? | Specific reason + evidence |
| 2. Pattern | Have we seen this before? | Pattern name or "new mode" |
| 3. Hypothesis | What change will fix it? | Testable prediction |
| 4. Fix | Does the fix work? | Validation evidence |
Key principle: Understand before acting. Evidence before claiming success.