All skills
aktsmm avatar

/single-html-forge

@8bcd12d
by yamapanaktsmm/agent-skills26 stars
4

Generate a single self-contained HTML file — a horizontal slide deck, a vertical-scroll explainer document, or a fixed-canvas summary image — with zero external runtime dependencies, then verify it mechanically. Use when the user asks for HTMLスライド, 単一HTMLスライド, single-file HTML presentation, ブラウザーで開く説明資料, HTML 説明資料, HTMLサマリ画像, or self-contained HTML, or wants to hand someone a deck or explainer that opens anywhere without PowerPoint. Also use to embed images into such a file or to re-check an existing one. Does not output PPTX.

Use this Skill: https://skilld.dev/gh/aktsmm/agent-skills/single-html-forge

This session only. Nothing lands on disk.

referencesarchetype-poster.md

≈746 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Archetype: poster

One fixed-pixel canvas, meant to leave as a PNG. Start from assets/skeletons/poster-skeleton.html.

Unlike the other two, the HTML is a means rather than the deliverable. What ships is usually the exported image.

Canvas size

Set through theme tokens:

:root {
  --shf-size-canvas-w: 1200px;
  --shf-size-canvas-h: 630px;
}
Purpose Size
Article header, OG card 1200px x 630px
Vertical social 1080px x 1350px
Square 1080px x 1080px
A4 landscape at 150dpi 1754px x 1240px

The canvas does not reflow. Content that does not fit overflows, and the verifier fails it — that is deliberate, because a silently clipped poster looks fine in HTML and wrong in the PNG.

Export

python scripts/export_html.py poster.html --png out.png --scale 2

--scale 2 renders at twice the canvas size. Any embedded bitmap therefore needs at least displayed width x scale real pixels, or it will look soft in the export while looking fine on screen. embed_assets.py records the true dimensions so this is checkable.

A floating PDF として保存 button sits outside #shf-root for recipients who open the HTML directly. Because fixed elements can still paint over an element screenshot, export_html.py hides the button immediately before PNG capture. Do not remove it from each artifact.

Composition

The skeleton is eyebrow, headline, lead, a row of points, then a footer. It works because it has one focal point.

Hold to roughly: one headline under 30 characters, a lead of one sentence, and three points. A poster read in two seconds cannot carry more, and the fixed canvas will not grow to accommodate it.

If a colour is doing the work of a label — a red card meaning "bad" — add a word too. The PNG may be viewed by someone who cannot separate those hues.

When the workspace has its own rules

If the poster is destined for a specific publishing target and the active workspace has instructions covering figure colour or style, those win over this skill's defaults. Check before picking a palette.

Common mistakes

  • Designing at the wrong canvas size and rescaling afterwards; type sizing stops being right.
  • Embedding a screenshot without checking its real resolution against the export scale.
  • Capturing #shf-root directly without hiding fixed export controls; they can overlap the PNG even when they sit outside the root in the DOM.
  • Treating the HTML as the deliverable when the recipient expects an image.
  • Hand-built SVG figure: <text> does not wrap, so use one <text> per line (about one font-size of width per CJK character). With eyebrow, h1 and footer the figure gets about 300px of height. Inset strokes 2px or more from the viewBox edge. Tier 2 passes even when text or a stroke touches a cell or the canvas edge, so view the exported PNG.

Source: SKILL.md on GitHub

No alerts22d3 checks · Risk SAFE
  • Gen Agent Trust Hub22d

    This skill provides a secure framework for generating self-contained HTML presentations and documents. It incorporates an extensive security and verification harness, including SHA-256 hash pinning for CSS and JavaScript, a strict HTML tag allowlist, and a custom lexical preflight to prevent parser-confusion attacks. The skill also includes mechanical checks (Tier 2 Playwright verification) to block network egress and ensure artifact integrity before publication.

  • Socket22d

    No alerts

  • Snyk22d

    Risk: LOW · No issues

Signed by skilld at 8bcd12d. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 2 days ago
argument-hint
作りたい内容と、deck / doc / poster のどれか
user-invocable
true
metadata
{
  "author": "yamapan (https://github.com/aktsmm)"
}

README badge

README badge for aktsmm/agent-skills/single-html-forge