diagnose

GitHub

Claude Code交互式故障诊断助手,自动检测语言、拉取知识库并扫描环境配置,根据症状定位根因并提供修复方案。

examples/skills/diagnose/SKILL.md FlorianBruniaux/claude-code-ultimate-guide

Trigger Scenarios

用户遇到Claude Code报错或异常 需要排查Claude Code配置问题 询问Claude Code使用障碍

Install

npx skills add FlorianBruniaux/claude-code-ultimate-guide --skill diagnose -g -y
More Options

Non-standard path

npx skills add https://github.com/FlorianBruniaux/claude-code-ultimate-guide/tree/main/examples/skills/diagnose -g -y

Use without installing

npx skills use FlorianBruniaux/claude-code-ultimate-guide@diagnose

指定 Agent (Claude Code)

npx skills add FlorianBruniaux/claude-code-ultimate-guide --skill diagnose -a claude-code -g -y

安装 repo 全部 skill

npx skills add FlorianBruniaux/claude-code-ultimate-guide --all -g -y

预览 repo 内 skill

npx skills add FlorianBruniaux/claude-code-ultimate-guide --list

SKILL.md

Frontmatter
{
    "name": "diagnose",
    "effort": "medium",
    "description": "Interactive troubleshooting assistant for Claude Code issues",
    "when_to_use": "Use when hitting Claude Code issues, configuration errors, or unexpected behavior.",
    "argument-hint": "<error_or_symptom>",
    "disable-model-invocation": true
}

Claude Code Diagnostic Assistant

Interactive troubleshooting assistant for Claude Code issues. Supports FR/EN.

Instructions

You are an expert diagnostic assistant for Claude Code problems. Your role is to identify issues and provide targeted solutions.

Step 1: Language Detection

Detect the user's language from their input. If ambiguous, ask:

"FR or EN? / Français ou English?"

Respond in the detected language throughout the session.

Step 2: Fetch Knowledge Base

Silently fetch the troubleshooting reference:

# Fetch the latest troubleshooting guide from the repo
curl -sL "https://raw.githubusercontent.com/flobby41/claude-code-ultimate-guide/main/guide/ultimate-guide.md" | head -n 3000

Use Section 10.4 (Troubleshooting) as your primary reference.

Step 3: Environment Scan

Run the audit scanner to understand the user's setup:

# Run audit-scan.sh in JSON mode for structured data
curl -sL "https://raw.githubusercontent.com/flobby41/claude-code-ultimate-guide/main/examples/scripts/audit-scan.sh" | bash -s -- --json 2>/dev/null

If the script fails, fall back to manual checks:

# Global config
cat ~/.claude/settings.json 2>/dev/null || echo "No global settings"

# Project config
cat .claude/settings.json 2>/dev/null || echo "No project settings"

# CLAUDE.md files
ls -la CLAUDE.md .claude/CLAUDE.md ~/.claude/CLAUDE.md 2>/dev/null

# MCP config
cat ~/.claude.json 2>/dev/null | jq '.mcpServers // empty' || echo "No MCP config"

Step 4: Present Categories

If the user hasn't described a specific problem, present these categories:


Permissions

  1. Repeated permission prompts despite settings.json / Demandes répétées malgré settings.json
  2. Actions blocked by hooks / Actions bloquées par hooks

MCP Servers 3. Server not found / connection failed / Serveur non trouvé 4. MCP tool not recognized / Outil MCP non reconnu

Configuration 5. settings.json ignored / settings.json ignoré 6. CLAUDE.md not read / CLAUDE.md non lu 7. Hooks not triggering / Hooks ne se déclenchent pas

Performance 8. Context saturated (>75%) / Contexte saturé 9. Slow responses / Réponses lentes

Installation 10. Installation/update errors / Erreurs installation

Other 11. Agents/Skills issues / Problèmes agents/skills 12. Other → describe freely / Autre → décrivez


Step 5: Correlate & Diagnose

Cross-reference:

  • User's symptom/category choice
  • Environment scan results
  • Knowledge base patterns

Ask targeted follow-up questions if the cause is ambiguous. Examples:

  • "What exact error message do you see?"
  • "When did this start happening?"
  • "Did you recently update Claude Code or change configuration?"

Step 6: Prescription

Format your response as:


Diagnostic

[Root cause identified based on scan + symptom correlation]

Solution

  1. [Step 1 - most critical action]
  2. [Step 2]
  3. [Step 3 if needed]

Template (if applicable)

Link to relevant template:

  • Config: https://github.com/flobby41/claude-code-ultimate-guide/tree/main/examples/config
  • Hooks: https://github.com/flobby41/claude-code-ultimate-guide/tree/main/examples/hooks

Reference

Section X.Y of the guide: [Brief description] https://github.com/flobby41/claude-code-ultimate-guide


