ux-writing
Skill file product-team/ux-writing/SKILL.md in borghei/Claude-Skills. Read the publisher’s upstream source.
Description could not be read from the source metadata.
Try your first task
A source-grounded starter task has not been verified for this skill yet.
SKILL.md
name: ux-writingdescription: > Audits interface microcopy in HTML, JSX/TSX, Vue or strings files: vague labels, blaming errors, empty states, glossary terms, case, translation overflow. Use when reviewing UI copy or building a voice sheet.license: MIT + Commons Clausemetadata: version: 1.0.0 author: borghei category: product-team domain: ux-writing updated: 2026-12-03 tags: [ux-writing, microcopy, error-messages, localization, content-design, terminology, accessibility]UX Writing
What you get
Point the audit at your UI files and get every weak string quoted with file:line, the rule it broke, and a rewrite you can paste.
Before (assets/flawed_strings.json, excerpt):
"errors": {
"save_failed": "Something went wrong",
"email_invalid": "You entered an invalid email address"
},
"confirm_delete": { "message": "Delete this client? This cannot be undone.", "ok": "OK" }
After python3 scripts/copy_audit.py assets/flawed_strings.json --glossary assets/sample_glossary.json (exit 1, excerpt):
FIX 15 issues
Read assets/flawed_strings.json: files: 1, strings: 14, formats: json
Findings:
1. [destructive-generic-label] assets/flawed_strings.json:20: "OK"
rule: a button that destroys data names the action and the object, not OK/Yes/Confirm (internal heuristic)
fix: Rename "OK" to "Delete client" so the button says what will be lost.
2. [error-no-next-step] assets/flawed_strings.json:9: "Something went wrong"
rule: an error message says what happened and what to do next (WCAG 2.2 SC 3.3.3 Error Suggestion)
fix: Add a next step: "We couldn't finish that. Try again, or contact support if it keeps happening."
3. [error-blames-user] assets/flawed_strings.json:10: "You entered an invalid email address"
rule: error text "You entered" accuses the user of an action; say what the system could not do (internal heuristic)
fix: Rewrite without blame and with a next step: "Enter an email address in the format name@example.com."
The run ends with a paste-ready rewrite table (where, before, after), at most three next actions, and the verdict. The same tool on assets/sample_strings.json prints PASS, exit 0.
When to Use
- A screen, flow or locale file is about to ship and nobody has read the copy as a whole
- Errors say "Something went wrong" or "Invalid input", and support tickets prove it
- Product, docs and marketing call the same thing three different names
- Strings are about to go to translation and buttons may not survive German or Finnish
- A team needs a one-page terminology and voice sheet it will actually enforce
Clarify First
Before judging copy, settle the inputs below. When one is missing or vague and would change the result, ask about it; when it wouldn't, use a sensible default and say which one you used.
- Where the strings live: the HTML/JSX/Vue files, or the strings file (JSON/YAML). Audit the strings file when the markup only holds
{t('key')}calls. - Glossary: do preferred terms and banned variants exist? If not, draft five terms first (Workflow 2).
- Case: sentence or title case for buttons and headings. The tool infers the majority; a glossary
_voice.casingoverrides it. - Target languages and slot sizes: which locales, and how wide the tightest button is (sets
--budget).
Ask about the two or three inputs that matter most for this request, not the whole list. If the user wants a result straight away, produce it and state your assumptions at the top.
Quick Start
python3 scripts/copy_audit.py assets/flawed_checkout.html --glossary assets/sample_glossary.json
python3 scripts/copy_audit.py assets/sample_strings.json assets/sample_checkout.html # several files at once
python3 scripts/copy_audit.py assets/sample_strings.yml --budget button=24 --expansion-factor 1.5 --format json
python3 scripts/voice_sheet.py assets/sample_glossary.json --output voice-sheet.md
Every command reads your file, says what it read and what it could not, prints findings that quote your
string, name the rule and give a rewrite, then a verdict (PASS or FIX n issues). Add --format json
for the same report as JSON. Exit codes: 0 clean, 1 findings, 2 unusable input (one BLOCKED: line
on stderr, never a traceback). Samples, flawed and malformed inputs live in assets/; assets/contract.json
lists the expected exit code of each run.
Core Workflows
Workflow 1: Audit a screen set before release [RECOMMENDED]
-
Collect the UI source files and the locale file that feeds them. Do not paste copy into chat; point the tool at the files.
-
Run the audit with your glossary, and
--budgetfor the tightest slots you know of.python3 scripts/copy_audit.py src/Checkout.tsx locales/en.json --glossary glossary.json --budget button=24 -
Fix in impact order: destructive buttons, blaming errors, errors with no next step, placeholder-as-label, empty states, then terms, case, punctuation and overflow.
-
Rerun until it prints
PASS. Read the rewrite table, but do not apply it blindly: rewrites are proposals built from your own words and a few fixed patterns.
Validation checkpoint: exit 0, and every remaining dynamic string (not read list) was audited in its strings file.
Workflow 2: Build a terminology and voice sheet [RECOMMENDED]
-
List the five to ten terms the team argues about, with the variants to retire. Start from
assets/sample_glossary.json. -
Add a
_voiceobject: tone, person, casing, two or three principles, do and don't lists. -
Generate and check the sheet:
python3 scripts/voice_sheet.py glossary.json --output docs/voice-sheet.md -
Fix contradictions it reports (a banned variant that is also a preferred term, one variant under two terms, a duplicate term). Then pass the same file to
copy_audit.py --glossary.
Workflow 3: Pre-translation overflow check [RECOMMENDED]
- Measure your tightest button, link and label slots in characters and set
--budget kind=N. - Run with the default expansion table, then with your translation memory's measured ratio as
--expansion-factor. - Shorten what the tool flags, or let those slots wrap. Check the table in
references/ux-writing-limits.jsonagainst current localization guidance first; its figures are planning ratios.
What the audit checks
| Rule | Flags | Source |
|---|---|---|
vague-label | Submit, Click here, Go, Learn more as button or link text | WCAG 2.2 SC 2.4.4 for links; internal heuristic for buttons |
destructive-generic-label | OK / Yes / Confirm on a delete or discard dialog | internal heuristic |
error-blames-user | "You entered...", "You must...", "wrong", "illegal" | internal heuristic |
error-no-next-step | An error (or its container) with no action and no button | WCAG 2.2 SC 3.3.3 |
empty-state-no-action | "No invoices yet" with no button or link | internal heuristic |
term-inconsistent | A banned variant from your glossary | your glossary |
case-inconsistent, punctuation-inconsistent | Mixed sentence/title case; final periods on labels; mixed periods in messages | internal heuristic |
overflow-risk | A string likely to outgrow its slot after translation | planning ratios in references/ |
placeholder-as-label | An input whose only label is its placeholder | WCAG 2.2 SC 3.3.2 |
Details, input formats and the rewrite patterns are in references/ux-writing-rules.md.
Anti-Patterns
Fixing copy the tool never read
Mistake: Auditing Checkout.tsx and calling it done when every visible string is a {t('checkout.pay')} call.
Why it happens: The audit passes, because dynamic strings are invisible to a static reader.
Instead: Read the "not read" list in the output, then run the audit on the locale file itself.
Accepting rewrites without the product's voice
Mistake: Pasting every proposed rewrite straight into the strings file. Why it happens: The rewrite table is paste-ready, so it feels approved. Instead: Treat rewrites as a first draft. Check proper nouns, legal wording and anything the product cannot actually do ("contact support" is only true if support exists).
A glossary that contradicts itself
Mistake: Banning "log in" under "sign in" while a third term lists "sign in" as a variant, so every fix flips the next audit.
Why it happens: Glossaries grow by addition and nobody reads the whole file.
Instead: Run voice_sheet.py after every glossary edit; it exits 1 on contradictions.
Treating the overflow number as a measurement
Mistake: Failing a build because a button is "~33 chars after translation" when it is 33 against a guessed slot.
Why it happens: The ratios look precise and the default budgets are guesses.
Instead: Set --budget from real component widths and replace the ratio with your translation memory's. Only a pseudo-locale or a real translation settles it.
Blame-free but useless errors
Mistake: "Something went wrong. Please try again." on every failure, including the ones retrying cannot fix. Why it happens: One generic string is cheap, and it passes a blame check. Instead: Say what failed and the one action that can fix it, per error class; keep the generic string only for the unknown case.
Scope & Limitations
In scope: static English UI strings in HTML, JSX/TSX/JS, Vue templates, JSON and a YAML subset; a glossary of terms; a terminology and voice sheet; a length-budget check for translation.
Out of scope: dynamic strings ({t('key')}, bound attributes) until you audit the strings file; translation quality; tone judgement beyond the patterns above; legal copy; marketing copy (see marketing/ skills); visual design; screen-reader testing; non-English source text (the rules are English patterns). The YAML reader understands the subset listed above, not anchors, flow style or multi-document files.
Data constraints: the vague-label, blame, case and punctuation rules are internal heuristics. Expansion ratios and slot budgets are planning figures in references/ux-writing-limits.json: check them against current localization guidance and your own measurements.
Files
scripts/copy_audit.py- the audit (markup and strings files in, findings and rewrite table out)scripts/voice_sheet.py- terminology and voice sheet from a glossary, with a contradiction checkscripts/uxw_*.py- shared helpers (CLI plumbing, extractors, rules); not commandsreferences/ux-writing-rules.md- rule catalogue, input formats, rewrite patterns, sourcesreferences/ux-writing-limits.json- expansion ratios and slot budgets, with sources and a note to verifyassets/-sample_*(exit 0),flawed_*(exit 1) andmalformed_*(exit 2) inputs,contract.json