From superpowers-plus
Validates wiki markdown structure before publishing: blocks malformed tables, escaped wiki-links, unbalanced code/callout fences, heading hierarchy defects, and missing TOC on manual-TOC platforms with 4+ headings.
How this skill is triggered — by the user, by Claude, or both
Slash command
/superpowers-plus:wiki-markdown-structure-gateThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Block structurally broken wiki markdown before publish. Stage 5.5 in
Block structurally broken wiki markdown before publish. Stage 5.5 in
wiki-orchestrator. Validator: tools/wiki-markdown-validate.js.
wiki-orchestratoraudit wiki markdown structure, fix malformed wiki table, wiki formatting gate, broken admonition block# On generated draft
node tools/wiki-markdown-validate.js draft.md
# On fetched body (pipe stdin, strip YAML if present)
tools/wiki-read.sh get "$PAGE_ID" | jq -r '.text' \
| node tools/wiki-markdown-validate.js --stdin
Exit 0 → pass (publish allowed). Non-zero → BLOCK: read stderr for line
numbers, fix, re-run. Do not publish until exit 0.
| Check | Block when |
|---|---|
| H1 heading | Any # Title line in the body — Outline renders the page title automatically; H1 creates a redundant duplicate |
| Table structure | Missing separator row, inconsistent cell counts, stray | row |
| Escaped wiki-links | \[title\[/doc/... and similar round-trip artifacts |
| Code fences | Unbalanced backtick (```) or tilde (~~~) fences |
| Callout fences | Unbalanced :::info / :::warning / similar |
| Heading hierarchy | H3+ before any H2, or a level skipped |
| Missing TOC | toc_behavior=manual and ≥4 body H2/H3 (outside fences) and no adapter toc_syntax |
A generic Contents heading does not satisfy the TOC rule — only the
adapter's declared toc_syntax counts. Outline example: a +++ toggle whose
first line contains Table of contents. If no adapter config is resolvable,
the gate fails closed as misconfiguration.
Very wide tables · dense cells with many links · duplicate manual TOCs.
wiki-orchestrator Stage 5.5tools/wiki-write.sh verification step| Failure | Fix |
|---|---|
| Structural checks treated as advisory | Treat BLOCK as halt; only WARN is advisory |
| Only links/secrets checked before publish | Run this gate (Stage 5.5) on every draft |
| Long page published without TOC | Insert adapter toc_syntax after intro; re-run |
| Heading count included fenced code | Validator already excludes fences; re-run if you hand-rolled the count |
wiki-orchestrator (invokes this at Stage 5.5) · wiki-content-coherence · wiki-debunker
npx claudepluginhub bordenet/superpowers-plus --plugin superpowers-plusGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.