mxhealth

star 25

Use when the user says "/health", "/mxHealth", "health check", "check knowledge db", "verify consistency", "db health", or otherwise wants to verify Knowledge-DB and docs/ consistency via MCP. Runs 14 consistency checks (document metadata, cross-references, orphaned relations, status consistency, CLAUDE.md weight, local/DB sync, AI-Steno format, skill-evolution metrics, AI-Batch status) and persists findings via Skill Evolution. Loop-capable. ⚡ MCP-required — aborts if Knowledge-DB is unreachable.

MicrotronX By MicrotronX schedule Updated 5/7/2026

name: mxHealth description: Use when the user says "/health", "/mxHealth", "health check", "check knowledge db", "verify consistency", "db health", or otherwise wants to verify Knowledge-DB and docs/ consistency via MCP. Runs 14 consistency checks (document metadata, cross-references, orphaned relations, status consistency, CLAUDE.md weight, local/DB sync, AI-Steno format, skill-evolution metrics, AI-Batch status) and persists findings via Skill Evolution. Loop-capable. ⚡ MCP-required — aborts if Knowledge-DB is unreachable. allowed-tools: Read, Write, Edit, Grep, Glob, Bash

/mxHealth — Knowledge-DB Consistency Checker (AI-Steno: !=forbidden →=use ⚡=critical ?=ask)

Context: ALWAYS run as subagent(Agent-Tool) !main-context. Result: max 20 lines, problems only.

Health-Check-Agent. Verify consistency of Knowledge-DB + local docs/.

Trigger phrases

This skill fires on:

  • /health, /mxHealth
  • Natural language: "health check", "check knowledge db", "verify consistency", "db health", "audit the project state"
  • Programmatic: pre-release validation, periodic /loop invocation, pre-commit integrity sweep

MCP Required

⚡ mxHealth is MCP-dependent by design. Phases P1-P14 all query the Knowledge-DB. If mx_ping fails in Init step 2 → print "MCP unreachable — /mxHealth requires MCP." and ABORT. No partial runs, no local-only fallback mode. The caller should retry once MCP is back.

Init

  1. CLAUDE.md→**Slug:**=project. ∅slug→?user
  2. mx_ping()→OK=continue | Error→"MCP unreachable — /mxHealth requires MCP." ABORT

Phase 1: Load Inventory

