better-typography
Skill này làm gì
Skill hướng dẫn AI chọn phông chữ, thang cỡ chữ, khoảng cách, xuống dòng và cắt bớt văn bản trên web. Dành cho nhà thiết kế và lập trình viên quan tâm đến cách chữ hiển thị.
Khi nào nên dùng
- ✓Khi bạn chọn hoặc ghép phông chữ cho một trang web hoặc ứng dụng.
- ✓Khi tiêu đề, nội dung hoặc nhãn trông chật, quá rộng hoặc xuống dòng sai.
- ✓Khi bạn cần cắt bớt văn bản dài hoặc tạo kiểu cho gạch chân và phần chữ được chọn.
Liên kết skill
https://github.com/trycompai/crm/blob/release/.agents/skills/better-typography/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Chữ trên trang đích này khó đọc trên điện thoại. Bạn có thể sửa cỡ chữ và khoảng cách không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
AI kiểm tra thứ bậc và thang kiểu chữ, đặt độ dài dòng và khoảng cách, rồi kiểm tra cách xuống dòng với nội dung thật ở nhiều chiều rộng.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Great typography
Good typography is mostly restraint. A sensible scale, comfortable spacing and enough contrast beat any clever effect. A label, a table cell, a marketing headline and an article paragraph should not share one set of rules. Apply these principles when building or reviewing anything with text in it.
When reviewing, read the page instead of scanning the code: squint to check the hierarchy holds, read one full paragraph for comfort, and resize the viewport to catch bad wrapping, widows and truncation at real content lengths.
The words themselves (button labels, error messages, empty states) are covered by the better-writing skill; semantic heading structure by better-accessibility; spatial RTL layout and logical CSS properties by better-layout; rendered-pair contrast measurement and color remediation by better-colors. This skill owns how text renders, wraps, and behaves in mixed-direction content.
Match the project's styling system. Before suggesting or writing any fix, check how the codebase styles things and express every change in that system: Tailwind utilities in a Tailwind project, plain declarations in CSS, CSS Modules, styled-components or StyleX. The cheat sheet maps each declaration to its Tailwind equivalent. Never introduce a second styling approach just to apply a typography fix.
Quick Reference
| Category | When to use | Reference |
|---|---|---|
| Choosing fonts | Font categories, pairing, formats, typeface anatomy | choosing-fonts.md |
| Variable fonts & OpenType | Axes, weights, tabular numbers, stylistic sets | variable-fonts-and-opentype.md |
| Spacing & sizing | Type scale, heading hierarchy, line-height, letter-spacing, text trimming | spacing-and-sizing.md |
| Wrapping & punctuation | Measure, wrapping, truncation, smart punctuation, RTL | wrapping-and-punctuation.md |
| Details & accessibility | Underlines, selection, forms, decorative text, contrast | details-and-accessibility.md |
| CSS cheat sheet | Quick lookup of every property covered, with Tailwind equivalents | css-cheat-sheet.md |
Core Principles
1. Serve the Right Format
Use .woff2 (Brotli compression, broadly supported) on the web. .woff is a fallback only for very old browsers; .ttf and .otf are raw desktop formats with no web compression. How the files are loaded is the project's own concern, this skill does not prescribe it.
2. Properties Over Raw Tags
When a CSS property exists, use it. font-weight: 650 instead of font-variation-settings: "wght" 650, font-optical-sizing: auto instead of "opsz", font-variant-numeric: tabular-nums instead of font-feature-settings: "tnum" 1. Properties keep working when a non-variable fallback renders. Reserve the raw-tag properties for custom axes ("GRAD" 80) and niche features ("ss01" 1) that have no property of their own.
3. Load Intended Weights and Styles
Browsers may synthesize a requested weight or style that the active family does not provide. Prefer loading the faces the design actually uses. Set font-synthesis: none only after verifying that every required bold, italic, small-cap, superscript, and subscript form remains visually distinct across the complete fallback stack; disabling synthesis is not a diagnostic and must not erase emphasis.
4. Fewer Fonts, Sizes and Weights
Rarely use more than three fonts. Weight and size define hierarchy, but overusing them hurts readability quickly. Pair for contrast, not similarity: a serif headline with a sans body reads as deliberate, two near-identical sans-serifs read as a mistake. Below 18px, stay at weight 400+; weights under 300 are display-only (28px+), they disappear at text sizes.
5. Use a Type Scale with Semantic Names
Define a small set of sizes and deviate from it as little as possible. Hard-coded sizes without a system break down at scale. For solo projects, default names like text-sm work fine as long as the usage rules are clear. On a team, name sizes by use (text-body-sm), not by size, so the rules stay consistent.
6. Heading Sizes Descend with Level
Within a coherent page hierarchy, map heading levels to descending steps of the type scale: a visually subordinate heading should not accidentally overpower its parent. Adjacent levels ma
Câu hỏi thường gặp
Skill có viết nội dung trên trang không?
Không. Nội dung và nhãn nút thuộc về skill better-writing.
Skill có sửa độ tương phản màu không?
Không. Việc đó thuộc về skill better-colors.
Skill có thêm cách tạo kiểu mới không?
Không. Skill áp dụng mọi sửa đổi qua cách tạo kiểu sẵn có của dự án.
Chi tiết
Mô tả gốc của tác giả
Web typography from choosing fonts to spacing, wrapping and accessibility. Use when picking or pairing typefaces, configuring variable fonts or OpenType features, setting up a type scale, checking heading hierarchy, styling text in components, truncating text, styling underlines, selection, placeholders or carets, or reviewing frontend code for typography. Triggers on typography, fonts, font formats, woff2, variable fonts, font-weight, opentype, font-feature-settings, letter-spacing, line-height, type scale, heading hierarchy, heading levels, tabular numbers, text-wrap, truncation, line clamp,
repo: trycompai/crm
Độ phổ biến
- Sao GitHub
- 12k
- Vị trí xếp hạng
- #11513
- Giấy phép
- MIT
- Cập nhật
- 1/11/2026
Bình luận
- …
Thêm skill từ kho mã này
ai-elements
12kGiúp agent của bạn xây dựng giao diện chat AI với các thành phần có sẵn cho hội thoại, tin nhắn, hiển thị công cụ và ô nhập prompt.
ai-sdk
12kGiúp agent của bạn xây dựng tính năng AI với Vercel AI SDK, gồm tạo văn bản, truyền phát, gọi công cụ và agent.
better-accessibility
12kGiúp agent của bạn làm giao diện dùng được bằng bàn phím và trình đọc màn hình, bao gồm focus, nhãn, ARIA và biểu mẫu.
better-auth-best-practices
12kGiúp agent của bạn thiết lập Better Auth cho đăng nhập, phiên làm việc, OAuth và plugin trong ứng dụng TypeScript, theo các bước tài liệu.
Skill tương tự
canvas
394kCho phép agent của bạn hiện một widget trực quan được lưu trữ trên bảng Mac đã kết nối, rồi ẩn bảng hoặc chuyển nó sang trang khác.
control-ui
394kGiúp agent của bạn sắp xếp và khắc phục sự cố Control UI của OpenClaw, gồm các phiên, bảng điều khiển và Gateway đã kết nối.
diagram-maker
394kGiúp agent của bạn vẽ sơ đồ rõ ràng dạng SVG, HTML hoặc Excalidraw có thể sửa, cho quy trình, kiến trúc hệ thống và bản phác bảng trắng.