con un clic
kb-publish
Publish KB notes or synthesized reports as interactive HTML
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Publish KB notes or synthesized reports as interactive HTML
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
Find near-duplicate notes and merge them safely. Use when the user asks to "dedupe the KB", "find duplicate notes", "merge these notes", or after large research sessions that may have re-covered existing ground.
Re-verify time-sensitive claims in KB notes against live sources and apply visible corrections. Use when the user asks to "refresh the KB", "re-verify notes", "check what's gone stale", or on a schedule. Distinct from /kb-review (structural quality) — this checks whether the facts are still true.
Synthesize a coherent narrative explanation of a topic from multiple KB notes. Use when the user asks to "explain X from the KB", wants a structured overview/briefing woven from existing notes, or asks "what's the full picture on X".
Answer a single question and save the answer as an atomic note in the knowledge base. Use when the user poses a discrete factual/conceptual question they want captured for later, says "look this up and save it", "add this to the KB", or "note down the answer to X".
Agentic research loop that deeply investigates a topic via web search and saves findings as atomic notes
Audit the knowledge base for quality issues (orphans, broken links, missing citations, stale notes, tag drift) and suggest improvements. Use when the user asks to "review the KB", "check note quality", "find orphans/broken links/duplicates", or "what needs cleanup".
| name | kb-publish |
| description | Publish KB notes or synthesized reports as interactive HTML |
| user_invocable | true |
| arguments | Note name, research hub name, or --explain topic. Optional: --kb <name> to specify which KB the note is in |
Publish KB content as a self-contained interactive HTML report.
The conversion is already implemented in .kb/build-report.py — use it. Do not hand-assemble HTML, hand-number footnotes, or hand-convert markdown unless the script can't do what's needed (see Fallback). The script is the single source of truth for markdown→HTML, wikilink resolution, citation→footnote conversion, hub-following, and template injection.
KB resolution: Parse $ARGUMENTS for --kb <name>. The builder has no --kb flag — instead pass the slug in kb:slug form (e.g. general:video-prompt-anatomy) when a bare slug is ambiguous across KBs or when you want to force a specific KB. A bare slug works when it's unique across all KBs. If a bare slug is ambiguous and no KB was given, ask the user which KB.
/kb-publish <note-name> — publish a single note/kb-publish <research-hub-name> — publish a hub + all linked notes as a multi-section report/kb-publish <collection-note> — publish a curated, grouped multi-part report (see Collection mode)/kb-publish --explain <topic> — synthesize a narrative first, then publish itSingle vs. hub is automatic. The builder counts the note's hub children — its related: and depends_on: wikilinks combined (synthesis notes list their atomic components in depends_on, so those expand too): if the count exceeds graph.hub_threshold in .kb/config.yaml (default 3), it renders hub mode (the note's body first, then every child note as a collapsible section, footnotes pooled and de-duplicated). Otherwise it renders single-note mode (just that note). You don't choose hub vs. single — picking the right starting slug determines it.
To publish several hubs / research sets together as one cohesive, grouped report, add a collection: key to a master note's frontmatter. Each entry is a titled "Part" whose member notes render as sections under a divider, with a nested TOC. Notes shared across parts are de-duplicated (first occurrence wins); frontmatter-only notes are skipped.
collection:
- title: "Part I — Landscape"
notes: [some-hub, comp-a, comp-b, comp-c]
- title: "Part II — Deep-Dive"
notes: [deep-hub, sub-a, sub-b]
- title: "Part III — Video"
hub: video-patterns-hub # alternative to `notes:` — auto-expands the hub's related+depends_on
notes: is the explicit, predictable form (full control over membership and order — preferred when a hub's related: would pull in tangential cross-links). hub: auto-expands a sub-hub's children. The master note's own body renders as the un-collapsed intro. Then run python3 .kb/build-report.py <master-slug>. Output naming follows the rules below.
For single-note and hub modes:
python3 .kb/build-report.py <slug> [--title "Custom Title"]
Examples:
python3 .kb/build-report.py research-hub-prompting-ai-video-quality
python3 .kb/build-report.py general:soc2-compliance-overview --title "SOC 2 Guide"
What it does automatically:
kb:slug).[[wikilink]] in related: (hub mode), reading each linked note. Cross-KB links ([[kb:slug]]) resolve too; an explicit cross-KB link that isn't found fails closed (rendered as plain text, not a broken anchor).[text](../../references/file.md) and external [text](https://…) → numbered footnotes, de-duplicated by URL, linking to the Source: URL inside each reference file.id="{kb}--{slug}" (e.g. general--video-prompt-anatomy); in-report wikilinks resolve to href="#{kb}--{slug}". (Use these IDs if you ever post-process the output.).kb/templates/report.html and writes the file.The output filename is derived from the title:
--title → publish/<slug>.html (clean).--title → publish/<title-lowercased-with-spaces-as-hyphens>.html, keeping punctuation. A title with em-dashes, parentheses, or colons produces an ugly/awkward filename.So: prefer omitting --title (the note's own title: is used for the heading regardless), or pass a slug-friendly title, or mv the file to a clean name afterward. Always report the final path and size.
--explain <topic>)The builder only takes an existing slug, so synthesize first:
/kb-explain logic: search the KB, read all relevant notes, synthesize a grounded narrative with [[wikilinks]] to the notes used and inline [text](../../references/…) citations.reference-type note in the target KB (e.g. kbs/<kb>/published-<topic-slug>.md) with a related: list of every note it references — so the builder renders it as a hub (narrative first, source notes as collapsible sections).python3 .kb/build-report.py <topic-slug>.Only if the builder fails (template/script error) or the user needs a format the script can't produce (custom section ordering, a bespoke layout). Then assemble by hand following the script's contract so output stays consistent:
.kb/templates/report.html; replace {{TITLE}}, {{META}} (Published <date> | <N> notes | <N> sources), {{TOC}}, {{CONTENT}}, {{FOOTNOTES}}.<div class="section" id="{kb}--{slug}">
<div class="section-header"><h2>Note Title</h2><span class="toggle">▼</span></div>
<div class="section-body">…converted HTML…</div>
</div>
<a class="wikilink" href="#{kb}--{slug}" data-target="{kb}--{slug}">text</a> (KB-qualified IDs — match the script); plain bold text if the target isn't in the report.…text<span class="footnote-ref" data-fn="N">[N]</span>, with <li id="fn-N"><a href="URL" target="_blank">text</a></li>; de-duplicate footnotes by URL.valid_until/dated pricing or standings, mention that the snapshot will age..kb/templates/report.html (read-only)publish/$ARGUMENTS