← all skills

ww-smart-quote-fixer

The problem: Every AI model defaults to straight typewriter quotes, ' and ", and real typography doesn’t use them. An editor spots a straight quote in a paragraph of running prose in about half a second, and it reads as unpolished, or machine-written, even when nothing else about the copy is wrong. Fixing it by hand means catching every apostrophe, every nested quote, every decade abbreviation, and every foot-and-inch mark without breaking the ones that were already right, or the ones sitting inside a code block where a straight quote is correct.

This does the conversion deterministically instead of a naive find-and-replace that gets the hard cases wrong: the decade gotcha ('90s is a right curly quote, not a left one, even at the start of the token), nested quotes (outer double, inner single), measurements (6′2″, not 6'2"), all while leaving fenced code blocks, inline code, file paths, and regex untouched. Short text gets fixed inline by reading it carefully; anything longer runs through a bundled script that handles plain text, markdown, and .docx (preserving bold, italic, and links) alike.

Commands


python scripts/fix_quotes.py input.md > output.md
python scripts/fix_quotes.py input.docx -o output.docx

--no-primes converts measurement quotes to straight marks instead of primes; --apostrophes-only is safe mode, apostrophes only, leaves double quotes alone.

Key principles


Part of Operator Skills, a collection of skills for running a real Claude Code setup.