ensure-english-consistency
Skill11 starsChanged 3 months agoApache-2.0View on GitHub
Ensure all text and code files in the repository follow a single region's English convention (US, CA, or UK). Usage: /ensure-english-consistency <US|us|CA|ca|UK|uk> [additional instructions]
In this repository6 other files it gives its agents.
- aws-syncSkill
- expand-writingSkill
- fix-precommitSkill
- generate-reportSkill
- inspect-dataSkill
- review-paperSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 7 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 6
Ensure that all natural-language text in the current repository uses a single region's English spelling convention.
- Distinctive: line 14
If the first token is missing or not one of the accepted values, stop and ask the user to re-invoke the skill with a valid argument.
- Distinctive: line 20
Filter by type: Keep files with natural-language content:
- Distinctive: line 79
When a word is not in the table, morphological patterns can still decide:
- Very specific: line 90
Import targets, package names, module paths: from colorama import ..., require('color'), <link rel="stylesheet" href="theme-color.css">.
- Very specific: line 109
After edits, print a one-line summary per changed file (e.g., README.md: 4 replacements) and a final total.
- Distinctive: line 113
Never change identifiers, import paths, URLs, or file paths — only prose.
- Distinctive: line 116
Do not reflow paragraphs, rewrap lines, or make any edits beyond the approved spelling substitutions.
- Distinctive: line 117
Do not commit anything.
- Very specific: line 118
If the repo contains a style config (e.g., .editorconfig, CONTRIBUTING.md, a STYLE.md, or a Vale / cspell config) that declares a different …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Ensure that all natural-language text in the current repository uses a single region's English spelling convention. The argument selects the target region. Everything after the first token is additional instructions (may be empty).
Parse the argument
- The first token must be one of
US,us,CA,ca,UK,uk. Normalize case-insensitively to one of three targets:US→ American English (e.g., color, behavior, analyze, center, organize)UK→ British English (e.g., colour, behaviour, analyse, centre, organise)CA→ Canadian English: British spellings for -our (colour, behaviour), -re (centre, metre), and doubled consonants (travelled, labelled); American-izeendings (organize, recognize); mixed for a few items (see "Canadian specifics" below).
- If the first token is missing or not one of the accepted values, stop and ask the user to re-invoke the skill with a valid argument.
- Remaining tokens are additional instructions to follow after the main scan.
Steps
- Collect candidate files. From the repository root (current working directory), list files tracked by git via
git ls-files. If the directory is not a git repo, fall back to a recursive walk that skips.git/,node_modules/,.venv/,venv/,dist/,build/,__pycache__/, and any path listed in.gitignore. - Filter by type. Keep files with natural-language content:
- Text / docs:
.md,.markdown,.txt,.rst,.tex,.bib,.typ,.org,.adoc - Code (only prose inside comments, docstrings, and user-facing string literals):
.py,.js,.ts,.tsx,.jsx,.go,.rs,.java,.c,.cpp,.h,.hpp,.rb,.sh,.zsh,.bash,.lua,.swift,.kt,.scala,.r,.jl,.php,.html,.css,.scss,.vue,.svelte,.yaml,.yml,.toml,.json(onlydescription/readmestyle fields) - Skip: binary files, lock files (
*.lock,package-lock.json,uv.lock,Cargo.lock,poetry.lock,yarn.lock), minified assets (*.min.js,*.min.css), images, archives, PDFs, and generated files.
- Text / docs:
- Scan for region mismatches. For each candidate file, look for words whose spelling disagrees with the target region. Use the word lists in "Common variants" below as the primary signal, plus the morphological patterns in "Patterns." Match whole words only, case-insensitively, but preserve the original case when proposing a fix (e.g., Colour → Color, COLOUR → COLOR).
- Apply context rules (critical — see "Do not flag" below). Identifiers, API names, URLs, file paths, code keywords, import targets, and proper nouns must not be rewritten even when they contain a region-specific spelling. A CSS
color:property, a Pythonargparsemetavar, a variable namedanalyze_data, a package calledcolorama, or a quoted path like/etc/color.confall stay as-is. - Group findings by file with
file:LINElocations. For each finding include: the matched word, the proposed replacement, and a short reason (e.g., "US→UK: -or → -our"). - Confirm before editing. Present the grouped report to the user and ask whether to apply all fixes, apply a subset, or stop. Do not edit until the user confirms. If the report is empty, state that and stop.
- Apply the approved edits using exact-string replacements that preserve surrounding whitespace and case. Re-scan the edited files once to make sure no new mismatches were introduced (e.g., from cascaded replacements inside longer words).
- Return a final report summarizing files changed, files skipped, and any ambiguous cases the user needs to resolve manually. If additional instructions were provided in the argument, follow them after the scan.
Common variants
Use these as the baseline list (non-exhaustive — extend when obvious analogues appear). For each entry, the left column is the US form and the right column is the UK form. Canadian English follows the UK column for -our / -re / doubled-consonant forms and the US column for -ize / -yze forms unless noted.
| US | UK |
| color | colour |
| behavior | behaviour |
| favor | favour |
| honor | honour |
| labor | labour |
| neighbor | neighbour |
| flavor | flavour |
| humor | humour |
| rumor | rumour |
| vapor | vapour |
| center | centre |
| meter | metre (length unit only; meter = measuring device stays) |
| liter | litre |
| fiber | fibre |
| theater | theatre |
| organize | organise |
| recognize | recognise |
| analyze | analyse |
| paralyze | paralyse |
| catalog | catalogue |
| dialog | dialogue (except UI dialog elements in code) |
| defense | defence |
| offense | offence |
| license (noun+verb) | licence (noun) / license (verb) |
| practice (noun+verb) | practice (noun) / practise (verb) |
| program | programme (non-computing) / program (computing) |
| gray | grey |
| traveled / traveling | travelled / travelling |
| labeled / labeling | labelled / labelling |
| modeled / modeling | modelled / modelling |
| canceled / canceling | cancelled / cancelling |
Canadian specifics
- Canadian English uses UK
-our,-re, and doubled-consonant forms (colour, centre, travelled). - Canadian English uses US
-ize/-yzeendings (organize, analyze, recognize). program(not programme) is standard in Canadian usage.defence/offence(UK forms) are standard in Canadian usage.cheque(financial) is UK/CA;check(verify) is universal. Do not flip check when it means "verify."
Patterns
When a word is not in the table, morphological patterns can still decide:
-or↔-ouron common roots (color/colour, honor/honour) — but not on Latin/Greek roots like error, tenor, author, horror, major, mirror. Only flag when a reliable US/UK pair exists.-er↔-reon specific roots (centre, metre, litre, fibre, theatre, calibre). Do not flag generic-erwords.-ize↔-iseonly on verbs where both spellings are documented (organize/organise, recognize/recognise, realize/realise, summarize/summarise). Do not flag size, surprise, exercise, advertise, compromise, despise, comprise, which are always-isein both regions.-yze↔-yseon a short list (analyze, paralyze, catalyze, dialyze).- Single vs. doubled consonant before suffix on unstressed final syllables (traveled ↔ travelled, labeled ↔ labelled). Stressed-syllable cases (controlled, referred, occurred) are the same in both regions.
Do not flag
- Identifiers in code: variable names, function names, class names, parameter names, field names, enum values, SQL column names. Example:
def analyze_data(...)orcolor: #fffin CSS stays. - Import targets, package names, module paths:
from colorama import ...,require('color'),<link rel="stylesheet" href="theme-color.css">. - URL paths, file paths, environment variable names:
https://example.com/color/,/etc/defense.conf,DEFENSE_MODE=1. - Language / library keywords and canonical API names that use a specific spelling: CSS
color, SVGfill-color, HTML<dialog>, PyTorchnn.BatchNorm,matplotlib.colors,argparse'smetavar, JSON Schemaformat. - Proper nouns: World Health Organization, Labour Party, Pearl Harbor, Centre Pompidou, personal names.
- Direct quotations, epigraphs, and citations — these must preserve the source's original spelling.
- Bibliography entry titles (
title = {...}in.bib) — preserve as published. - Code inside fenced code blocks in Markdown / reST when the code is meant to be executable or illustrative of an API (treat its identifiers like live code). Prose comments inside such blocks are still fair game.
- Words that are ambiguous between a flaggable variant and a different lexeme (e.g., meter as a measuring device in US/UK both) — note as ambiguous instead of rewriting.
Output format
For the pre-edit report, group by file:
<file:LINE> <original> → <replacement> (<short reason>)End with counts per category (US→target, UK→target, CA-specific adjustments) and an ambiguous-cases section if any.
After edits, print a one-line summary per changed file (e.g., README.md: 4 replacements) and a final total.
Rules while running
- Never change identifiers, import paths, URLs, or file paths — only prose.
- Preserve case (Colour → Color, COLOUR → COLOR, colour → color).
- Preserve surrounding whitespace and punctuation exactly.
- Do not reflow paragraphs, rewrap lines, or make any edits beyond the approved spelling substitutions.
- Do not commit anything.
- If the repo contains a style config (e.g.,
.editorconfig,CONTRIBUTING.md, aSTYLE.md, or a Vale /cspellconfig) that declares a different region than the argument, surface the conflict to the user before editing and let them resolve it.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

