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
ignorePathsaligned 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
.txtword 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
- 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, andGemfile. - Determine how cspell is installed or available. Check for a project dependency, an installed command with
cspell --version, ornpxor equivalent availability. If cspell is not available, ask the user for their preferred installation method. - 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.
- Check for an existing spell-check script in the project's task runner, for example
package.jsonscripts,Makefiletargets,justfilerecipes, orpyproject.tomlscripts. Use the project command when one exists. It is the authority for the rest of this workflow. - 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.