Pretext Plugin

•

Equips Claude Code with deep knowledge and tools for DOM-free multiline text measurement and layout using the Pretext library.

PretextPlugin is a specialized Claude Code plugin designed to bridge the knowledge gap for Pretext, a pure TypeScript library for DOM-free multiline text measurement and layout. As Pretext is a very new library, LLMs like Claude lack intrinsic knowledge about it. This plugin injects deep understanding through a comprehensive knowledge base, interactive skills, and powerful runtime tools, enabling Claude to assist developers with complex text layout challenges, debugging, and optimal usage of the Pretext library.

主要功能

01Context-aware skills for Pretext API usage, debugging, and internationalization
02Pretext-advisor agent for handling complex architectural layout questions
030 GitHub stars
04Toggleable 'accurate mode' for pixel-precise font metrics using a headless browser (Playwright)
0512-file curated knowledge base covering API, architecture, browser compatibility, and edge cases
06MCP server with 5 runtime tools for code execution, validation, and documentation lookup

使用案例

01Validating Pretext code for common anti-patterns and best practices
02Assisting with DOM-free multiline text measurement and layout implementation
03Debugging complex text rendering and layout issues across different browsers