obsidian-html-docs
Skill0 starsChanged 5 months agoMITView on GitHub
Use when creating .html docs intended to render inline in Obsidian with the HTML Docs plugin (github.com/smcllns/obsidian-plugin-html-docs).
In this repository3 other files it gives its agents.
- path-to-goalSkill
- social-researchSkill
- token-countSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Default embed height ≈ 600px.
- Very specific: line 56
Before loading the Blob, the plugin injects a <style> snapshot of Obsidian's current theme.
- Very specific: line 58
Default to these for vault-native docs, with light-dark() fallbacks so the file still works when opened outside Obsidian:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Obsidian HTML Docs authoring guide
The HTML Docs plugin for Obsidian renders each .html file in a sandboxed iframe via Blob URL. No allow-same-origin, no vault path resolution, no storage. Author within that envelope.
Linking and embedding
Wikilinks need the explicit .html extension; embeds take an optional |WxH (standard Obsidian embed-sizing syntax — also supports |width for proportional scaling, see Obsidian docs):
[[my-doc.html]] <- link
![[doc.html|600x400]] <- embedDefault embed height ≈ 600px; tab views fill the pane.
What works in the HTML page
Works:
- HTML / CSS (grid,
light-dark(), animations, SVG) - JavaScript (ES2020+, fetch with CORS,
requestAnimationFrame, Canvas 2D) - Forms
window.parent.postMessage(msg, '*')- Anchor links and the History API
- HTTPS resources (images, fonts, stylesheets)
data:URLs and inline SVG
Blocked:
localStorage/sessionStorage/IndexedDB/document.cookie— use URL hash orpostMessagefor state- Reading
window.parent.*— cross-origin (postMessagestill works) - Top-level navigation — links inside the page can't redirect Obsidian itself; use
target="_blank"to open externally - Clipboard API — programmatic
navigator.clipboard.*is blocked, but users can still select text and copy with ⌘C - Service workers, geolocation, notifications
- Vault-relative URLs (see Assets)
Assets
| Source | Works? |
attachments/foo.png or any vault-relative path | No — fails silently |
Inline <svg> | Yes |
data: URL | Yes |
| HTTPS URL (image, font, stylesheet) | Yes — CORS permitting |
| Obsidian theme / CSS | Yes — via injected theme tokens (see below) |
Inline SVG or data: URL for small graphics. Host photos externally (R2/CDN). Never reference the vault.
Theme tokens
Before loading the Blob, the plugin injects a <style> snapshot of Obsidian's current theme. Open docs re-render on theme change.
Default to these for vault-native docs, with light-dark() fallbacks so the file still works when opened outside Obsidian:
:root {
color-scheme: light dark;
--bg: var(--obsidian-bg, light-dark(#ffffff, #0e1014));
--text: var(--obsidian-text, light-dark(#16161a, #e7e9ec));
}For a specific aesthetic (brand palette, brutalist, retro), design freely — Obsidian context is a hint, not a constraint. Full token list in the appendix.
Appendix: injected theme tokens
| Token | Purpose |
--obsidian-color-scheme | light or dark (also sets color-scheme: on :root) |
--obsidian-bg, --obsidian-bg-2 | Background surfaces |
--obsidian-text, --obsidian-text-muted | Text colors |
--obsidian-accent | Accent |
--obsidian-border | Borders |
--obsidian-font, --obsidian-font-mono | Font stacks |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

