Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

cspell-config

БесплатноБез исполняемых скриптовНе проверен

Create or update project cspell configuration by resolving the loaded config, active dictionaries, curated words, ignore paths, and validation evidence. Use…

microsoftот microsoft★ 1 654 звезды на GitHub

Об этом скилле

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.

Step 2: Resolve the Authoritative cspell Configuration

  1. Inventory candidate config files across the workspace using a broad glob pattern, for example cspell* and .cspell*. cspell recognizes many naming variants including dotfiles such as .cspell.json, plain names such as cspell.json, json with comments, JavaScript module configs, and yaml configs. Also check package.json for a cspell configuration key. Treat this inventory as candidates only. Enumeration order carries no authority.
  2. Identify the invocation-base config, which governs file discovery for the whole run:
    • When the command passes --config, that file is the base.
    • Otherwise the base is the config cspell finds from the invocation working directory.
    • Because the base owns discovery, a file excluded by the base ignorePaths stays excluded no matter what a nested config says.
  3. Determine per-file overlays. Unless config search is turned off, cspell searches upward from each checked file for the nearest recognized config and merges it over the base settings. Only the nearest config applies. An intermediate ancestor between the file and the base participates only when the selected config imports it. In merged settings, nested scalar values win and mergeable arrays accumulate.
  4. Apply same-directory recognized-name order when one directory holds more than one representation. In cspell 10.x, a package.json with an object-valued cspell key is selected before .cspell.json, then cspell.json, then the remaining recognized names. Sibling files are not merged automatically. A sibling participates only through an explicit import or an explicit invocation. Verify this ordering against the installed version rather than asserting it from memory.
  5. Note that --config alone does not disable the per-file search. --no-config-search and the noConfigSearch: true setting disable it. --config-search re-enables it. --stop-config-search-at bounds how far the upward search walks.
  6. Follow every import in the selected configs and record the imported files, since an import can supply the definitions and words a token would otherwise need.
  7. If no config file exists anywhere in the resolution chain, create cspell.json at the invocation root with a minimal scaffold using version, language, ignorePaths, and words.
  8. Record the resolved base config path, the applicable local config path for the files you intend to change, the imported files, and each candidate you did not select, with the reason.
  9. If these inputs do not identify exactly one authoritative mutation target, stop and ask the user which config or dictionary to write to. Present the res
Полный SKILL.md на GitHub

Установить cspell-config в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл cspell-config?

Create or update project cspell configuration by resolving the loaded config, active dictionaries, curated words, ignore paths, and validation evidence. Use when spell-check configuration needs project words or ignores.

Как установить скилл cspell-config?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл cspell-config запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить cspell-config с