New: Earn 20% as an AgentAlley affiliate. Share your link and earn on every sale you refer. Join now New: Earn 20% as an affiliate. Join now

Structured HTML Artifact

Structured artifact

by haowjy · Apache-2.0 license · ★ 506 on GitHub

Structured artifact cover

Load when building a static HTML artifact — single page or multi-page site — to make structured information explorable through layout and navigation.

---
name: structured-artifact
description: |
  Load when building a static HTML artifact — single page or multi-page site —
  to make structured information explorable through layout and navigation.
disable-model-invocation: true
---

# Structured Artifact

A structured artifact is plain HTML that opens from `file://` and works on a
phone. Load `/information-hierarchy` first — it decides what each page shows
and in what order; this skill builds it.

## One page or several

Start from one `index.html`. Its first viewport carries the answer, and depth
discloses in place — `<details>`, popovers, a collapsible detail panel. Grow

Overview

A structured artifact is plain HTML that opens from file:// and works on a phone. Load /information-hierarchy first — it decides what each page shows and in what order; this skill builds it.

Manual install (npx, ZIP)
Claude Codenpx skills add haowjy/creative-writing-skills --skill structured-artifact -g -a claude-code
Claude Code (degit)npx degit haowjy/creative-writing-skills/cw/skills/structured-artifact#main ~/.claude/skills/structured-artifact
Claude.ai / desktopZip the folder and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md3.4 KB
Read SKILL.md here
haowjy/main1 file shown
SKILL.md
Show the full text71 lines

Structured Artifact

A structured artifact is plain HTML that opens from file:// and works on a phone. Load /information-hierarchy first — it decides what each page shows and in what order; this skill builds it.

One page or several

Start from one index.html. Its first viewport carries the answer, and depth discloses in place — <details>, popovers, a collapsible detail panel. Grow into a folder (index.html + child pages + shared.css) when readers need whole pages per branch: the index becomes a map with links, and each child page stands alone with its own lede. resources/multi-page-site.md has the folder mechanics.

Build so it keeps working

Everything ships static — plain <script> tags, zero build step — so the artifact opens anywhere, years later, with nothing installed. CDN tags are the default; vendor the scripts into the folder when the artifact must work offline (resources/layout-and-theme.md). Resource snippets show the shape of each library's use, pinned only to a major version — before building, web-search the library's current version and syntax when anything looks dated, rather than trusting the snippet as frozen truth. Design for a narrow viewport and let wider layouts be enhancements; touch targets stay ≥ 44px and diagrams pan and pinch. Drive colors from CSS custom properties on :root, default light, with a ☀/🌙 toggle that adds .dark to <html> — readers get a readable page in daylight and a choice at night.

resources/layout-and-theme.md has the concrete layout, theme, and mobile patterns shared across everything below.

Verify the end state

Open the artifact in a browser before calling it done — a snippet that looked right in the editor still fails at runtime (a CDN URL 404s, a library changed its API, a diagram overflows). Check what a reader meets: the first viewport carries the answer, every page renders at ~375px width, the theme toggle flips both text and embedded content, links between pages resolve, and Mermaid diagrams render correctly.

Enrichments

Mix and match resources and patterns as needed, starting with the simplest pattern and adding complexity only when information hierarchy calls for it.

Load a resource when a beat calls for its pattern:

Pattern When a beat needs Resource
Multi-page site Index + child pages, nav, cross-links resources/multi-page-site.md
Mockup Wireframe or annotated plan the reader must see resources/mockups.md
Diagram Dependencies, flow, system maps resources/diagrams.md
Data table Records with sortable/filterable columns resources/data-table.md
Data chart Quantities, trends, distributions resources/data-chart.md
Timeline Chronological events with detail resources/timeline.md
Tree / TOC Hierarchy navigation, document outline resources/tree-and-toc.md
Card grid Items with summary + expandable detail resources/card-grid.md
Diff / comparison Before/after, version diff resources/diff-view.md

For custom node rendering, drag, or live filtering on graphs beyond what Mermaid offers, see resources/experimental-react-flow.md.

