Skip to content
Back to skills

Ux Writing

ASecurity

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.

  • 1,271 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added December 4, 2026
ai-agentspythongobashvuetesting

Works with

  • cli

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned December 4, 2026

npx -y skills add borghei/Claude-Skills --skill ux-writing --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ux Writing?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ux Writing
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/borghei-ux-writing/badge)](https://www.skillsdirectory.com/skills/borghei-ux-writing)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: ux-writing
description: >
  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 Clause
metadata:
  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):

```json
"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.casing` overrides 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

```bash
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]

1. Collect the UI source files and the locale file that feeds them. Do not paste copy into chat; point the tool at the files.
2. Run the audit with your glossary, and `--budget` for the tightest slots you know of.

   ```bash
   python3 scripts/copy_audit.py src/Checkout.tsx locales/en.json --glossary glossary.json --budget button=24
   ```

3. Fix in impact order: destructive buttons, blaming errors, errors with no next step, placeholder-as-label, empty states, then terms, case, punctuation and overflow.
4. 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]

1. List the five to ten terms the team argues about, with the variants to retire. Start from `assets/sample_glossary.json`.
2. Add a `_voice` object: tone, person, casing, two or three principles, do and don't lists.
3. Generate and check the sheet:

   ```bash
   python3 scripts/voice_sheet.py glossary.json --output docs/voice-sheet.md
   ```

4. 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]

1. Measure your tightest button, link and label slots in characters and set `--budget kind=N`.
2. Run with the default expansion table, then with your translation memory's measured ratio as `--expansion-factor`.
3. Shorten what the tool flags, or let those slots wrap. Check the table in `references/ux-writing-limits.json` against 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](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 check
- `scripts/uxw_*.py` - shared helpers (CLI plumbing, extractors, rules); not commands
- `references/ux-writing-rules.md` - rule catalogue, input formats, rewrite patterns, sources
- `references/ux-writing-limits.json` - expansion ratios and slot budgets, with sources and a note to verify
- `assets/` - `sample_*` (exit 0), `flawed_*` (exit 1) and `malformed_*` (exit 2) inputs, `contract.json`

Files in this skill

  • README.md2.3 KB
  • SKILL.md10.7 KB
  • assets/contract.json4.6 KB
  • assets/flawed_Plans.vue386 B
  • assets/flawed_Settings.tsx642 B
  • assets/flawed_checkout.html908 B
  • assets/flawed_glossary.json420 B
  • assets/flawed_strings.json665 B
  • assets/flawed_strings.yml234 B
  • assets/malformed_Plans.vue23 B
  • assets/malformed_Settings.tsx26 B
  • assets/malformed_checkout.html49 B
  • assets/malformed_glossary.json3 B
  • assets/malformed_strings.json33 B
  • assets/sample_Plans.vue411 B
  • assets/sample_Settings.tsx713 B
  • assets/sample_checkout.html911 B
  • assets/sample_glossary.json1.5 KB
  • assets/sample_strings.json715 B
  • assets/sample_strings.yml315 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.