debug-mycelium
Use when mycelium sync fails, items not appearing in tools, enable/disable not working, MCP not connecting, config conflicts between levels, EACCES permission errors, or any unexpected mycelium CLI behavior.
git clone https://github.com/bytemines/mycelium
T=$(mktemp -d) && git clone --depth=1 https://github.com/bytemines/mycelium "$T" && mkdir -p ~/.claude/skills && cp -r "$T/.claude/skills/debug-mycelium" ~/.claude/skills/bytemines-mycelium-debug-mycelium && rm -rf "$T"
.claude/skills/debug-mycelium/SKILL.mdDebug Mycelium
Systematic diagnostic workflow using Mycelium's built-in SQLite trace database. Traces capture 16 dimensions per operation — filter to the exact slice that matters, never read the full DB.
When to Use
fails or skips itemsmycelium sync- Item shows as enabled but doesn't appear in tool config
- Enable/disable has no effect
- MCP server not connecting after sync
- Config conflicts between global/machine/project levels
- Permission errors (EACCES, EPERM)
- Migration imports wrong or missing items
- "It worked before but stopped" scenarios
Step 1: Gather Context
Ask the user:
- What command were you running? (sync, enable, disable, add, remove, migrate)
- What item is affected? (MCP name, skill name, plugin name)
- Which tool? (cursor, claude-code, vscode, etc.)
- What did you expect vs what happened?
Step 2: Pull Filtered Traces
Run the
mycelium report command with appropriate filters. Always start narrow:
# If user mentions a specific item: mycelium report --item <name> --since 1h --format table # If user mentions a specific tool: mycelium report --tool <tool> --level error,warn --since 1h --format table # If user mentions a specific command: mycelium report --cmd <command> --since 1h --format table # For full context (JSONL for analysis): mycelium report --item <name> --full --format jsonl
Important: Always use
--since to limit results. Never pull the full DB.
Step 3: Check Health
mycelium doctor --json
Look for:
- Failed config checks (broken YAML/JSON/TOML)
- Broken symlinks (skills not properly linked)
- Missing directories
- MCP connectivity failures
Step 4: Check Manifest State
# Read the manifest directly cat ~/.mycelium/global/manifest.yaml # Or for project-level: cat .mycelium/manifest.yaml
Look for:
field: is the itemstate
,enabled
, ordisabled
?deleted
field: where did this item come from?source- Missing items: was the item never added?
Step 5: Check Tool Config
Read the tool's native config file to verify the sync result:
| Tool | Config Path |
|---|---|
| Claude Code | or |
| Cursor | |
| VS Code | |
| Codex | |
| Gemini CLI | |
| OpenCode | |
| OpenClaw | |
Verify the MCP entry exists and has correct structure for that tool's format.
Step 6: Analyze the Trace
Read the JSONL output from Step 2. Look for these patterns:
Common Issues
Item not syncing (state bug):
- Check trace for
entries — was the item filtered out?op: "filter" - Check
dimension — is itstate
ordisabled
?deleted - Check
— was it from a plugin that got removed?source
Permission errors:
- Check trace for
containing "EACCES" or "EPERM"error - Check
dimension — which file had the permission issue?path - Fix:
the file or run with appropriate permissionschmod
Config parse errors:
- Check trace for
dimension — which format failed?format - Check
— which config file is malformed?path - Validate the file manually:
cat <path> | python3 -m json.tool
Adapter method fallback:
- Check
dimension — did it try "cli" then fall back to "file"?method - Check if the tool's CLI is installed and accessible
Merge conflicts:
- Check trace for
— which level caused the conflict?configLevel - Check
entries for warningsphase: "merge" - Read all 3 config levels: global, machine, project
MCP still in tool config after disable:
updates manifest but MCP remains inmycelium disable <mcp>
(or other tool configs)~/.claude.json- Root cause: item was registered in wrong manifest section (e.g.
instead ofskills.massive
)mcps.massive - Check manifest:
— verify item is incat ~/.mycelium/manifest.yaml
section, notmcps:skills: - Fix: move the entry to the correct section, then run
againmycelium disable <name> - After fix, disable now calls
on tool configs and enable callsadapter.remove()adapter.add()
Item not found (typo):
- Check
dimension — does the name have a typo? (e.g.,item
vspostgress-mcp
)postgres-mcp - Query with LIKE:
to find all variantsmycelium report --item postgres - Compare against manifest to find the correct name
Step 7: Generate Report
Once you've identified the issue, create a structured report:
## Problem [1-2 sentence summary of what's broken] ## Root Cause [What the trace analysis revealed] ## Relevant Trace \`\`\` [Paste the key 5-10 trace entries that show the problem] \`\`\` ## Doctor Output [Any relevant failed/warning checks] ## Manifest State [Item state and source from manifest] ## Environment - OS: [from mycelium report --full] - Node: [version] - Mycelium: [version] - Tool: [affected tool and version] ## Fix [Suggested fix — either a command to run or a code change to make]
Step 8: Apply Fix or File Issue
If the fix is a user action (config change, permission fix):
- Guide the user through the fix
- Run
to verifymycelium sync - Run
to confirm no more errorsmycelium report --item <name> --since 5m
If the fix requires a code change:
- Save the report to a file:
mycelium report --item <name> --full --output /tmp/mycelium-report.jsonl - The user can paste the report into a GitHub issue
- Or create a PR directly with the fix
Plugin Takeover Debugging
When plugin takeover isn't working (skills/agents/commands from Claude Code plugins not appearing or disappearing):
Quick diagnosis
# All plugin operations mycelium report --scope plugin --since 1h --format table # Specific operation type (takeover, release, symlink-create, symlink-remove, health-check) mycelium report --op takeover --since 1d --format table # Symlink operations only mycelium report --op symlink-create,symlink-remove --since 1h --format table # Plugin health check results mycelium report --op health-check --scope plugin --since 1h --format table # All operations on a specific plugin mycelium report --item superpowers@skillsmp --since 1d --format table
Common plugin issues
Component missing after disable/enable cycle:
- Check symlink operations:
mycelium report --op symlink-create,symlink-remove --since 1h - Check if the component type is correct: look for
in trace entries (skill, agent, command)itemType - Run doctor:
— check "Plugin Takeover" section for invariant violationsmycelium doctor - Fix:
re-runsmycelium sync
to reconcile statesyncPluginSymlinks()
Plugin shows as taken over but components aren't working:
- Check health:
— invariant checks verify symlinks, settings.json, cachemycelium doctor - Check sync:
mycelium report --cmd plugin-sync --level error,warn - Verify cache:
ls ~/.claude/plugins/cache/<marketplace>/<plugin>/
Release didn't re-enable plugin:
- Check settings.json:
cat ~/.claude/settings.json | grep enabledPlugins - Check traces:
mycelium report --op release --since 1h - Check if all components were re-enabled:
mycelium report --scope manifest --item <plugin-component>
Dashboard Debug Logging
For UI issues (sidebar flicker, toggle state, graph reloads), enable browser-side debug logging. Run in the browser console on
localhost:3378:
localStorage.setItem("mycelium:debug:panel", "1") // [panel] animation lifecycle localStorage.setItem("mycelium:debug:store", "1") // [store] state operations
Refresh, reproduce the issue, then read
[panel]/[store] logs in the console. Remove keys and refresh to disable.
Dimension Reference
These are the filterable dimensions in
mycelium report:
| Flag | Description | Values |
|---|---|---|
| CLI command | sync, enable, disable, add, remove, migrate, doctor, plugin-sync, mcp |
| What type | mcp, skill, config, memory, hook, plugin, manifest |
| Operation | takeover, release, symlink-create, symlink-remove, health-check, inject, sync, disable, enable |
| Which tool | claude-code, cursor, vscode, codex, gemini, opencode, openclaw, antigravity |
| Item name | any MCP/skill/hook/plugin name |
| Severity | debug, info, warn, error |
| Manifest state | enabled, disabled, deleted |
| Item source | plugin name or "manual" |
| Trace ID | sync-abc123 (from trace output) |
| Project name | directory name |
| Time range | 1h, 30m, 7d, 2026-02-10 |