| name | bt-spellcheck |
| description | Run cspell across the project, fix typos, and add legitimate words to the dictionary. Use when the user wants to spellcheck, fix spelling, or resolve cspell failures. |
Spellcheck
Run the project-wide spellcheck, then fix all reported errors.
Usage
/bt-spellcheck
Steps
- Run spellcheck
- Execute
pnpm run spellcheck to check src/**/*.{ts,md,mdx,mdc}, docs/**/*.{md,mdx,mdc}, and README.md
- Capture the full error output
- Analyze each error For every word flagged by cspell, determine if it is:
- A typo โ a misspelled word in source code, comments, strings, or content
- A legitimate term โ a technical term, brand name, abbreviation, or proper noun that cspell doesn't know
- Fix typos in source files
- Open the file and fix the misspelled word in place
- Don't add typos to the dictionary
- Add legitimate words to
cspell.json
- Add the word to the
words array in cspell.json
- Keep the array sorted alphabetically (case-insensitive)
- Don't add duplicates
- Re-run spellcheck
- Execute
pnpm run spellcheck again to confirm all errors are resolved
- If new errors appear, repeat from step 2
- Format
- Run
/bt-format to ensure all modified files are properly formatted
Dictionary file
- Path:
cspell.json (project root)
- Add words to the
words array (not userWords)
- Keep the array sorted alphabetically
Notes
- Files checked:
src/**/*.{ts,md,mdx,mdc}, docs/**/*.{md,mdx,mdc}, README.md (see package.json spellcheck
script)
- Compound words are allowed (
allowCompoundWords: true)