pretext

Create browser-based text layout demos with canvas rendering and grapheme segmentation.

Updated May 14, 2026
One-click install
npx skills add https://github.com/SethyPagna/Secretary-Jarvis --skill pretext-sethypagna
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pretext
Source: https://github.com/SethyPagna/Secretary-Jarvis/tree/main/src/capabilities/skills/creative/pretext
Command: npx skills add https://github.com/SethyPagna/Secretary-Jarvis --skill pretext-sethypagna

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Pretext solves the problem of creating precise, visually rich text layouts in the browser without relying on DOM reflow or guesswork. It is ideal when text must wrap around moving shapes, become part of the composition, or respond live to geometry.

Core Features & Use Cases

  • Variable-width text flow: Lay out paragraphs around circles, cubes, logos, and other moving obstacles with row-by-row width changes.
  • Text-as-geometry visuals: Turn measured lines and graphemes into collision-aware game elements, ASCII structures, or kinetic type.
  • Single-file browser demos: Build self-contained HTML experiences with canvas rendering, interactive motion, and intentional typography.
  • Use case: Create an editorial-style page where a paragraph parts around a draggable orb and then morphs into a more sculptural layout on interaction.

Quick Start

Use the pretext skill to build a single-file browser demo where text reflows around a moving obstacle and the composition feels polished on first load.

Frequently Asked Questions about pretext

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

FAQPage Schema
How do I make text flow around moving shapes in a canvas without DOM reflow?

Text flowing around moving obstacles requires row-by-row width recomputation using prepared text handles. You can achieve this by applying canvas rendering with grapheme segmentation to avoid DOM reflow during dynamic layout updates.

What is kinetic typography and how does canvas rendering handle grapheme segmentation?

Kinetic typography transforms measured graphemes into collision-aware visual elements. Canvas rendering handles grapheme segmentation to maintain precise text-as-geometry structures during interactive motion without relying on DOM reflow.

Can I build a single-file browser demo for interactive ASCII art using creative coding?

Yes, you can build self-contained single-file browser demos for interactive ASCII art. By applying canvas rendering and grapheme segmentation, text layout becomes collision-aware and responds live to geometry changes.

Does variable-width text layout work for shrink-wrap layouts around moving obstacles?

Variable-width text layout supports shrink-wrap layouts by applying prepared text handles to recompute row widths dynamically. This allows paragraphs to part around moving circles or logos while maintaining polished typography.

Why does my canvas text layout break when text wraps around moving geometry?

Canvas text layout breaks around moving geometry when relying on DOM reflow instead of pinned layout APIs. Applying grapheme segmentation and reusable prepared text handles ensures accurate live width-by-width recomputation.

What is the best way to create text-as-geometry games in the browser?

The best way to create text-as-geometry games is using canvas rendering with grapheme segmentation to turn measured lines into collision-aware elements. This avoids DOM reflow and supports interactive motion within a single-file browser demo.