claude-skills-troubleshooting
Diagnose and resolve Claude Code plugin and skill issues. This skill should be used when plugins are installed but not showing in available skills list, skills are not activating as expected, or when troubleshooting enabledPlugins configuration in settings.json. Triggers include "plugin not working", "skill not showing", "installed but disabled", or "enabledPlugins" issues.
1How It Works & Mechanism
Run diagnostic scripts first for deterministic troubleshooting: diagnose_plugins.py reads local ~/.claude plugin state files (installed_plugins.json, enabledPlugins in settings.json, and known_marketplaces.json), compares the list of 'installed but not enabled' plugins, and checks cache freshness.
Run the diagnostic script to identify common issues: ```bash python3 scripts/diagnose_plugins.py
Core diagnostic criterion: Uses lastUpdated from known_marketplaces.json as the single source of truth for freshness (strict ISO-8601 parsing with timezone; missing, malformed, non-timezone, or future timestamps are treated as invalid) without relying on cache directory mtime.
never guess freshness from the unreliable cache-directory mtime.
Two-tier remediation path: Uses the official CLI (claude plugin enable/disable/update) and direct edits to enabledPlugins in settings.json; also provides a batch enablement script enable_all_plugins.py (matches by marketplace suffix with interactive confirmation prior to write).
claude plugin enable plugin-name@marketplace-name
Knowledge base support: references/architecture.md details the plugin lifecycle and activation flow (install → copy to cache → register → manually enable → read enabledPlugins on startup), references/known_issues.md tracks upstream GitHub issues (#17832, etc.), and SKILL.md embeds root causes and resolutions for 4 Common Issues.
https://github.com/anthropics/claude-code/issues/17832
Architectural clarification between 'Skill vs Command extensions': skills/ are automatically matched and activated by description, while commands/ require explicit invocation via /command-name; explicit invocation requires adding a command file.
If a skill should be explicitly invocable, add a corresponding command file.
2Core Capabilities
3External Dependencies
| Kind | Dependency / Endpoint |
|---|---|
| cli | python3 |
| cli | claude(官方 CLI:plugin enable/disable/install/uninstall/marketplace update) |
| cli | jq(诊断命令参考中读 JSON) |
| network | GitHub(issue 引用与 marketplace 内容源) |
4Recommended Governance & Evidence
- scripts/: Executes local scripts or commands: scripts/diagnose_plugins.py
- 网络端点: Declares external network access: (User action guided by SKILL) claude plugin marketplace update — official CLI fetches from registered marketplaces
- 本地工作目录: File I/O and artifact output: enabledPlugins in ~/.claude/settings.json (only rewritten after interactive confirmation via enable_all_plugins.py)
5Second-Pass Verification
- [ok] 无网络外发(脚本层) — 两脚本零网络;https 只出现在 SKILL/known_issues 文档链接
- [ok] diagnose 只读声明属实 — 全文仅 json.load + print,无写文件路径
- [ok] enable_all 写前确认属实 — 写入前 input("Enable all these plugins? [y/N] "),非 y 即取消
- [ok] lastUpdated 唯一新鲜度来源规则三方一致 — SKILL.md / architecture.md / diagnose_plugins.py 同口径(时区必需、mtime 不可信、7 天过期、未来时间戳无效)
- [ok] 诊断退出码语义 — main() 末尾 missing/stale/invalid 任一成立打印 Action needed 并 return 1,与 SKILL 'exits nonzero' 一致
- [ok] settings.json 含密钥时的接触面 — enable_all 整文件 json.load/json.dump 回写;密钥字段原样保留不处理——按统一分档‘接触即 orange’上浮边界,本档定 yellow 因脚本从不读取/传递密钥字段,reason 已注明触发条件
6Verdict & Scenarios
3f56dc20d44cb7a1…