Loading...
Loading...
Diagnosis and repair guide for errors and failures including CI issues. Activate this guide when users mention something is broken, errors occur, things aren't working, CI failures, build errors, test failures, or pipeline issues. DO NOT use this guide for: successful builds, new feature implementation, or code reviews.
npx skill4agent add chachamaru127/claude-code-harness troubleshoot🔍 What happened?Please tell us briefly:
- "The screen is completely white"
- "The button won't work"
- "Data isn't saving"
# 環境チェック
node -v
npm -v
git status -sb
# エラーログ確認
npm run build 2>&1 | tail -20
npm test 2>&1 | tail -20
# 依存関係チェック
npm ls --depth=0| Category | Symptoms | Automatic Response |
|---|---|---|
| Dependencies | | |
| Type Errors | | error-recovery agent |
| Build Errors | | error-recovery agent |
| Runtime | Screen not displaying | Log analysis |
| Environment Settings | Connection errors | Environment variable check |
| CI/CD | CI failed, pipeline failure | Dispatch to ci skill |
CI/CD Issues: When CI failures, test failures, or pipeline issues are detected, the process is delegated to theskill located atci. The ci skill uses theskills/ci/agent to perform automatic diagnosis and correction.ci-cd-fixer
npm install -g agent-browser# ページを開いてスナップショット取得
agent-browser open https://example.com/target-page
agent-browser snapshot -i -c
# 要素参照でクリック・入力
agent-browser click @e1
agent-browser fill @e2 "test"docs/OPTIONAL_PLUGINS.md🔍 診断中...
考えられる原因:
1. ビルドエラー
2. JavaScript エラー
3. ルーティング問題
🔧 自動チェック:
- ビルドログを確認... ✅ エラーなし
- コンソールエラーを確認... ❌ エラー発見
💡 解決策:
「直して」と言ってください。自動修正を試みます。🔍 Diagnosing...
Possible causes:
1. Build error
2. JavaScript error
3. Routing issue
🔧 Automatic checks:
- Checking build logs... ✅ No errors
- Checking console errors... ❌ Error found
💡 Solution:
Say "Fix it" to attempt automatic correction.🔍 Diagnosing...
Error: `ERESOLVE unable to resolve dependency tree`
🔧 Solutions:
1. Clear cache
2. Reinstall node_modules
Can I execute these steps? (Yes/No)🔍 Diagnosing...
Detected: Merge conflict occurred
🔧 Solutions:
1. Show conflict locations
2. Propose resolution methods
Say "Resolve it" to attempt automatic merging.⚠️ Issue detected
**Problem**: Module not found
**Cause**: Dependencies not installed
🔧 **Automatic fix in progress**
→ Executing `npm install`...
✅ Fix completed! Please try again.⚠️ Issue detected
**Problem**: Configuration file needs to be changed
**Impact**: May affect functionality
🤔 **Please confirm**:
Is it okay to modify the configuration?
→ Say "Change it" to execute
→ Say "Explain it" to check details⚠️ Complex issue detected
**Problem**: {{Issue summary}}
**Fix attempts made**: 3 failures
🆘 **Recommended to consult Cursor (PM)**
Please share the following with Cursor:
- Error details: {{Summary}}
- Attempted fixes: {{List}}
- Estimated cause: {{Analysis}}
Say "Create a report" to generate a sharing report.| Question | Automatic Response |
|---|---|
| "Why did I get an error?" | Analyze error logs and explain the cause |
| "How do I fix it?" | Present specific resolution steps |
| "It worked before, why not now?" | Check recent changes using git log |
| "I keep getting the same error" | Analyze patterns and propose root cause solutions |
"Diagnose"
→ General health check
→ Report issues if any
→ Reply "No issues found" if none"Diagnose in detail"
→ Dependency check
→ Build test
→ Test execution
→ Environment variable check
→ Output detailed report/debug| Symptom | Recommendation |
|---|---|
| "Session is behaving strangely" | Use |
| "MCP isn't working" | Use |
| "It still doesn't work after multiple attempts" | Use |
| "Context is odd" | Use |
| "Authentication error" | Check authentication status with |
claude authclaude auth status # 認証状態の確認
claude auth login # 再ログイン
claude auth logout # ログアウト🔍 When more detailed diagnosis is needed
If told "Diagnose in more detail":
→ Recommend using the `/debug` command
/debug command diagnoses the following:
- Session status
- MCP server connection
- Plugin settings
- Memory usage
- Detailed error logs
💡 How to use:
Enter `/debug` in the chat boxtroubleshoot skill diagnosis
↓
Automatic check for common issues
↓
┌─────────────────────────────────────────┐
│ Issue resolved? │
├─────────────────────────────────────────┤
│ YES → Fix completed │
│ NO → Possible complex issue │
└─────────────────────────────────────────┘
↓
Recommend `/debug` command
↓
Detailed diagnosis of session, MCP, and settings
↓
Propose solutions based on diagnosis results/debug| Case | Reason |
|---|---|
| Issue not resolved after 3 fix attempts | Possible environment configuration issue |
| MCP tools not responding | Need to diagnose MCP server connection |
| Malfunction after resuming session | Need to check session status |
| Works in other projects | Possible project-specific configuration issue |
npm run build🔍 Running LSP diagnostics...
📊 Diagnosis results:
| File | Line | Message |
|---------|-----|-----------|
| src/api/user.ts | 23 | 'userId' may be undefined |
| src/components/Form.tsx | 45 | Type 'string' cannot be assigned to type 'number' |
→ 2 issues detected
→ The above are highly likely to be the cause of "it doesn't work"🔍 Tracking cause
Error: Cannot read property 'name' of undefined
Tracking:
1. src/pages/user.tsx:34 - Referencing user.name
2. src/hooks/useUser.ts:12 - Returns user ← Go-to-definition
3. src/api/user.ts:8 - API response may be null
→ Cause is insufficient handling of API errors| Symptom | LSP Utilization |
|---|---|
| "It doesn't work" | Identify error locations with Diagnostics |
| "What's wrong?" | Track causes with Go-to-definition |
| "When did it break?" | Check change impacts with Find-references |