agentsclimarketplace

Layout html

Skill loursCreatif/ours-stack/layout-html

Turn one finished text — deep-research report.md, study notes.md, any .md/.txt file, or pasted content — into a single self-contained HTML page: editorial typography plus inline SVG figures built only from data already present in the text. No new research, no invented numbers, no external dependency; the page opens offline from file://. Use when the user says "layout", "mise en page", "HTML version", "rends ça lisible", "turn this into a page", or runs /layout-html.From its SKILL.md

Install
npx -y skills add loursCreatif/ours-stack --skill layout-html

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

8.5 KB, ~2.0k tokens by cl100k_base, as published. Nobody here has run it

Layout HTML

One text in, one .html file out. The page must survive three tests:

  1. It opens from file://, network unplugged, and looks finished.
  2. Every figure traces back to a sentence of the source text.
  3. A reader who never sees the original loses no claim, no caveat, no number.

Time budget: one reading pass, one question, one file. No research detours.

Hard rules

  • No new research. The source text is the entire knowledge base. Never WebFetch, never fill a gap from memory. Missing context stays missing (see Failure modes).
  • Figures are quotations. Every SVG visualizes data that exists in the source. A number absent from the text never appears in a figure. No numbers in the text → structure figures only (flow, timeline, hierarchy) or none. Never a decorative fake chart.
  • Self-contained or nothing. One file: inline CSS, inline SVG, system font stack. No CDN, no webfont, no <script src>, no external image. The only outbound links are sources the text already cites.
  • Fidelity over beauty. Never alter a claim, drop a caveat, soften a hedge, or reorder an argument. Abridge only with a visible [abridged — full text in source] marker.
  • Zero JavaScript by default. CSS does the layout. Single exception: Magazine mode may embed ≤30 lines of vanilla JS for a collapsible TOC.
  • AskUserQuestion: one question per call; title Layout — {label}.

Step 0: Locate the text

First match wins:

InputSource readOutput (AGENTS.md contract)
Study slug named or inferablestudies/<slug>/notes.md (default)studies/<slug>/report.html
Research slugresearch/<slug>/report.mdresearch/<slug>/report.html
Explicit file path (.md/.txt)that fileoutput/layout/<slug>/article.html
Pasted textthe pasteoutput/layout/<slug>/article.html
  • Study has several layoutable texts (notes.md, council.md, research.md) → one AskUserQuestion (Layout — Source) listing them; never guess.
  • Ad-hoc slug: derive from title, lowercase-hyphens (AGENTS.md slug rules); if output/layout/<slug>/ exists, ask before overwriting.
  • Source under ~300 words → warn: typography-only card, no figures (a figure needs material).

Step 1: Figure ledger

One reading pass. While reading, hunt figure candidates:

Pattern in the textCandidate figure
Two+ numbers compared (A vs B, before/after)Bar pair / slope
Values over timeTimeline / sparkline
Parts of a wholeStacked proportion bar
Process, pipeline, causalityFlow diagram
Taxonomy, options, trade-offsMatrix or tree
One striking numberStat callout
One striking sentencePull-quote card

For each candidate, record in a working ledger (in conversation, not a file): the exact source sentence, its section, the figure type. Then cut hard: keep 3–7, ranked by "would the reader remember this tomorrow?". Fewer than 2 solid candidates → the page is typography-only; say so rather than forcing weak figures.

The ledger is the traceability contract: at delivery, every figure cites its ledger line.

Step 2: Art direction — one question

AskUserQuestion — title Layout — Direction:

  • Éditorial (recommended) — calm single column (68ch), strong typographic hierarchy, figures interleaved at their reference point. For reading and rereading.
  • Magazine — full-bleed header, standfirst, pull quotes, denser figure rhythm, collapsible TOC (the one JS exception). For sharing and skimming.
  • other

Never ask about colors, fonts, or spacing — that is the skill's job, not the user's.

Step 3: Design tokens

The <style> block starts with tokens; every later rule uses tokens only:

