
typography-system
Build or repair a typography system: a modular type scale, font choices and loading, hierarchy, line-height/line-length, and fluid sizing — delivered as tokens (Tailwind fontSize config or CSS variables) applied to real components. Use when the user says 'the text looks off', 'fonts are inconsistent', 'headings don't stand out', 'pick fonts for me', 'it's hard to read', 'too many font sizes', or when an audit finds font-size sprawl. Chooses the scale ratio from product density (dense app vs marketing vs editorial), verifies contrast and measure, and produces the type tokens plus a migration map from existing rogue sizes.
- Installs
- 258
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/sanky369/vibe-building-skills --skill typography-system- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads typography-system automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Typography System
Produce a working type scale for this codebase — tokens wired into the existing styling system and applied to real headings/body/UI text — not an essay about type. Governing principle: sizes come from a modular scale chosen for the product's density; readability constraints (line-height, measure, contrast) are non-negotiable and override aesthetics.
When to use / handoffs
- Use for type scales, font selection/loading, heading hierarchy, readability fixes, fluid type.
- No token infrastructure at all yet → run
skills/frontend-design/design-foundationfirst (or create the type tokens as its first slice). - Text colors failing contrast is shared ground with
skills/frontend-design/color-system— fix the pairs you touch here; send palette-wide work there. - Headings sized right but the page still scans poorly →
skills/frontend-design/visual-hierarchy-refactoring.
Step 1 — Inspect the codebase
- Count font sizes. Grep for
font-size:\s*[\d.]+(px|rem), Tailwindtext-(xs|sm|base|lg|xl|\dxl)and arbitrarytext-\[. Distinct count >8–10 = sprawl; record the list with frequencies. - Find the fonts. Grep for
font-family|@font-face|fonts.googleapis|next/fontand checktailwind.config.*/@themeforfontFamily. Count families and loaded weights. - Check line-height and measure. Grep
line-height|leading-andmax-width.*ch|max-w-prose. - Check existing tokens. If
design-foundationran, extend its file; never start a parallel system. - Classify the product's density from the screens themselves: data tables/dashboards/many controls = dense; landing/marketing = spacious; long-form reading = editorial.
Step 2 — Intake
Ask in one batch, only what's missing: brand feel in a few words (or "pick for me"), and keep current fonts or open to change? Infer density from the code, base size 16px unless dense-data (then 14px body is acceptable). Don't stall — with visible screens, state assumptions and build.
Step 3 — Build the scale
Choose the ratio by product density (the core decision rule):
| Product | Ratio | Why |
|---|---|---|
| Dense data app, dashboards, admin | 1.125–1.2 (major second) | Many levels must fit without giant headings |
| Standard product UI / SaaS | 1.25 (major third) | Balanced; the default when unsure |
| Marketing site, landing pages | 1.25–1.333 | Headlines need presence |
| Editorial / brand-heavy, big heroes | 1.414–1.618 | Few levels, dramatic jumps |
Generate from base × ratio^n, then snap to sensible pixels (a 1.25 scale from 16px → 16, 20, 25, 31, 39, 49, 61; round as needed). Add xs(12) and sm(14) below base for captions/labels. Cap the scale at the largest size actually used — don't ship a 76px display token to a settings app.
Pair line-height inversely with size: body 1.5–1.7, subheads 1.3, large headings 1.1–1.2, captions/labels 1.4. Ship line-height inside the size token (Tailwind fontSize tuples do this natively).
Fluid headings: for sizes ≥ ~31px, use clamp(min, preferred vw formula, max) instead of per-breakpoint overrides. Body text stays fixed (16px) — never fluid below the base.
Fonts: limit to ≤2 families, 3–4 weights (400/500/600/700 subset). If choosing: pick a workhorse UI sans (variable font if available) for body, optionally one display font for headings that matches the stated feel. Load via the framework's optimizer (next/font etc.) or preload + font-display: swap. Pairing table and font-feature details: references/type-details.md.
Canonical shape (Tailwind v3; adapt to detected stack)
fontSize: {
xs: ['0.75rem', { lineHeight: '1.4' }], // 12 — captions, labels
sm: ['0.875rem', { lineHeight: '1.5' }], // 14 — secondary UI text
base: ['1rem', { lineHeight: '1.6' }], // 16 — body
lg: ['1.125rem', { lineHeight: '1.6' }], // 18 — lead paragraphs
xl: ['1.25rem', { lineHeight: '1.3', fontWeight: '600' }], // 20 — h4/h5
'2xl': ['1.5625rem', { lineHeight: '1.3', fontWeight: '600' }], // 25 — h3
'3xl': ['clamp(1.6rem, 1.2rem + 1.6vw, 1.9375rem)', { lineHeight: '1.2', fontWeight: '700' }], // h2
'4xl': ['clamp(1.9rem, 1.3rem + 2.4vw, 2.4375rem)', { lineHeight: '1.1', fontWeight: '700' }], // h1
}
Step 4 — Apply and migrate
- Write the tokens into the project's system (Tailwind config /
@theme/ CSS variables). - Apply to the base elements or shared components (headings,
p, labels, buttons) — not one-off classes per page. - Constrain prose:
max-width: 65chon long-form containers. - Migrate the top rogue sizes from Step 1 in 1–3 high-traffic files; map the rest.
Required output format
Deliver code plus this summary:
## Type tokens
[file path + full code in the project's system]
## Scale decision
- Density: [dense/standard/marketing/editorial] — evidence: [what you saw]
- Ratio: [x] · Base: [16px] · Levels: [list, snapped px values]
- Fonts: [family/weights] — [kept existing / chosen because …] · Loading: [mechanism]
## Migration map
| Found | Count | Replace with |
| text-[15px], 15px | 12 | text-sm (14px) |
| ... |
## Applied now
[components/files actually restyled]
## Verify
[Contrast pairs checked with ratios; measure per breakpoint]
Quality bar (check before delivering)
- ≤8–10 total sizes, all on the scale; every migrated value maps to exactly one token
- Body ≥16px (≥14px only in dense data UI, and never for long-form)
- Line-height: body 1.5–1.7, headings 1.1–1.3, nothing below 1.1
- Measure 45–75ch for body text at every breakpoint
- Text/background contrast ≥4.5:1 normal, ≥3:1 large (≥24px, or ≥18.7px bold) — state the ratios you computed
- ≤2 font families, ≤4 weights actually loaded;
font-display: swapor framework equivalent - Heading levels distinguishable at a glance (adjacent levels differ by ratio step AND/OR weight)
- Fluid
clamp()on large headings only; body size fixed - Letter-spacing: slightly negative on ≥39px headings (−0.01 to −0.02em), slightly positive on all-caps labels (+0.05em)
Integration
- Consumes: tokens file from
skills/frontend-design/design-foundation(extends its typography slice); layout containers fromskills/frontend-design/layout-system(measure lives there). - Produces: type tokens consumed by
skills/frontend-design/visual-hierarchy-refactoring(size/weight hierarchy) andskills/frontend-design/component-architecture(component text styles). - Contrast pairs feed
skills/frontend-design/color-systemand are audited byskills/frontend-design/accessibility-excellence.
References
references/type-details.md— font pairing table by personality, variable fonts, OpenType features (tabular numbers, small caps), full article/UI typography patterns, and the complete ratio → scale tables. Read when choosing fonts or styling long-form content.
FAQ
What does the typography-system skill do?
Build or repair a typography system: a modular type scale, font choices and loading, hierarchy, line-height/line-length, and fluid sizing — delivered as tokens (Tailwind fontSize config or CSS variables) applied to real components. Use when the user says 'the text looks off', 'fonts are inconsistent', 'headings don't stand out', 'pick fonts for me', 'it's hard to read', 'too many font sizes', or when an audit finds font-size sprawl. Chooses the scale ratio from product density (dense app vs marketing vs editorial), verifies contrast and measure, and produces the type tokens plus a migration map from existing rogue sizes.
How do I install typography-system?
Run npx skills add https://github.com/sanky369/vibe-building-skills --skill typography-system in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/typography-system/ (personal) or .claude/skills/typography-system/ (project).
Which AI agents can use typography-system?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is typography-system safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains typography-system?
It is published by sanky369 in sanky369/vibe-building-skills. It has 258 recorded installs.
More from sanky369/vibe-building-skills
social-graphics
sanky369/vibe-building-skills
Produce platform-correct social media graphics: pick the right dimensions and layout per platform, write the headline/body/CTA copy, build the generation prompt, and generate the image via the repo's FAL.ai pipeline. Use whenever the user wants a social post visual, Instagram post/story/carousel, LinkedIn graphic, Twitter/X image, TikTok thumbnail, Pinterest pin, launch announcement graphic, or 'something to post about X' — even if they never name a platform. Also use to adapt one design across several platforms. Produces a Social Graphic Spec per asset (platform, dimensions, layout, copy, full generation prompt) plus generated images when FALAPIKEY is available.
direct-response-copy
sanky369/vibe-building-skills
Open the skill to read its SKILL.md instructions.
tweet-writer
sanky369/vibe-building-skills
Open the skill to read its SKILL.md instructions.
remotion-script-writer
sanky369/vibe-building-skills
Write a complete, render-ready Remotion video script as structured JSON: analyze the user's codebase or product, break the video into timed scenes, specify every visual element, animation, transition, and voiceover line, and list required assets and Remotion packages. Use whenever the user wants a Remotion video, a programmatic/code-rendered video, a product demo video of their app, an animated coding tutorial, a data-visualization video, or short-form animated social content — trigger on 'make a video of my app', 'Remotion', 'animated demo', 'code walkthrough video', 'render a video from code'. Produces a Remotion Script JSON (videoMetadata, scenes[], requiredAssets, technicalRequirements) that Remotion agent tooling can implement directly.
product-video
sanky369/vibe-building-skills
Open the skill to read its SKILL.md instructions.
color-system
sanky369/vibe-building-skills
Open the skill to read its SKILL.md instructions.
Popular frontend & design skills
setup-matt-pocock-skills
mattpocock/skills
Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.
frontend-design
anthropics/skills
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.
hyperframes-animation
heygen-com/hyperframes
All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.
prototype
mattpocock/skills
Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.
hyperframes-core
heygen-com/hyperframes
The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.
vercel-react-best-practices
vercel-labs/agent-skills
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.