用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill type-craft命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
| Use when this capability is needed.
> Use when this capability is needed.
Review architecture and API design for the vfs-s3 project. Use when the user mentions @architect, asks to review an issue's design, discuss module boundaries, API shape, or architectural decisions for vfs-s3. Also trigger when the user wants to create an ADR (Architecture Decision Record) or evaluate a technical approach for the project. Intended for dispatch from Codex automation or Claude routines; GitHub trigger phrase: @vfs-s3-bot please prepare design doc Use when this capability is needed.
基于 SOC 职业分类
正在显示 SKILL.md
| name | type-craft |
| description | > Use when this capability is needed. |
A structured, human-in-the-loop workflow for building professional typography and layout systems for web projects. Every value traces back to mathematical relationships (modular scales, golden ratio, Fibonacci sequence) that produce visually harmonious results.
Before starting, load references/typography-guide.md -- a comprehensive design reference covering type scales, golden ratio layouts, typographic best practices, accessibility requirements, fluid typography, optical alignment, and a complete production-ready CSS system. Reference it throughout the workflow.
Discovery → Scale → Fonts → Spacing/Layout → Generate CSS → Accessibility → Deliver
| |
└──────────── Refine ──────────────────────────┘
Follow steps 1-7 in order. The user may loop back from step 5 to refine choices.
Ask the user about their project. Gather these essentials:
Keep discovery concise: 3-5 questions max in one message.
After discovery, identify the recommended type scale ratio range using the Ratios and when to use them table in typography-guide.md:
| Project Type | Recommended Ratio |
|---|---|
| Dense dashboards, data UIs | Minor Second (1.067) or Major Second (1.125) |
| Mobile apps, e-commerce | Major Second (1.125) or Minor Third (1.2) |
| Documentation, blogs | Minor Third (1.2) |
| General websites (default) | Major Third (1.25) |
| Editorial, mixed content | Perfect Fourth (1.333) |
| Landing pages, promotional | Augmented Fourth (1.414) |
| Banners, hero-heavy sites | Perfect Fifth (1.5) |
| Luxury brands, creative | Golden Ratio (1.618) |
Based on discovery, recommend a type scale ratio with reasoning. Present the computed sizes by running the generator:
scripts/generate_type_system.py --ratio major-third --json
Show the user the step-by-step scale (step, pixel size, rem value, typical use) and explain why the ratio fits their project. If the user wants fluid (responsive) type, add --fluid:
scripts/generate_type_system.py --ratio major-third --fluid --json
Expected output: A JSON object with the type scale array showing each step's name, size, and recommended use.
Let the user confirm or request a different ratio before proceeding.
Recommend font pairings based on the project personality identified in Step 1. Present 2-3 options from these categories.
System stacks (zero network cost, best performance):
-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, ...Inter, Roboto, 'Helvetica Neue', ...Google Font pairings (see the Font pairing section in typography-guide.md):
Superfamilies (designed as matching sets):
Available presets for the generator: system, inter, playfair-montserrat, montserrat-merriweather, poppins-lora, source-family, roboto-family, or custom with --heading-font and --body-font.
Choose a spacing system based on the project needs. Refer to the Layout Grids and Golden Ratio and Fibonacci sections in typography-guide.md.
Spacing systems:
| System | Character | Best For |
|---|---|---|
| 8px grid | Even, predictable steps | Most projects (default), Material Design |
| Fibonacci | Accelerating steps (tight small, expansive large) | Organic, editorial layouts |
| Golden ratio | Phi-based proportions | Luxury, high-end designs |
Layout patterns:
1.618fr 1fr (~61.8% / ~38.2%) for content + sidebar5fr 8fr (2-col), 2fr 3fr 5fr (3-col)Apply Gestalt proximity rules (from the Gestalt proximity section in typography-guide.md):
Run the generator with all chosen parameters:
scripts/generate_type_system.py --ratio major-third --fonts system --spacing 8px-grid --color-mode light --fluid
For custom fonts:
scripts/generate_type_system.py --ratio 1.25 --fonts custom --heading-font "'Playfair Display', serif" --body-font "Inter, sans-serif" --fluid
Expected output: A complete :root { ... } CSS block with custom properties for type scale, line heights, tracking, weights, measure, spacing tokens, layout proportions, and colors, followed by base styles for body, headings, prose, and the flow utility.
Present the output to the user. If they want adjustments, re-run with different parameters.
Review the generated system against WCAG requirements. Consult the Accessibility section in typography-guide.md.
Verify these minimums:
| Check | Requirement | How to Verify |
|---|---|---|
| Body font size | At least 16px (1rem) | Confirm --text-base is 1rem or larger |
| Body line height | At least 1.5 | Confirm --leading-normal is 1.5 |
| Text contrast (AA) | 4.5:1 for body, 3:1 for large text | Check generated color values |
| Line length | Max 75ch | Confirm --measure-wide is 80ch or less |
| Fluid type zoom | clamp() includes rem component | Confirm no pure-vw preferred values |
| Font weight | 400+ for body text | Confirm --weight-normal is 400 |
Flag any issues and suggest fixes. Common problems:
--text-muted to a lighter shade--fluid -- recommend switching to fluid--leading-loose (1.8)Present the final CSS system with integration guidance:
Where to put it -- Create a typography.css or add to the project's existing CSS custom properties file. For Tailwind projects, extend the theme config. For CSS-in-JS, convert to a theme object.
How to use the flow utility -- Explain the .flow > * + * pattern for automatic vertical rhythm.
Google Font loading (if applicable) -- Provide the <link> tag or @import for chosen fonts. Recommend font-display: swap and preconnect hints:
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
Responsive notes -- If fluid type is used, explain that the scale adjusts automatically between ~360px and ~1240px viewports. If static, suggest breakpoint overrides.
Offer to create the CSS file directly in the user's project directory.
User says: "Set up typography for my Next.js marketing site"
Actions:
--ratio perfect-fourth --fonts playfair-montserrat --fluid --color-mode lightstyles/typography.css in the projectResult: A complete fluid type system with serif headings, sans body, and golden-ratio content/sidebar split.
User says: "I need a type scale for our docs site, it's very text-heavy"
Actions:
--ratio minor-third --fonts system --fluid--measure-base: 65ch constraintResult: A tight, readable scale optimized for long-form technical content.
User says: "Help me with typography for a fintech dashboard, needs dark mode"
Actions:
--ratio major-second --fonts inter --spacing 8px-grid --color-mode dark--text-muted)Result: A compact dark-mode scale with subtle hierarchy suited to data-dense interfaces.
Cause: The clamp() preferred value uses pure vw units without a rem component, which also breaks browser zoom (WCAG 1.4.4 failure).
Solution: Always use the --fluid flag which generates rem + vw formulas. Never write clamp(1rem, 2vw, 2rem) -- use clamp(1rem, 0.95rem + 0.25vw, 1.125rem) instead.
Cause: Missing preconnect hints or no font-display strategy.
Solution: Add preconnect links in <head> before the font stylesheet. Use font-display: swap to show system fallback immediately while the web font loads. The generated system includes system font fallbacks in every stack for this reason.
Cause: Mixing multiple spacing systems (e.g., 8px grid in some places, arbitrary values in others).
Solution: Use only the generated --space-* tokens for all padding, margin, and gap values. The flow utility (.flow > * + *) handles vertical rhythm automatically. Never use hardcoded pixel values for spacing.
Cause: Equal spacing above and below headings violates Gestalt proximity.
Solution: Heading margin-top should be 2-3x margin-bottom. The generated flow utility handles this: h2 gets --space-xl above and --space-xs below. See the Gestalt proximity section in typography-guide.md.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.