startup-diagnostic
Use when starting a session and suspecting configuration issues, after hook failures, MCP connection errors, or degraded vault performance. Also useful as a…
от DavidROliverBA★ 53 звезды на GitHub
Установить startup-diagnostic в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Startup Diagnostic
Examine all Claude Code startup components — configuration, hooks, MCP servers, indexes, plugins, and filesystem — report PASS/FAIL/WARN for each, and offer fixes for any failures.
Parallelisation Strategy
Batch 1 (may-fail-gracefully — use Bash with 2>/dev/null, NOT Read tool):
Steps 1–2 read files that may not exist. A failed Read cascades and kills all sibling parallel calls. Check 5 (graph index) can also ENOENT — include it here.
Batch 2 (reliable — run in parallel): Steps 3–4 and 6–11 query indexes, npm, git, and filesystem. Safe to run together.
Shell gotcha: Never use !! (double-bang) in node -e strings — zsh expands it as history substitution. Use 'key' in obj instead of !!obj.key.
Checks
1. Configuration Files
Check these files exist and parse as valid JSON/markdown:
| File | Check |
|---|---|
CLAUDE.md |
Exists at repo root |
.claude/settings.json |
Valid JSON, has permissions, plansDirectory |
.claude/settings.local.json |
Valid JSON, has hooks and permissions |
~/.claude/settings.json |
Valid JSON (global settings) |
.mcp.json |
Valid JSON, all mcpServers entries have command |
.claude/AGENDA.md |
Exists (WARN if missing) |
.claude/vault-conventions.md |
Exists |
node -e "JSON.parse(require('fs').readFileSync('.claude/settings.json','utf8')); console.log('OK')"
Flag any permission duplicates or contradictions between .claude/settings.json and .claude/settings.local.json.
2. Hook Execution
Test every configured hook can execute without crashing. Pass minimal JSON on stdin, check exit code.
UserPromptSubmit:
echo '{"query":"test"}' | python3 .claude/hooks/secret-detection.py; echo "exit:$?"
echo '{"query":"test"}' | bash .claude/hooks/skill-context-loader.sh; echo "exit:$?"
PreToolUse:
echo '{"tool_name":"Edit","tool_input":{"file_path":"/tmp/test.md","old_string":"a","new_string":"b"}}' | python3 .claude/hooks/file-protection.py; echo "exit:$?"
echo '{"tool_name":"Edit","tool_input":{"file_path":"/tmp/test.md"}}' | python3 .claude/hooks/secret-file-scanner.py; echo "exit:$?"
echo '{"tool_name":"Grep","tool_input":{"pattern":"test"}}' | bash .claude/hooks/graph-search-hint.sh; echo "exit:$?"
echo '{"tool_name":"Bash","tool_input":{"command":"ls"}}' | python3 .claude/hooks/skill-rename-guard.py; echo "exit:$?"
echo '{"tool_name":"Bash","tool_input":{"command":"ls"}}' | python3 .claude/hooks/bash-safety.py; echo "exit:$?"
PostToolUse:
echo '{"tool_name":"Edit","tool_input":{"file_path":"/tmp/test.md"},"tool_result":"ok"}' | python3 .claude/hooks/frontmatter-validator.py; echo "exit:$?"
echo '{"tool_name":"Edit","tool_input":{"file_path":"/tmp/test.md"},"tool_result":"ok"}' | python3 .claude/hooks/tag-taxonomy-enforcer.py; echo "exit:$?"
echo '{"tool_name":"Edit","tool_input":{"file_path":"/tmp/test.md"},"tool_result":"ok"}' | python3 .claude/hooks/wiki-link-checker.py; echo "exit:$?"
echo '{"tool_name":"Edit","tool_input":{"file_path":"/tmp/test.md"},"tool_result":"ok"}' | python3 .claude/hooks/filename-convention-checker.py; echo "exit:$?"
echo '{"tool_name":"Edit","tool_input":{"file_path":"/tmp/test.md"},"tool_result":"ok"}' | python3 .claude/hooks/code-formatter.py; echo "exit:$?"
echo '{"tool_name":"Edit","tool_input":{"file_path":"/tmp/test.md"},"tool_result":"ok"}' | bash .claude/hooks/auto-commit.sh; echo "exit:$?"
Notification (Stop):
python3 .claude/hooks/session-summary.py; echo "exit:$?"
| Result | Status |
|---|---|
| Exit 0 | PASS |
| Non-zero exit | FAIL (report stderr) |
| ImportError / ModuleNotFoundError | FAIL (missing dependency) |
| Timeout (>5s standard, >15s wiki-link-checker) | WARN |
3. MCP Server Connectivity
Test each server from .mcp.json can start and respond:
| Server | Test |
|---|---|
| context7 | ToolSearch for context7 tools, trivial query |
| memory | ToolSearch for memory tools, call read_graph |
| hostinger-mcp | ToolSearch for hostinger tools (auth failure OK — server started) |
Also check plugin MCP servers (MCP_DOCKER for Notion/Diagrams/YouTube) via ToolSearch.
Flag: missing npx package, auth issue, or network problem.
4. SQLite Index (Legacy/Secondary)
sqlite3 .data/vault.db "SELECT COUNT(*) as total FROM notes"
sqlite3 .data/vault.db "SELECT type, COUNT(*) FROM notes GROUP BY type ORDER BY COUNT(*) DESC LIMIT 5"
sqlite3 .data/vault.db "PRAGMA integrity_check"
Check freshness — files newer than the index:
find . -name "*.md" -not -path "./.git/*" -not -path "./node_modules/*" -newer .data/vault.db 2>/dev/null | wc -l
| Result | Status |
|---|---|
| Database missing | WARN — npm run vault:index (secondary index) |
| Integrity check fails | WARN — rebuild with npm run vault:index |
| >20 files newer than index | WARN — suggest reindex |
Note: SQLite is a secondary index. The
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл startup-diagnostic?
Use when starting a session and suspecting configuration issues, after hook failures, MCP connection errors, or degraded vault performance. Also useful as a periodic health audit.
Как установить скилл startup-diagnostic?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл startup-diagnostic запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…