Execute in parallel:

  1. mx_briefing(project) — Overview
  2. mx_search(project, doc_type='plan') + spec + decision + workflow_log
  3. Glob local: docs/reference/*.md
  4. Read CLAUDE.md + docs/status.md
  5. Count: DB-Docs total, local reference files, CLAUDE.md line count

Phase 2: 14 Checks

Per-check details (trigger, what is checked, severity, persistence target) → Read ~/.claude/skills/mxHealth/references/checks.md.

# Check Severity
P1 Document Metadata (DB) ERROR/WARNING
P2 Format Consistency (sample) INFO
P3 Cross-Reference Consistency ERROR/WARNING
P4 Status Consistency (PLAN/ADR) WARNING
P5 Workflow Consistency WARNING
P6 Local/DB Sync WARNING/INFO
P7 CLAUDE.md + Reference ERROR/WARNING/INFO
P8 Orphaned Local Files INFO
P9 Content Depth (token<50) WARNING
P10 Auto-Relations Scan INFO
P11 CLAUDE.md Duplicate Check WARNING
P12 AI-Steno Format Check WARNING
P13 Skill Evolution Metrics WARNING/INFO
P14 AI-Batch Status WARNING/INFO

ERROR vs WARNING is binding: ERROR = invariant violation (must fix); WARNING = drift/risk (should fix); INFO = advisory (no persistence).

Phase 3: Report

## /mxHealth Report — YYYY-MM-DD HH:MM
**Project:** <slug> | **Scope:** <all|decisions|plans|specs|workflows>

### DB Inventory
| doc_type | Count |
|----------|-------|

### Findings
| # | Severity | Check | Finding | Document |
|---|----------|-------|---------|----------|

### Summary
X ERROR | Y WARNING | Z INFO | Checked: N DB docs, M local files

∅problems→/mxHealth: All checks passed. DB+docs/ consistent.

Phase 3b: Persist Findings→MCP Notes (Spec#1139)

For each finding with severity ERROR or WARNING:

  1. Deduplication: mx_search(project, doc_type='note', query='[Health] ', limit=1)<ul> <li>Match with same title→skip</li> </ul> </li> <li>mx_create_doc(project, doc_type='note', title='[Health] <finding-title>', content='Severity: <sev>\n<details>\nFound: YYYY-MM-DD', tags=["health-finding","<severity-tag>"])<ul> <li>ERROR→tag 'bug', WARNING→tag 'improvement'</li> </ul> </li> <li>Output: <code>Auto-Notes: N created, M skipped (duplicate)</code> ∅findings or INFO only→skip</li> </ol> <h2>Phase 4: Auto-Bugreport + Persist Findings (ERROR/WARNING)</h2> <p><strong>Project routing:</strong> Store findings in target project, NOT blanket in mxHannesMCP.</p> <ul> <li>Skill/Setup/Tool findings (affect mx* infrastructure)→<code>project='mxHannesMCP'</code></li> <li>Project-specific findings (stubs, local docs, missing relations)→<code>project=<target-project></code> <code>mx_create_doc(project=<see routing>, doc_type='bugreport', title='mxHealth: N Findings...', tags=["mxhealth-auto"], status='reported')</code> Deduplication: mx_search before creating. ∅ERROR/WARNING→no report.</li> </ul> <p>⚡ Tags param contract (Phase 3b + Phase 4): <code>Read ~/.claude/skills/_shared/mcp-tags-array.md.</code></p> <p><strong>Skill Evolution:</strong> For each finding (ERROR+WARNING): <code>mx_skill_manage(action='record_finding', skill='mxHealth', rule_id='<pN-lowercase>' (e.g. p1-metadata, p3-crossref, p4-status), project='<slug>', severity='<error|warning>', title='<finding summary>', details='<document + finding>')</code></p> <ul> <li>context_hash='<check>:<document-slug>' for dedup across runs</li> <li>∅MCP→skip (already captured in bugreport)</li> </ul> <h2>Phase 5: Auto-Fix (P9)</h2> <p>P9 findings→removed (B6.5). ∅P9→skip.</p> <h2>Loop Mode (--loop or /loop context)</h2> <ul> <li>Compact output: only <code>mxHealth: X ERROR Y WARNING Z INFO</code> + findings one-liners</li> <li>!report header !inventory table !summary block</li> <li>!prompts, !interactive steps</li> <li>Auto-Fix(P9) run silently, report only on changes</li> <li>Bugreport only on ERROR (WARNING→skip in loop)</li> <li>∅findings→single line: <code>mxHealth OK — 0 problems</code></li> </ul> <p>⚡ <strong>Delta semantics:</strong> each iteration fires P1-P14 fresh; finding is "new" if <code>context_hash</code> (<code><check>:<document-slug></code>) was not persisted via <code>mx_skill_manage(action='record_finding', ...)</code> in a prior iteration. Matching hash → suppress output line. ⚡ <strong>INFO findings in loop mode:</strong> suppress entirely from output (Phase 4 persists only ERROR+WARNING, so INFOs would re-print every iteration).</p> <h2>Rules</h2> <ul> <li>Read-only + bug notes + summary fix. !modify document contents</li> <li>MCP error→ERROR in report, !abort</li> <li><blockquote> <p>20 docs/type→sampling(max 10 via mx_batch_detail). P1 on all(from mx_search). ⚡ !individual mx_detail calls→always mx_batch_detail(doc_ids=[...], level='full')</p> </blockquote> </li> <li>IP protection: metadata+structure only. UTF-8 without BOM. !assumptions→facts only</li> <li>⚡ <strong>VARCHAR clamps for persisted findings:</strong> <code>Read ~/.claude/skills/_shared/mcp-clamp-limits.md.</code> <code>rule_id</code> max 100 chars (pN-kebab-case slugs are short, safe), <code>file_path</code> max 500 chars, <code>details</code> is TEXT (unclamped but keep focused).</li> <li>⚡ <strong>Severity mapping</strong> (report → MCP): <code>ERROR</code> → <code>error</code>, <code>WARNING</code> → <code>warning</code>, <code>INFO</code> → <code>info</code>. Canonical lowercase on the wire.</li> <li>⚡ <strong>Self-check recursion guard:</strong> if mxHealth runs on a project slug named <code>mxHealth</code> (none exists), skip Phase 3b/4 persistence. Self-review findings are reported inline only.</li> <li>⚡ <strong>Mirror sync:</strong> <code>Read ~/.claude/skills/_shared/mirror-sync.md.</code></li> </ul> </article> </div> <!-- Right: Metadata & Command Sidebar --> <div class="w-full lg:w-80 shrink-0 flex flex-col gap-6" data-astro-cid-7zzsworf> <!-- Install Card --> <div class="p-6 rounded-xl bg-surface-container border border-border/80 flex flex-col gap-4 shadow-sm" data-astro-cid-7zzsworf> <span class="text-xs font-bold uppercase tracking-widest text-on-surface-variant/60 font-mono" data-astro-cid-7zzsworf>Install via CLI</span> <div class="flex flex-col gap-2" data-astro-cid-7zzsworf> <div id="detail-install-cmd" class="font-mono text-[11px] p-3 rounded-lg bg-black/40 border border-border select-all break-all text-primary font-bold leading-relaxed" data-astro-cid-7zzsworf> npx skills add https://github.com/MicrotronX/mxLore --skill mxhealth </div> <button id="detail-copy-btn" class="w-full py-2.5 rounded-lg bg-primary hover:bg-primary-hover text-on-primary font-sans font-bold text-sm shadow transition-all active:scale-95 flex items-center justify-center gap-1.5" data-astro-cid-7zzsworf> <span class="material-symbols-outlined text-[16px]" data-astro-cid-7zzsworf>content_copy</span> <span data-astro-cid-7zzsworf>Copy Command</span> </button> </div> </div> <!-- Details & Stats Card --> <div class="p-6 rounded-xl bg-surface-container border border-border/80 flex flex-col gap-4 shadow-sm text-on-surface" data-astro-cid-7zzsworf> <span class="text-xs font-bold uppercase tracking-widest text-on-surface-variant/60 font-sans" data-astro-cid-7zzsworf>Repository Details</span> <div class="flex flex-col gap-3.5" data-astro-cid-7zzsworf> <div class="flex justify-between items-center text-sm" data-astro-cid-7zzsworf> <span class="text-on-surface-variant/70 flex items-center gap-1.5" data-astro-cid-7zzsworf> <span class="material-symbols-outlined text-[16px] text-on-surface-variant/60" data-astro-cid-7zzsworf>star</span> Stars </span> <span class="font-mono font-bold text-on-surface" data-astro-cid-7zzsworf>25</span> </div> <div class="flex justify-between items-center text-sm" data-astro-cid-7zzsworf> <span class="text-on-surface-variant/70 flex items-center gap-1.5" data-astro-cid-7zzsworf> <span class="material-symbols-outlined text-[16px] text-on-surface-variant/60" data-astro-cid-7zzsworf>call_split</span> Forks </span> <span class="font-mono font-bold text-on-surface" data-astro-cid-7zzsworf>9</span> </div> <div class="flex justify-between items-center text-sm" data-astro-cid-7zzsworf> <span class="text-on-surface-variant/70 flex items-center gap-1.5" data-astro-cid-7zzsworf> <span class="material-symbols-outlined text-[16px] text-on-surface-variant/60" data-astro-cid-7zzsworf>navigation</span> Branch </span> <span class="font-mono bg-surface border border-border px-2 py-0.5 rounded text-[11px] text-on-surface-variant" data-astro-cid-7zzsworf>main</span> </div> <div class="flex justify-between items-start text-sm" data-astro-cid-7zzsworf> <span class="text-on-surface-variant/70 flex items-center gap-1.5 mt-0.5" data-astro-cid-7zzsworf> <span class="material-symbols-outlined text-[16px] text-on-surface-variant/60" data-astro-cid-7zzsworf>article</span> Path </span> <span class="font-mono bg-surface border border-border px-2 py-0.5 rounded text-[11px] text-on-surface-variant truncate max-w-[150px]" title="SKILL.md" data-astro-cid-7zzsworf>SKILL.md</span> </div> </div> </div> <!-- Occupations Tag Card --> <!-- Related Creators Card --> <div class="p-6 rounded-xl bg-surface-container border border-border/80 flex flex-col gap-3 shadow-sm" data-astro-cid-7zzsworf> <span class="text-xs font-bold uppercase tracking-widest text-on-surface-variant/60 font-sans" data-astro-cid-7zzsworf>More from Creator</span> <div class="flex items-center gap-2" data-astro-cid-7zzsworf> <img class="w-8 h-8 rounded-full border border-border" src="https://avatars.githubusercontent.com/u/18069653?u=bf2495bb694598dec8edb0ef3bcd91224fcbb500&v=4" alt="MicrotronX" onerror="this.src='https://avatars.githubusercontent.com/u/9919?v=4'" data-astro-cid-7zzsworf> <div class="flex flex-col min-w-0" data-astro-cid-7zzsworf> <span class="font-bold text-sm truncate text-on-surface" data-astro-cid-7zzsworf>MicrotronX</span> <a href="/?creator=MicrotronX" class="text-xs text-primary hover:underline font-semibold transition-all" data-astro-cid-7zzsworf>Explore all skills →</a> </div> </div> </div> </div> </div> </div> </div> <script> const copyBtn = document.getElementById("detail-copy-btn"); const installCmd = document.getElementById("detail-install-cmd"); if (copyBtn && installCmd) { copyBtn.addEventListener("click", () => { const cmd = installCmd.textContent.trim(); navigator.clipboard.writeText(cmd).then(() => { const originalText = copyBtn.innerHTML; copyBtn.innerHTML = ` <span class="material-symbols-outlined text-[16px]">check</span> <span>Copied!</span> `; copyBtn.style.background = "#10b981"; copyBtn.style.borderColor = "#10b981"; setTimeout(() => { copyBtn.innerHTML = originalText; copyBtn.style.background = ""; copyBtn.style.borderColor = ""; }, 1500); }); }); } </script> </div> <!-- Footer --> <footer class="border-t border-border bg-surface-container-low text-on-surface-variant py-8 px-gutter mt-16 rounded-xl"> <div class="max-w-container-max mx-auto flex flex-col md:flex-row justify-between items-center gap-6"> <div class="flex items-center gap-2"> <div class="w-6 h-6 rounded bg-primary bg-opacity-20 flex items-center justify-center"> <span class="material-symbols-outlined text-primary text-sm">code_blocks</span> </div> <span class="font-bold text-on-surface text-sm">SkillMD</span> </div> <div class="flex flex-wrap justify-center gap-6 text-sm"> <a href="/about" class="hover:text-primary transition-colors">About Us</a> <a href="/contact" class="hover:text-primary transition-colors">Contact Us</a> <a href="/privacy" class="hover:text-primary transition-colors">Privacy Policy</a> <a href="/terms" class="hover:text-primary transition-colors">Terms of Service</a> <a href="/support" class="hover:text-primary transition-colors">Support</a> </div> <div class="text-xs text-on-surface-variant/80"> © 2026 SkillMD. All rights reserved. </div> </div> </footer> </main> <!-- Script for Theme Toggle, Mobile Menu, and Sidebar Filter Redirection --> <script> // Theme setup const savedTheme = localStorage.getItem("theme") || "dark"; function applyTheme(theme) { document.documentElement.classList.remove("dark", "green", "dracula", "nord"); if (theme === "dark") { document.documentElement.classList.add("dark"); } else if (theme === "green") { document.documentElement.classList.add("dark", "green"); } else if (theme === "dracula") { document.documentElement.classList.add("dark", "dracula"); } else if (theme === "nord") { document.documentElement.classList.add("dark", "nord"); } document.documentElement.setAttribute("data-theme", theme); const themeMoon = document.getElementById("theme-moon"); const themeSun = document.getElementById("theme-sun"); const themeLeaf = document.getElementById("theme-leaf"); const themeDracula = document.getElementById("theme-dracula"); const themeNord = document.getElementById("theme-nord"); if (themeMoon && themeSun && themeLeaf && themeDracula && themeNord) { themeMoon.style.display = theme === "dark" ? "inline" : "none"; themeSun.style.display = theme === "light" ? "inline" : "none"; themeLeaf.style.display = theme === "green" ? "inline" : "none"; themeDracula.style.display = theme === "dracula" ? "inline" : "none"; themeNord.style.display = theme === "nord" ? "inline" : "none"; } } applyTheme(savedTheme); const themeToggleBtn = document.getElementById("theme-toggle-btn"); if (themeToggleBtn) { themeToggleBtn.addEventListener("click", () => { const currentTheme = document.documentElement.getAttribute("data-theme") || "dark"; let newTheme = "dark"; if (currentTheme === "dark") { newTheme = "light"; } else if (currentTheme === "light") { newTheme = "green"; } else if (currentTheme === "green") { newTheme = "dracula"; } else if (currentTheme === "dracula") { newTheme = "nord"; } else { newTheme = "dark"; } applyTheme(newTheme); localStorage.setItem("theme", newTheme); }); } // Mobile menu toggle and sidebar logic const mobileMenuToggle = document.getElementById("mobile-menu-toggle"); const sidebarMenu = document.getElementById("sidebar-menu"); const sidebarOverlay = document.getElementById("sidebar-overlay"); function isMobile() { return window.innerWidth < 768; // 768px is the 'md' breakpoint in Tailwind } function openSidebar() { if (sidebarMenu) { sidebarMenu.classList.remove("-translate-x-full"); } if (sidebarOverlay) { sidebarOverlay.classList.remove("hidden"); } } function closeSidebar() { if (sidebarMenu && isMobile()) { sidebarMenu.classList.add("-translate-x-full"); } if (sidebarOverlay) { sidebarOverlay.classList.add("hidden"); } } if (mobileMenuToggle && sidebarMenu) { mobileMenuToggle.addEventListener("click", (e) => { e.stopPropagation(); if (isMobile()) { const isClosed = sidebarMenu.classList.contains("-translate-x-full"); if (isClosed) { openSidebar(); } else { closeSidebar(); } } }); document.addEventListener("click", (e) => { if (isMobile()) { if (!sidebarMenu.contains(e.target) && !mobileMenuToggle.contains(e.target)) { closeSidebar(); } } }); if (sidebarOverlay) { sidebarOverlay.addEventListener("click", () => { if (isMobile()) { closeSidebar(); } }); } // Collapse sidebar when clicking a filter button, creator button, or nav item inside it sidebarMenu.addEventListener("click", (e) => { if (isMobile()) { const clickTarget = e.target.closest("button, a"); if (clickTarget) { closeSidebar(); } } }); // Sync sidebar state on window resize window.addEventListener("resize", () => { if (!isMobile()) { // Desktop: sidebar should be visible, no overlay if (sidebarMenu) { sidebarMenu.classList.remove("-translate-x-full"); } if (sidebarOverlay) { sidebarOverlay.classList.add("hidden"); } } else { // Mobile: start collapsed if (sidebarMenu) { sidebarMenu.classList.add("-translate-x-full"); } if (sidebarOverlay) { sidebarOverlay.classList.add("hidden"); } } }); } // If not on homepage, redirect on sidebar filter click const isHomepage = window.location.pathname === "/"; document.querySelectorAll("#occupation-filters .filter-btn").forEach(btn => { btn.addEventListener("click", (e) => { const occ = e.currentTarget.getAttribute("data-occupation"); if (!isHomepage) { window.location.href = occ ? `/?occupation=${encodeURIComponent(occ)}` : "/"; } }); }); document.querySelectorAll("#creator-filters .creator-btn").forEach(btn => { btn.addEventListener("click", (e) => { const creator = e.currentTarget.getAttribute("data-creator"); if (!isHomepage) { window.location.href = `/?creator=${encodeURIComponent(creator)}`; } }); }); </script> </body> </html>