1---
2name: structured-artifact
3description: |
4 Load when building a static HTML artifact — single page or multi-page site —
5 to make structured information explorable through layout and navigation.
6disable-model-invocation: true
7---
8 
9# Structured Artifact
10 
11A structured artifact is plain HTML that opens from `file://` and works on a
12phone. Load `/information-hierarchy` first — it decides what each page shows
13and in what order; this skill builds it.
14 
15## One page or several
16 
17Start from one `index.html`. Its first viewport carries the answer, and depth
18discloses in place — `<details>`, popovers, a collapsible detail panel. Grow
19into a folder (`index.html` + child pages + `shared.css`) when readers need
20whole pages per branch: the index becomes a map with links, and each child
21page stands alone with its own lede. `resources/multi-page-site.md` has the
22folder mechanics.
23 
24## Build so it keeps working
25 
26Everything ships static — plain `<script>` tags, zero build step — so the
27artifact opens anywhere, years later, with nothing installed. CDN tags are
28the default; vendor the scripts into the folder when the artifact must work
29offline (`resources/layout-and-theme.md`). Resource snippets show the shape
30of each library's use, pinned only to a major version — before building,
31web-search the library's current version and syntax when anything looks
32dated, rather than trusting the snippet as frozen truth. Design for a
33narrow viewport and let wider layouts be enhancements; touch targets stay
34≥ 44px and diagrams pan and pinch. Drive colors from CSS custom properties on
35`:root`, default light, with a ☀/🌙 toggle that adds `.dark` to `<html>` —
36readers get a readable page in daylight and a choice at night.
37 
38`resources/layout-and-theme.md` has the concrete layout, theme, and mobile
39patterns shared across everything below.
40 
41## Verify the end state
42 
43Open the artifact in a browser before calling it done — a snippet that
44looked right in the editor still fails at runtime (a CDN URL 404s, a library
45changed its API, a diagram overflows). Check what a reader meets: the first
46viewport carries the answer, every page renders at ~375px width, the theme
47toggle flips both text and embedded content, links between pages resolve,
48and Mermaid diagrams render correctly.
49 
50## Enrichments
51 
52Mix and match resources and patterns as needed, starting with the simplest
53pattern and adding complexity only when information hierarchy calls for it.
54 
55Load a resource when a beat calls for its pattern:
56 
57| Pattern | When a beat needs | Resource |
58|---|---|---|
59| Multi-page site | Index + child pages, nav, cross-links | `resources/multi-page-site.md` |
60| Mockup | Wireframe or annotated plan the reader must see | `resources/mockups.md` |
61| Diagram | Dependencies, flow, system maps | `resources/diagrams.md` |
62| Data table | Records with sortable/filterable columns | `resources/data-table.md` |
63| Data chart | Quantities, trends, distributions | `resources/data-chart.md` |
64| Timeline | Chronological events with detail | `resources/timeline.md` |
65| Tree / TOC | Hierarchy navigation, document outline | `resources/tree-and-toc.md` |
66| Card grid | Items with summary + expandable detail | `resources/card-grid.md` |
67| Diff / comparison | Before/after, version diff | `resources/diff-view.md` |
68 
69For custom node rendering, drag, or live filtering on graphs beyond what
70Mermaid offers, see `resources/experimental-react-flow.md`.
71 
View all files on GitHub →

Details

License
Apache-2.0
Stars on the repo
★ 506
Checked
Source
haowjy/creative-writing-skills ↗
Creator
haowjy · 22 listings
View creator

Similar skills

See all →

More from haowjy

Character Voice Simulatorhaowjy/creative-writing-skills · by haowjySpeak as a specified character from their current knowledge, voice, and emotional state. Use for skill-only workflows that need in-character conversation, voice discovery, or relationship pressure tests.★ 506 GitHub starsStory Research Assistanthaowjy/creative-writing-skills · by haowjyLoad when a story needs factual grounding the writer doesn't have: historical detail, cultural texture, domain accuracy, or how other authors handled similar material. Pass the question and story context; returns a sourced report the writer can draw from.★ 506 GitHub starsFiction Writing Craft Guidehaowjy/creative-writing-skills · by haowjyCraft references for writing fiction well: prose, scenes, style, voice, and genre/page-level technique. Load when a writer, critic, or muse needs how-to-write guidance rather than a production mode.★ 506 GitHub starsWriting Mode Guidehaowjy/creative-writing-skills · by haowjyCreative-writing addendum to /llm-writing. Load when putting prose on the page: draft, revise, bridge, vary, or polish.★ 506 GitHub starsMulti-Mode Writing Studiohaowjy/creative-writing-skills · by haowjyLoad when no subagents are available and one agent must plan, draft, critique, research, and capture memory by switching stances.★ 506 GitHub starsOutput Information Hierarchyhaowjy/creative-writing-skills · by haowjyLoad for large human-facing outputs: reports, docs, multi-section explanations, artifacts. Choose the right form for each beat (prose, diagram, table, mockup) and put the answer first, depth behind it. If the medium allows, use progressive disclosure.★ 506 GitHub stars