From vfm-agent-company
Use when encountering any bug, test failure, or unexpected behavior. 4-phase root cause investigation BEFORE proposing fixes. Use for production bugs, test failures, performance issues, build failures.
npx claudepluginhub duylinhdang1998/claude-template-agent --plugin vfm-agent-companyThis skill uses the workspace's default tool permissions.
```
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Checks Next.js compilation errors using a running Turbopack dev server after code edits. Fixes actionable issues before reporting complete. Replaces `next build`.
NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST
Random fixes waste time and create new bugs. Quick patches mask underlying issues.
If you haven't completed Phase 1, you cannot propose fixes.
Use for ANY technical issue:
ESPECIALLY when:
┌────────────────────────────────────────────────────────────┐
│ │
│ Phase 1 Phase 2 Phase 3 Phase 4 │
│ ┌───────┐ ┌─────────┐ ┌────────────┐ ┌───────┐ │
│ │ ROOT │ ───► │ PATTERN │ ──► │ HYPOTHESIS │─►│ FIX │ │
│ │ CAUSE │ │ ANALYSIS│ │ TEST │ │ │ │
│ └───────┘ └─────────┘ └────────────┘ └───────┘ │
│ │
└────────────────────────────────────────────────────────────┘
BEFORE attempting ANY fix:
Don't skip past errors or warnings
Read stack traces COMPLETELY
Note: line numbers, file paths, error codes
git diff HEAD~5
git log --oneline -10
What changed that could cause this?
Where does bad value originate?
Error at line 50
↑ Called from line 30 with bad value
↑ Value set at line 15
↑ ROOT CAUSE: Missing validation at line 10
Fix at source, not at symptom.
# Layer 1: Input
echo "=== Input data: ==="
echo "$INPUT"
# Layer 2: Processing
echo "=== After processing: ==="
echo "$PROCESSED"
# Layer 3: Output
echo "=== Final output: ==="
echo "$OUTPUT"
Run once → see WHERE it breaks → investigate that layer.
Find the pattern before fixing:
Find Working Examples
Compare Against References
Identify Differences
Scientific method:
Form Single Hypothesis
"I think X is the root cause because Y"
Write it down. Be specific.
Test Minimally
Verify Before Continuing
Fix the root cause, not the symptom:
Create Failing Test
test-driven-development skillImplement Single Fix
Verify Fix
If 3+ Fixes Failed: STOP
Pattern indicating architectural problem:
Question fundamentals:
Discuss with user before attempting more fixes
| Phase | Key Activities | Success Criteria |
|---|---|---|
| 1. Root Cause | Read errors, reproduce, trace | Understand WHAT and WHY |
| 2. Pattern | Find working examples, compare | Identify differences |
| 3. Hypothesis | Form theory, test minimally | Confirmed or new hypothesis |
| 4. Fix | Create test, fix, verify | Bug resolved, tests pass |