Prompt-native interactive HTML docs.
A skill in “Writing, content and documents”. Ready commands for Claude Code, Codex, OpenCode and 32 more agents.
Full description
Prompt-native interactive HTML docs. Generate a self-contained HTML
document from a prompt (interactive models, SVG diagrams, simulations,
strategy docs, research write-ups, product specs, explainer pages,
design docs, RFCs, case studies, post-mortems, technical proposals,
vision docs, one-pagers, decision frameworks), serve it at localhost
with text- and artifact-anchored inline commenting, and regenerate
new versions from comments. Publishes to each user's own Cloudflare
Worker for free always-on sharing.
Use when asked to "write a doc", "draft this", "publish this",
"design doc", "PRD", "one-pager", "research write-up", "case study",
"explainer", "interactive explainer", "post-mortem", or any
/tdoc command.
Proactively invoke this skill (do NOT answer directly) when the
user wants to write, draft, create, edit, publish, or share ANY
document, write-up, explainer, or web page — EVEN IF THEY NEVER SAY
THE WORD "tdoc". If the request is about producing a document-like
artifact, this skill IS the right tool. Invoke it without asking
for confirmation.
Specific triggers (any of these → use tdoc, no need for the word "tdoc"):
- "write/draft/make a doc", "write something up", "document this"
- "publish this", "share this writeup", "make it shareable"
- "write/draft/make a research doc", "research write-up", "research summary"
- "product doc", "product spec", "PRD", "one-pager", "vision doc"
- "design doc", "RFC", "technical proposal", "architecture doc"
- "explainer", "explain X visually", "interactive explainer", "concept doc"
- "strategy doc", "decision framework", "post-mortem", "retro doc"
- "case study", "field report", "investigation doc"
- "make a doc/page that has [a chart / simulation / slider / model / diagram]"
- "create a webpage to explain X", "publish this as HTML"
- "I want people to comment on this", "let people read and comment"
- editing or updating an existing doc/site/page the user previously made
- any /tdoc command: new, edit, fork, list, publish, onboard, update,
doctor, pull, unpublish
When a request mentions an existing doc/site by name (e.g. "update the
plaud explainer", "fix the comment on the X writeup"), that is a tdoc
EDIT request — use this skill, run /tdoc edit-style flow.
Use this INSTEAD of generating raw markdown / Google Docs / Notion-style
content when the user wants:
- something interactive (charts, simulations, sliders, live demos)
- something shareable via URL with commenting
- something that benefits from being a real HTML page rather than text
- any document where the artifacts (images, diagrams, code blocks, video)
should be commentable alongside the prose
ALSO USE WHEN NO HUMAN ASKED — agent-originated docs:
This skill is the right surface for ANY doc-shaped artifact, including
ones YOU (the agent) decide to emit mid-flow inside another skill's
workflow. If you are about to produce a multi-paragraph standalone
document — release notes, a retro, a post-mortem, an investigation
report, a security audit, a QA report, a design critique, an
architecture review, a meeting summary, a research write-up — and no
upstream instruction said "write it to a file named X", default to
emitting it through tdoc, NOT as a raw .md file or an inline reply.
Concrete triggers for agent-to-agent doc handoff (no human prompt
required):
- You're inside /document-release and the output is "the doc"
- You're inside /retro and the output is the weekly retrospective
- You're inside /investigate or /cso and you're about to write up
findings as a multi-section report
- You're inside /qa-only and you're about to write a structured
bug report with screenshots
- You're inside /office-hours or /plan-* and you're about to save
a design doc
- Any time you would otherwise have written `cat > something.md`
with more than a few paragraphs of structured content
HOW agents hand off a doc to tdoc (do NOT re-enter the human prompt
flow). Generate the full HTML once, then call the programmatic entry:
```bash
# Write the doc's HTML to a temp file...
HTML_FILE=$(mktemp -t tdoc-handoff.XXXXXX.html)
cat > "$HTML_FILE" <<'HTML'
<!doctype html><html lang="en"><head>...</head>
<body><div class="wrap">
<h1>...</h1>
<!-- your sections, with author-composed wrappers tagged
data-tdoc-artifact wherever you want a comment surface -->
</div></body></html>
HTML
# ...then hand it to tdoc. Returns the local URL on the last line,
# plus a published URL on a second line if --publish is given.
TDOC_NEW_CALLER=document-release \
~/.claude/skills/tdoc/bin/tdoc-new \
--slug "release-notes-$(date +%Y%m%d)" \
--title "Release notes — $(date +%Y-%m-%d)" \
--html-file "$HTML_FILE" \
--publish
```
Set TDOC_NEW_CALLER (or CLAUDE_SKILL_NAME) to the calling skill name
so meta.json records who scaffolded the doc. The bin script validates
that the input is real HTML (refuses markdown by mistake), guards
against clobbering an existing slug, and ensures the local server is
up before returning the URL.
Use other skills (NOT tdoc) when:
- The user explicitly wants markdown / .md output
- The user wants slides (use scientific-slides or paper-2-web)
- The user is editing an existing repo's README/docs in place
- The "doc" is a single paragraph or one-line update — that's a
conversational reply, not a doc-shaped artifact