:root {
  --paper: …;  --ink: …;          /* base pair, contrast ≥ 7:1 */
  --accent: …;                    /* ONE hue, chosen from content mood */
  --muted: …;                     /* captions, meta — ≥ 4.5:1 on paper */
  --step--1 … --step-3: …;        /* type scale, ratio 1.25 */
  --space: 8px;                   /* all gaps are multiples */
  --measure: 68ch;
}
@media (prefers-color-scheme: dark) { /* swap paper/ink, re-check accent */ }
  • One accent hue. Two is a design failure.
  • Fonts: system stack only (ui-serif headings / ui-sans-serif body, or the inverse per mood). No downloads.
  • Accent choice comes from the content (biology → green family, hardware → steel blue…) — decide once, state it in the delivery note.

Step 4: Page skeleton

Semantic HTML5, in order:

  1. <header><h1> (source title), standfirst (the source's own one-line thesis — quoted, not invented), meta line (source path, date, "layout only — no new research").
  2. <nav> TOC — only if the source has >4 ## sections; anchor links; collapsible in Magazine mode.
  3. <main> — sections mirror the source structure 1:1 (same order, same hierarchy). Body text in the --measure column, line-height: 1.6.
  4. Each figure: <figure> + <figcaption>, placed at the point where the source discusses it — never grouped in an annex.
  5. <footer> — provenance: source file, generation date, /layout-html mention, and the source's own bibliography/links if present.

Step 5: SVG recipes

Every figure obeys:

  • viewBox set, width: 100%, no fixed pixel height in the HTML.
  • role="img" + <title> + <desc> (the desc is the ledger sentence).
  • Text inside the SVG ≥ 12px at base scale; colors from tokens only (currentColor, var(--accent)).
  • <figcaption> = one factual line + (§ section name) for traceability.
  • Geometry hand-coded — no chart library, no generator.
RecipeGeometry
Bar pair2–5 horizontal bars, labels left, values right
Timelinehorizontal axis, dated ticks, one-line labels alternating above/below
Flowboxes + arrows, left→right, max 6 nodes; wrap to two rows beyond
Proportionone stacked horizontal bar, ≤5 segments, direct labels (no legend)
Stat calloutthe number at --step-3, unit small, source sentence underneath
Pull quotethe sentence at --step-1 italic, thick --accent left border
Matrix2×2 grid, axis labels on the edges, ≤2 words per cell

Step 6: Self-check (before Write)

Run against the finished HTML string — fix, never ship warnings:

  • <script count → 0 (Éditorial) or exactly 1 inline TOC block (Magazine)
  • http matches only inside the sources/footer section
  • every <svg has viewBox, <title>, <desc>
  • every number appearing in a figure re-greps in the source text
  • every source caveat/hedge sentence is present in the page
  • [abridged] markers everywhere content was cut
  • single <h1>; heading levels never skip
  • file ≤ 200 KB

Step 7: Deliver

  1. Write the file to the Step 0 contract path.
  2. In chat, ≤6 lines, no theater:
    • the path + "double-clique le fichier pour l'ouvrir"
    • figures shipped: N figures — bar pair (§2), timeline (§3), …
    • what was abridged, or "rien coupé"
    • accent hue chosen and why (3 words)

Failure modes

SituationResponse
No layoutable text foundSay so; route: /dense-read (study) or /deep-research (standalone)
Text < 300 wordsTypography-only card; note "trop court pour des figures"
User asks to add context/research mid-layoutRefuse; finish the layout, suggest /deep-research then re-run
Output path existsAsk before overwrite; offer a -v2 slug
Source has zero structure (wall of text)Derive sections from paragraph topics; mark [structure added by layout] in the footer

What this skill never does

  • Research, fact-fill, or "improve" claims
  • Decorative charts with invented data
  • Multi-file output, external assets, JS frameworks
  • Summary theater in the delivery message

What ships with it: 13 files

74.8 KB alongside SKILL.md, 2 of them executable

scripts/

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.