Skip to content

TsukiNi22/ai-utils / skills/docs/better-html-style

better-html-style

Verified

Better HTML style (the claude-cluster docs look)

SKILL_DIR = directory of this file. A layer on html-style (../html-style: tokens, components, rules, responsive, check_style.py - load it first, everything it says stays true). This skill adds templates/site.css + templates/site.js (the search, the home, the site navigation) and templates/search.html (the search box of the top bar). The engine of a whole site is better-html-doc; explanation and protocol pages in that site: better-explain-doc, better-protocol-doc.

1. One page

python3 SKILL_DIR/scripts/new_page.py <body.html> -o <out.html> [--lang-switch] [--css extra.css] [--js extra.js] \
    [--actions more.html] [--no-search] --set PROJECT="Name" TITLE="Page title" FOOTER="..." [VERSION=1.2.0]

The same body as html-style (<aside class="sidebar" id="sidebar"> + <main> with <section id> cards). The search box of the top bar searches the sections of the page (h2 and h3 with an id) when there is no site index: a long page becomes searchable for free. A body without a sidebar (a home, a small tool) gets the whole column: new_page.py writes .layout.wide (and the menu button, with nothing to open, is hidden). Self-contained, offline, file://.

2. Components (on top of the html-style ones)

NeedMarkup
home hero<header class="hero"><div class="page-eyebrow">Name <span class="badge">v1.2</span></div><h1>…</h1><p class="lead">…</p><div class="sbox">…</div></header>, in a body without a sidebar
big search<div class="sbox"><svg>…</svg><input type="search" placeholder="Search… ( / )" data-ph-fr="Rechercher…"><ul class="results" hidden></ul></div>
section tiles<div class="grid"><a class="tile" href><svg>icon</svg><span class="count">3 pages</span><h2>…</h2><p>…</p></a></div> (h2: a tile is a section of the home, no level skipped under the h1)
two columns (stack under 860px)<div class="two">…</div>
changelog<ul class="cl"><li><b>1.2.0</b><span>what changed</span></li></ul>
row of links<div class="links"><a href>FAQ</a>…</div>
sidebar groups<div class="grp">Section</div><a href class="cur" aria-current="page">Page</a>, <hr> between contents and groups
page meta<div class="page-meta"><span>Updated 2026-10-24</span></div> (an <a class="edit" href="<real URL>">Edit this page</a> only when the user asks for it, never an empty link) in the header
collapsed block<details class="more"><summary>Every option</summary><div>…</div></details>
keys<kbd>Ctrl</kbd>+<kbd>K</kbd>
pill / kind<span class="pill">beta</span>, <span class="kind docs">docs</span> (docs, page, settings, config, tools, api, message, protocol, keys, explain; any other: grey)

3. Search (site.js)

  • Index: window.DOCS_INDEX = {entries: [{k, l, t, d, u, x}]} (search-index.js of a site: kind, language, title, description, url, text), else a server endpoint (<meta name="docs-search" content="/docs/search">, answers {results: [...]} for ?q=&lang=), else the sections of the page.
  • Ranking: every word of the query must match; prefix > start of a word > inside > one / two typos (a missing, doubled, wrong or swapped letter) > letters in order (sesend finds session_send); title > description > text. Accents kept.
  • Keys: / or Ctrl+K focus the search (the big one on the home); / is a one-character shortcut, so (RGAA 12.10) a checkbox in the footer turns it off (kept per site, its hint in the search box disappears), Ctrl+K stays; ↑ ↓ move, Enter opens, Esc closes; the query words are marked in the results; ?q=text opens with results.
  • Phone (≤ 480px, ≤ 640px when the bar also holds a level switch): the small search leaves the bar for a sticky row under it, on the home too (its big one is hidden there: one box, never two, never none). Between 481 and 1100px its results hold to the screen, not to the box. The bar stays on one line: the name gives way first, then the search (110px at least).
  • ?embed=1 hides the top bar and footer and keeps it on every link (docs shown in an app panel), the search row of a phone sticks at the very top, the level switch of an explanation page moves to the header of the page; postMessage({docsLang, docsTheme}) from the host switches language / theme.

4. Rules

Those of html-style (tokens only, both themes, contrast, self-contained, responsive on phone / tablet / TV / touch, print, reduced motion), plus: the search works without a server and without the index (never an empty box); whatever the content (a long title, a word of 100 characters, a long version, kind or key) it stays in its box, a wide table or code scrolls in a box of its own (.two included), and what a link reaches stays visible under the bar and the search row; every interactive element has a visible :focus-visible; results and tiles are 44px tall on touch screens; the UI words are translated by DOC_FR (site.js adds its own: Search, Home, Edit this page, Updated, Changelog...).

4b. Accessibility built in (RGAA 4.1, no script needed)

The page template and the generator write what the RGAA asks, so every page is compliant by construction: a skip link (a.skip-link to <main id="main">, 12.7), <th scope> on every header cell (5.7), tabindex="0" + role="region" + a name on every block that scrolls (pre, .table-wrap, 7.3), headings without a skipped level (9.1), lang on <html> (8.3), the one-character shortcut controllable (12.10), a visible :focus-visible everywhere. check_site.py of better-html-doc fails a site that breaks one of them.

5. Check

python3 ../html-style/scripts/check_style.py <page.html> and python3 ../html-style/scripts/check_render.py <page.html> --shots DIR (0 error, html-style §7: both themes, 1280 / 768 / 375 px), look at the screenshots, and type a query with a typo in the search (?q=word in the address opens the results): the right section comes first.

slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 197kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall