pretext

Create single-file browser demos for measured text layout without DOM reflow.

1|Updated May 18, 2026
One-click install
npx skills add https://github.com/rickyananda/hermes-skills --skill pretext-rickyananda
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pretext
Source: https://github.com/rickyananda/hermes-skills/tree/main/creative/pretext
Command: npx skills add https://github.com/rickyananda/hermes-skills --skill pretext-rickyananda

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill turns measured text layout into interactive browser art, letting you build compositions that flow around objects, animate by glyph, and stay precise without DOM reflow or layout guessing.

Core Features & Use Cases

  • Obstacle-Aware Text Flow: Lay out prose around moving shapes, sprites, and custom geometry row by row.
  • Text-as-Geometry Demos: Build games, ASCII constructions, and kinetic typography where words become the visual structure.
  • Single-File Creative Output: Produce polished standalone HTML demos with intentional palettes, motion, and real source text instead of placeholder copy.

Quick Start

Create a single-file browser demo that uses pretext to make a dark, animated paragraph flow around a draggable orb.

Frequently Asked Questions about pretext

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create kinetic typography that flows around moving obstacles without DOM reflow?

You can build obstacle-aware text flow by measuring text and rendering it via canvas without triggering DOM reflow. This Skill generates single-file browser demos that lay out prose row by row around moving shapes using variable-width line layout.

Can I generate ASCII art from real prose using a browser canvas?

Yes, ASCII art from real prose is generated by treating text as geometry within a single-file browser demo. The process uses grapheme-aware segmentation and canvas rendering to construct visual structures from actual source text instead of placeholder characters.

Do I need any external libraries to build text-as-geometry browser demos?

Yes, building text-as-geometry demos requires the pinned @chenglou/pretext library accessed via esm.sh. The Skill incorporates this dependency into single-file HTML output to handle grapheme-aware segmentation and variable-width line layout.

What is the best way to prototype shrink-wrap text layouts for interactive games?

The best way to prototype shrink-wrap layouts for interactive games is using canvas rendering with precise text measurement. This avoids layout guessing by calculating variable-width line layouts independently of the DOM, allowing words to act as visual geometry.

Does this text layout approach handle grapheme-aware segmentation for complex scripts?

Yes, grapheme-aware segmentation is explicitly required for this text layout approach. It ensures accurate measurement and rendering of complex scripts within the canvas-based single-file browser demos, maintaining precision across different character sets.

When should I avoid canvas-based text rendering for kinetic typography?

You should avoid canvas-based text rendering when you need native DOM accessibility, standard text selection, or SEO indexing for your kinetic typography. This approach focuses on visual compositions and standalone demos where layout precision matters more than semantic HTML structure.