mcpbeat Sign in

Typography Skill for Claude

This skill should be used when applying proper typography to prose text or files in Russian, English, German, or French — smart quotes per locale («ёлочки», “curly”, „Gänsefüßchen“, « guillemets »), correct dashes (тире, em/en dash, Gedankenstrich, tiret), non-breaking spaces, ranges, ellipsis, and French espaces insécables before ! ? ; :. Fully deterministic via a pinned typograf-based CLI; never apply these rules by hand. Triggers on "типографика", "typograf", "оттипографь", "smart quotes", "fix typography", "неразрывные пробелы".

3k tokens
context cost
the whole folder, loaded on every use
7
files
ships runnable scripts
0
copies elsewhere
how many repositories repackaged it
337
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/glebis/claude-skills --skill typography

What comes with it

9 108 bytes besides the instruction
assets/hang-punctuation.js
assets/optalign.css
scripts/.gitignore
scripts/package-lock.json
scripts/package.json
scripts/typo.js

The instruction itself

6 sections, as written by the author

Typography (deterministic, multi-locale)

Apply canonical typography via scripts/typo.js, a pinned-config wrapper around the typograf npm library plus deterministic post-rules for German and French gaps. Never rewrite quotes/dashes/spaces manually — always run the script so results are deterministic and idempotent.

Setup (first run only)

If scripts/node_modules is missing: cd <skill-dir>/scripts && npm install

Usage

# stdin → stdout; default locale chain ru,en-US
echo '"Привет" - мир' | node <skill-dir>/scripts/typo.js
# → «Привет» — мир

# Pick locale (first entry = primary): en-US, en-GB, de, fr, ru, uk, pl, …
node <skill-dir>/scripts/typo.js --locale=de file.md
node <skill-dir>/scripts/typo.js --locale=fr,en-US file.md

# Fix files in place / preview / CI check
node <skill-dir>/scripts/typo.js --in-place --locale=en-US file1.md file2.md
node <skill-dir>/scripts/typo.js --diff file.md
node <skill-dir>/scripts/typo.js --check src/**/*.md   # exit 1 + list if changes needed

# HTML entity output (&laquo; &nbsp; &mdash;) for HTML sources
node <skill-dir>/scripts/typo.js --html-entities file.html

# Conservative mode: quotes/dashes/spaces only (no date/money/number/symbol rewriting)
node <skill-dir>/scripts/typo.js --safe file.md

Per-locale behavior

  • ru — «ёлочки» (nested „лапки“), with nbsp before, 5-65–6, nbsp after short prepositions and №, ..., т.е.т. е.
  • en-US / en-GB — “curly quotes” with ‘nested’, spaced hyphen → em dash,
  • de — „Gänsefüßchen“, Gedankenstrich: spaced hyphen → (en dash, nbsp before)
  • fr — « guillemets » with narrow nbsp (U+202F) inside, tiret , espace fine insécable before ! ? ; : (URLs like https:// are left untouched)

Hanging punctuation (optional, configurable)

Three routes, in order of preference by constraint:

  • No markup changes allowed → copy assets/hang-punctuation.js into the site and load it. It uses native CSS hanging-punctuation where supported (Safari) and falls back to DOM-only span wrapping elsewhere; source files stay untouched. Configure targets via window.HANG_PUNCT = { selector: '...' } before the script. If the page rewrites copy at runtime (a language toggle, a client router), call window.HangPunct.refresh() afterwards — the script only hangs what was in the DOM at load, and re-running it is safe.
  • Markup changes acceptable, ru text → run typo.js --optalign (HTML input only); it wraps hanging marks in classed <span>s. Include assets/optalign.css in the page. Note: --optalign output is not idempotent-safe with --check on already-spanned files; keep source pristine and treat it as a build step.
  • Zero effort baseline → add hanging-punctuation: first allow-end; to prose containers (currently Safari-only, harmless elsewhere).

Workflow notes

  • Choose --locale from the text's language; for mixed content, process each language's files separately.
  • Run only on prose/markdown/HTML text, never on source code. For i18n string files (e.g. src/i18n/strings/*.ts), pipe only string contents or verify with a build after --in-place.
  • For repo-wide fixes: --check first, show the user the file list, then --in-place.
  • The tool is idempotent; if a second pass ever changes output, report it as a bug rather than hand-fixing.
  • To adjust rules, edit makeTypograf() / postProcess() in scripts/typo.js so behavior stays pinned across sessions.

Other skills for the same job

different authors, same section of the catalogue
Theme Factory
by anthropics
vendor ×16

Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.

36k tokens
Brand Guidelines
by anthropics
vendor ×13

Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.

3k tokens
Artifacts Builder
by JayZeeDesign
×8

Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.

11k tokens scripts
Web Artifacts Builder
by anthropics
vendor ×7

Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.

11k tokens scripts
Frontend Design
by Karanjot786
×6

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

1k tokens
Frontend Design
by anthropics
vendor ×4

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.

5k tokens
Expo Tailwind Setup
by openai
vendor ×4

Set up Tailwind CSS v4 in Expo with react-native-css and NativeWind v5 for universal styling

3k tokens
Use Dom
by openai
vendor ×3

Use Expo DOM components to run web code in a webview on native and as-is on web. Migrate web code to native incrementally.

3k tokens

How to use it

Copy the folder

Take glebis/typography from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.

Install what it needs

The instructions reference npm. Without those the skill loads but fails at the first command.