yaniv-golan

Pretext Skill — AI skill for Claude Code

AI community

AI skill for @chenglou/pretext — exact text metrics without DOM reflows.

How to install Pretext Skill

This entry records only its repository, not the path inside it, so there is no exact command to give. Open yaniv-golan/pretext-skill and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Pretext Skill does

AI skill for @chenglou/pretext — exact text metrics without DOM reflows.

Alternatives in AI

  • Xerj — Local-first search engine and MCP server for AI agents 12.5k ★
  • BrowserSkill — Let AI agents use your real, logged-in browser without interrupting your work 9.1k ★
  • Ccstatusline — by sirmalloc - A highly customizable status line formatter for Claude Code CLI that displays model info, git b 5.5k ★

README

Pretext Skill

Pretext Skill

[![Install in Claude Desktop](https://img.shields.io/badge/Install_in_Claude_Desktop-D97757?style=for-the-badge&logo=claude&logoColor=white)](https://yaniv-golan.github.io/pretext-skill/static/install-claude-desktop.html)

[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) [![Agent Skills Compatible](https://img.shields.io/badge/Agent_Skills-compatible-4A90D9)](https://agentskills.io) [![Claude Code Plugin](https://img.shields.io/badge/Claude_Code-plugin-F97316)](https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/plugins) [![Cursor Plugin](https://img.shields.io/badge/Cursor-plugin-00D886)](https://cursor.com/docs/plugins) [![Built with Skill Creator Plus](https://img.shields.io/badge/Built_with-Skill_Creator_Plus-4ecdc4?style=flat-square)](https://github.com/yaniv-golan/skill-creator-plus)

An AI agent skill that helps developers use **[@chenglou/pretext](https://github.com/chenglou/pretext)** — a small, tree-shakable TypeScript library that computes exact text metrics without DOM reflows.

Uses the open [Agent Skills](https://agentskills.io) standard. Works with Claude Desktop, Claude Cowork, Claude Code, Codex CLI, Cursor, Windsurf, Manus, ChatGPT, and any other compatible tool.

About @chenglou/pretext

[Pretext](https://github.com/chenglou/pretext) is a small, tree-shakable TypeScript library by Cheng Lou. It uses `CanvasRenderingContext2D.measureText` internally, segments text, measures once, caches, then does arithmetic for all subsequent layouts. Each `layout()` call is ~0.0002ms — safe to call every animation frame.

**Key capabilities:**

  • Know text dimensions before rendering (virtual scrolling, masonry layouts)
  • Auto-fit text to a container (find largest font that fits N lines)
  • Flow text around obstacles (magazine-style layouts)
  • Render rich inline text — mentions, chips, cod