cspell-config

Installation
SKILL.md

Update cspell Configuration with Project-Specific Words and Ignores

Context

  • Goal: Add commonly used project-specific words to the cspell configuration, alphabetize the words list, and add useful ignorePaths aligned with the project's ignore files.
  • cspell supports multiple config formats and file names. Detect which format the project uses rather than assuming any specific one.
  • Projects may also use custom dictionary files, such as .txt word lists, organized in a dedicated directory. Discover and respect existing dictionary structure.
  • Configuration authority is invocation-bound, not a fixed ranking of file locations. The command that runs cspell determines the base configuration, cspell's own per-file lookup determines overlays, and a custom dictionary participates only when an effective configuration defines and enables it. File enumeration order never establishes authority.

Required Steps

Step 1: Detect Project Context and the Authoritative Command

  1. Identify the project's primary language and package manager by inspecting files at the workspace root, for example package.json, pyproject.toml, Cargo.toml, go.mod, *.csproj, pom.xml, and Gemfile.
  2. Determine how cspell is installed or available. Check for a project dependency, an installed command with cspell --version, or npx or equivalent availability. If cspell is not available, ask the user for their preferred installation method.
  3. Record the installed cspell version. The resolution details below describe cspell 10.x behavior. When the project pins a different major version, confirm behavior against that version's documentation or observed output before relying on any ordering claim.
  4. Check for an existing spell-check script in the project's task runner, for example package.json scripts, Makefile targets, justfile recipes, or pyproject.toml scripts. Use the project command when one exists. It is the authority for the rest of this workflow.
  5. From that command, capture the invocation working directory, the file globs it passes, any explicit --config, and any config-search controls such as --no-config-search, --config-search, --stop-config-search-at, or an equivalent setting. These inputs determine which configuration the project actually uses.
Installs
4
GitHub Stars
1.5K
First Seen
9 days ago