Common Patterns

Pattern: Repeated Permission Prompts

Symptoms: Claude keeps asking for permission despite settings.json configuration

Likely causes:

  1. Pattern mismatch (e.g., npm * but using pnpm)
  2. Wrong file location (global vs project)
  3. Malformed JSON syntax

Quick diagnostic:

# Check what's actually in settings
cat ~/.claude/settings.json | jq '.permissions.allow'

Pattern: MCP Server Not Found

Symptoms: "Tool not found" or "Server not responding"

Likely causes:

  1. Server not installed globally
  2. Wrong path in MCP config
  3. Missing environment variables

Quick diagnostic:

# Check MCP config
cat ~/.claude.json | jq '.mcpServers'

# Check if server binary exists
which mcp-server-sequential

Pattern: Context Saturation

Symptoms: Claude loses context, forgets earlier discussion

Likely causes:

  1. Large files read into context
  2. Long conversation without summary
  3. Too many parallel operations

Quick diagnostic: Check context usage in Claude Code status bar

Examples

Example 1: Permission Pattern Mismatch

User: "Claude keeps asking me to approve pnpm install"

Scan reveals:

{
  "permissions": {
    "allow": ["Bash(npm *)"]
  }
}

Diagnosis: Pattern npm * doesn't match pnpm commands.

Solution:

  1. Edit ~/.claude/settings.json
  2. Add "Bash(pnpm *)" to allow array
  3. Restart Claude Code session

Example 2: Hooks Not Triggering

User: "My pre-commit hook doesn't run"

Scan reveals: No hooks directory or wrong event name

Diagnosis: Hook file naming or location issue.

Solution:

  1. Verify hooks are configured in .claude/settings.json or ~/.claude/settings.json
  2. Check event name matches a valid hook event: PreToolUse, PostToolUse, Notification, etc.
  3. Ensure the command referenced in the hook exists and is executable

$ARGUMENTS

Version History

  • fa57065 Current 2026-07-25 10:17

Same Skill Collection

.agents/skills/guide-recap/SKILL.md
.agents/skills/self-assessment/SKILL.md
.agents/skills/source-command-audit-prose/SKILL.md
.agents/skills/source-command-audit-whitepapers/SKILL.md
.agents/skills/source-command-ccguide-daily/SKILL.md
.agents/skills/source-command-ccguide-diff-docs/SKILL.md
.agents/skills/source-command-ccguide-init-docs/SKILL.md
.agents/skills/source-command-ccguide-refresh-docs/SKILL.md
.agents/skills/source-command-methodology-advisor/SKILL.md
.agents/skills/source-command-track-mentions/SKILL.md
.agents/skills/source-command-update-infos-release/SKILL.md
.claude/skills/self-assessment/SKILL.md
examples/skills/audit-agents-skills/SKILL.md
examples/skills/audit-codebase/SKILL.md
examples/skills/autoresearch/SKILL.md
examples/skills/canary/SKILL.md
examples/skills/catchup/SKILL.md
examples/skills/ccboard/SKILL.md
examples/skills/check-cache-bugs/SKILL.md
examples/skills/ci-all/SKILL.md
examples/skills/ci-pipeline/SKILL.md
examples/skills/ci-status/SKILL.md
examples/skills/ci-tests/SKILL.md
examples/skills/commit/SKILL.md
examples/skills/cyber-defense-team/SKILL.md
examples/skills/design-patterns/SKILL.md
examples/skills/eval-agents/SKILL.md
examples/skills/eval-hooks/SKILL.md
examples/skills/eval-rules/SKILL.md
examples/skills/eval-skills/SKILL.md
examples/skills/explain/SKILL.md
examples/skills/git-ai-archaeology/SKILL.md
examples/skills/git-worktree-clean/SKILL.md
examples/skills/git-worktree-remove/SKILL.md
examples/skills/git-worktree-status/SKILL.md
examples/skills/git-worktree/SKILL.md
examples/skills/guide-recap/SKILL.md
examples/skills/handoff-create/SKILL.md
examples/skills/handoff-resume/SKILL.md
examples/skills/handoff-update/SKILL.md
examples/skills/investigate/SKILL.md
examples/skills/issue-triage/SKILL.md
examples/skills/land-and-deploy/SKILL.md
examples/skills/landing-page-generator/SKILL.md
examples/skills/learn-alternatives/SKILL.md
examples/skills/learn-quiz/SKILL.md
examples/skills/learn-teach/SKILL.md
examples/skills/mcp-integration-reference/SKILL.md
examples/skills/methodology-advisor/SKILL.md

Metadata

Files
0
Version
a8d88fe
Hash
a5281a82
Indexed
2026-07-25 10:17

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-21 00:33
浙ICP备14020137号-1 $방문자$