Index of every page on this site: llms.txt
All skills
vitest-dev avatar

/typo-checker

@ff6b427
by Vitestvitest-dev/vitest17k stars
2,274
Run it yourself

Run typos-cli on the codebase, review findings, fix real typos, and update _typos.toml config to suppress false positives. Use this skill for routine codebase typo maintenance. Invoke when doing periodic codebase hygiene, when the user mentions typos or spelling checks, or as a scheduled maintenance task.

Use this Skill: https://skilld.dev/gh/vitest-dev/vitest/typo-checker

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈80 tokens for metadata: the name and description. ≈668 when used: this file.

Description uses 4.0% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈321 characters, or 4.0%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Typo Checker

Scan the codebase with typos-cli, classify findings, fix real typos, and maintain _typos.toml so false positives don't recur.

Prerequisites

typos-cli must be installed. If not available, install via one of:

Method Command
cargo cargo install typos-cli
brew brew install typos-cli
pipx pipx install typos
Binary Download from https://github.com/crate-ci/typos/releases

Workflow

1. Scan

typos --format=brief

This outputs one finding per line: file:line:col: \typo` -> `suggestion``. Compact and easy to parse.

typos respects .gitignore by default, so node_modules/, dist/, build outputs are already excluded.

To get an overview first:

# Count unique typo words by frequency
typos --format=brief 2>&1 | sed "s/.*\`//;s/\`.*//" | sort | uniq -c | sort -rn | head -20

If many findings come from minified/generated files, add those paths to _typos.toml extend-exclude first, then re-scan.

2. Classify each finding

For every finding, decide:

  • Real typo — fix it
  • False positive — add to _typos.toml

Common false positive patterns:

  • Short variable names that happen to be words (ba, fo, nd)
  • Domain abbreviations (als for AsyncLocalStorage, PnP for Plug'n'Play)
  • File extensions in regexes (.styl, .pcss)
  • Test fixture strings and test data
  • Line truncation artifacts in inline snapshots (afte..., wrapp...)
  • Product names and proper nouns
  • Lorem ipsum text

When in doubt about whether a misspelled variable name is "intentional" — it's still a typo. Propagated typos are still typos. Fix them.

3. Fix real typos

  • Comments, docs, JSDoc: fix the text directly
  • Variable/property names: rename all occurrences consistently
  • Test names: fix the name, update corresponding snapshot files
  • Filenames: rename the file and update all imports/references — check for references before renaming

4. Update _typos.toml

Add false positives to [default.extend-words] with a comment explaining why:

[default.extend-words]
# AsyncLocalStorage abbreviation
als = "als"

For file-level exclusions, use [files].extend-exclude:

[files]
extend-exclude = [
  "*.js.map",
  "*.svg",
]

If _typos.toml doesn't exist yet, create it.

5. Commit

Commit fixes and config updates together:

chore: fix typos and update _typos.toml

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts26d3 checks · Risk SAFE
  • Gen Agent Trust Hub26d

    The skill facilitates codebase maintenance by scanning for typos and fixing them. It involves installing a third-party tool and processing codebase content, which introduces a surface for indirect prompt injection.

  • Socket26d

    No alerts

  • Snyk26d

    Risk: LOW · No issues

Signed by skilld at ff6b427. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 20 hours ago.

Activeupdated 2 months ago

README badge

README badge for vitest-dev/vitest