From moltbloat
Self-diagnostic for the moltbloat plugin — check moltbloat's installation health, dependencies, permissions, and data integrity. Not a general Claude Code diagnostic; for that, use Claude Code's built-in /doctor command.
How this skill is triggered — by the user, by Claude, or both
Slash command
/moltbloat:diagnoseThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
<Purpose>
<Use_When>
/moltbloat:diagnose<Do_Not_Use_When>
/doctor or says a bare "doctor"/"diagnose" — that targets Claude Code itself, not moltbloat. Do not hijack it./moltbloat:auditAnnounce diagnostic
Running moltbloat self-diagnostic... This checks installation health, dependencies, and data integrity.
Check dependencies
Verify required tools are available:
which python3
python3 --version 2>/dev/null
which bash
bash --version 2>/dev/null | head -1
which claude
claude --version 2>/dev/null
which jq 2>/dev/null && echo "jq: $(jq --version 2>/dev/null)" || echo "jq: not installed (optional)"
Required:
python3 (3.7+) — for snapshot age checkingbash — for usage tracking scriptclaude CLI — for plugin managementOptional:
jq — for better JSON processing (graceful fallback without)Check moltbloat directory structure
# Check if data directory exists and is writable
test -d "$HOME/.moltbloat" && echo "Data directory: exists" || echo "Data directory: missing"
test -w "$HOME/.moltbloat" 2>/dev/null && echo "Data directory: writable" || echo "Data directory: NOT writable"
# Check for expected files
ls -la "$HOME/.moltbloat/" 2>/dev/null || echo "No data files yet"
Check data file integrity
# Check usage.jsonl validity (if exists)
if [ -f "$HOME/.moltbloat/usage.jsonl" ]; then
total=$(wc -l < "$HOME/.moltbloat/usage.jsonl")
valid=$(grep -c '"type":"' "$HOME/.moltbloat/usage.jsonl" 2>/dev/null || echo 0)
echo "usage.jsonl: $total lines, ~$valid valid entries"
# Check for JSON parse errors
head -5 "$HOME/.moltbloat/usage.jsonl" | while read line; do
python3 -c "import json; json.loads('$line')" 2>/dev/null && echo "JSON valid" || echo "JSON INVALID"
done
else
echo "usage.jsonl: not created yet (normal for new installs)"
fi
# Check baseline.json validity (if exists)
if [ -f "$HOME/.moltbloat/baseline.json" ]; then
python3 -c "import json; json.load(open('$HOME/.moltbloat/baseline.json'))" 2>/dev/null && echo "baseline.json: valid" || echo "baseline.json: CORRUPT"
else
echo "baseline.json: not created yet (normal)"
fi
# Check history.log (if exists)
if [ -f "$HOME/.moltbloat/history.log" ]; then
entries=$(wc -l < "$HOME/.moltbloat/history.log")
echo "history.log: $entries entries"
else
echo "history.log: not created yet (normal)"
fi
Check hook functionality
# Check if hook script exists and is executable
if [ -f "${CLAUDE_PLUGIN_ROOT}/scripts/track-usage.sh" ]; then
test -x "${CLAUDE_PLUGIN_ROOT}/scripts/track-usage.sh" && echo "track-usage.sh: executable" || echo "track-usage.sh: not executable"
bash -n "${CLAUDE_PLUGIN_ROOT}/scripts/track-usage.sh" 2>/dev/null && echo "track-usage.sh: syntax valid" || echo "track-usage.sh: SYNTAX ERRORS"
else
echo "track-usage.sh: NOT FOUND"
fi
# Check snapshot age script
if [ -f "${CLAUDE_PLUGIN_ROOT}/scripts/check-snapshot-age.py" ]; then
python3 -m py_compile "${CLAUDE_PLUGIN_ROOT}/scripts/check-snapshot-age.py" 2>/dev/null && echo "check-snapshot-age.py: syntax valid" || echo "check-snapshot-age.py: SYNTAX ERRORS"
else
echo "check-snapshot-age.py: NOT FOUND"
fi
Check Claude Code environment
# Check if we can read the plugin registry
if [ -f "$HOME/.claude/plugins/installed_plugins.json" ]; then
echo "Plugin registry: readable"
plugin_count=$(grep -c '"name"' "$HOME/.claude/plugins/installed_plugins.json" 2>/dev/null || echo 0)
echo "Installed plugins: $plugin_count"
else
echo "Plugin registry: NOT FOUND — Claude Code may not be initialized"
fi
# Check plugin cache access
if [ -d "$HOME/.claude/plugins/cache" ]; then
cache_size=$(du -sm "$HOME/.claude/plugins/cache" 2>/dev/null | cut -f1)
echo "Plugin cache: ${cache_size}MB"
else
echo "Plugin cache: not found"
fi
Test write operations
# Test writing to moltbloat directory
testfile="$HOME/.moltbloat/.diagnose_test_$$"
if echo "test" > "$testfile" 2>/dev/null; then
rm "$testfile"
echo "Write test: PASSED"
else
echo "Write test: FAILED — check permissions on ~/.moltbloat/"
fi
Check for common issues
Scan for known problems:
# Check usage file size
if [ -f "$HOME/.moltbloat/usage.jsonl" ]; then
size=$(stat -f%z "$HOME/.moltbloat/usage.jsonl" 2>/dev/null || stat -c%s "$HOME/.moltbloat/usage.jsonl" 2>/dev/null || echo 0)
if [ "$size" -gt 10485760 ]; then
echo "WARNING: usage.jsonl is >10MB — run '/moltbloat:usage' to compact"
fi
fi
# Check for very old baseline
if [ -f "$HOME/.moltbloat/baseline.json" ]; then
age_days=$(python3 -c "
import json, datetime, os try: with open(os.path.expanduser('~/.moltbloat/baseline.json')) as f: data = json.load(f) ts = data.get('timestamp', '2000-01-01')[:10] days = (datetime.date.today() - datetime.date.fromisoformat(ts)).days print(days) except: print(0) " 2>/dev/null) if [ "$age_days" -gt 90 ]; then echo "WARNING: baseline is ${age_days} days old — run '/moltbloat:snapshot' to update" fi fi
9. **Generate diagnostic report**
<list any warnings or errors from checks above, or "None — moltbloat appears healthy">
If issues persist after fixing the above:
claude plugin listclaude plugin remove moltbloat && claude plugin install moltbloat
10. **Done**
If issues were found, suggest fixes. If everything passes, reassure the user that moltbloat is properly installed and ready to use.
</Steps>
npx claudepluginhub jcgruesome/moltbloat --plugin moltbloatGuides collaborative design exploration before implementation: explores context, asks clarifying questions, proposes approaches, and writes a design doc for user approval.
Creates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.
Resolves in-progress git merge or rebase conflicts by analyzing history, understanding intent, and preserving both changes where possible. Runs automated checks after resolution.