/toolchain:setup [check|apply] [<ecosystem>]from toolchain
Checks or writes tracked build, test, and lint commands per ecosystem YAML files. Idempotent setup for deterministic toolchain resolution.
Ships in toolchain. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Inspect and configure the consuming repo's tracked ecosystem command surface per the uniform setup
contract (docs/plugin-philosophy.md "Setup is explicit and repeatable" in the marketplace
repository): check reports what is configured, apply writes it. The tracked files at
docs/conventions/ecosystems/<ecosystem>.yaml let /toolchain:check and /toolchain:lint
resolve commands deterministically from rung 1 of the ladder
(${CLAUDE_PLUGIN_ROOT}/reference/resolution-ladder.md)
instead of inferring every run or reporting a key unresolved. This skill is the ladder's
writer for rungs 2 and 3 (infer-and-persist, ask-and-persist).
Idempotent: re-running reads the existing files and offers updates rather than overwriting blind. An
unconfigured ecosystem is INFO, never FAIL: an attended run infers or asks for its commands, and a
key nothing resolves reads skip (unresolved: ...).
Action routing: no argument or check runs the check; apply runs the check first, then writes.
apply <ecosystem> scopes the whole run to that one ecosystem; when a named ecosystem's inference is
unambiguous it is written non-interactively, otherwise (or with no ecosystem argument in an
interactive session) the interview below runs.
REPO_ROOT=$(git rev-parse --show-toplevel)
Write only inside $REPO_ROOT/docs/conventions/ecosystems/, plus moving legacy
$REPO_ROOT/.claude/ecosystems/ files there per apply step 1; never the plugin directory or the
plugin data directory; configuration lives in the consumer's tracked files. Also read the legacy
$REPO_ROOT/.claude/ecosystems/.
check (read-only)The contract schema (ecosystem.schema.json) is the single source of truth for the file shape.
Read the ladder first, then report a PASS/FAIL/INFO table; modify nothing.
$REPO_ROOT/docs/conventions/ecosystems/<ecosystem>.yaml
present, report the ecosystem and its resolved command surface
(build-cmd/test-cmd/test-changed-cmd/check-cmd/lint-cmd/fix-cmd/code-fix-cmd). Validate each against the contract's
ecosystem.schema.json. FAIL a schema-invalid file (with the validation error in the
remediation line), an ecosystem file excluded by .gitignore (git check-ignore -v matches;
teammates would never receive it. Report the matching rule), or an un-ignored but untracked file
(git ls-files --error-unmatch exits non-zero; report "commit it to share with the team").
Otherwise PASS. If $ARGUMENTS names one ecosystem, scope
the report to just that file.
WARN each file still at the legacy $REPO_ROOT/.claude/ecosystems/: readers use it only
while no file of that name is under docs/conventions/ecosystems/, and the remediation is
apply, which moves it there. A legacy file shadowed by one of the same name there is not read
at all; say so and name both paths.apply), and note that /toolchain:check /
/toolchain:lint resolve those through inference, and report a key nothing resolves as
unresolved. The remediation is apply to persist a command surface.apply (idempotent)Run check first. Then write the accepted ecosystem files. After each write, re-run the check
probe pair for that path rather than trusting the write: git check-ignore -v reports no match,
and git ls-files --error-unmatch distinguishes tracked from written-but-untracked (the
guaranteed state right after a fresh write, so report "written but untracked: commit it", never
success).
For each $REPO_ROOT/docs/conventions/ecosystems/<ecosystem>.yaml that already exists, load it
and present a short summary. Propose moving each legacy $REPO_ROOT/.claude/ecosystems/ file
there, content unchanged, .local.yaml files included: a tracked file with git mv, an untracked
one (a personal .local.yaml the old .claude/**/*.local.* ignore line kept out of git) with a
plain move, and only once git check-ignore shows the new path ignored (else recommend the
docs/conventions/**/*.local.* line of step 5 first). With a file of the same name at both, show
the difference and keep the docs/conventions/ one unless the person says otherwise. The interview proposes changes against that baseline; nothing is dropped without the
user confirming. If $ARGUMENTS names one ecosystem, scope the whole run to just that file.
Detect which ecosystems apply from what actually exists, and draft each one's command surface from inference only: the repo's records, instructions, build files, tool configs and CI. The plugin ships no default file to seed a draft from; a key nothing implies goes to the interview, never to a command the plugin picks.
A drafted command that runs a tool through a package runner (npx, pnpm dlx, yarn dlx, bunx,
uvx) names the package the project's manifest declares, never a shorter name the runner could
resolve to someone else's package (@biomejs/biome, not biome), and passes the runner's
no-download option where it has one (npx --no). A recorded command runs on later unattended runs
too, so a bare name here would fetch and run an undeclared package on every one of them.
When the repo has its own task runner or wrapper scripts (a task file, a manifest's scripts block,
a scripts directory its docs or CI call), draft each command key from the matching task or script
first, in any ecosystem. Draft test-changed-cmd from the repo's own test
runner's way of selecting tests for changed files, over <files>; when the repo has no such
selection, look it up with /discovery:research (if enabled) for the runner the repo uses, and leave the key
out when none exists.
*.slnx/*.sln/*.csproj present. Resolve the anchor (solution file at root, else
nearest project). Note any repo-specific trap in notes (e.g. the xUnit v3 --nologo pin).pyproject.toml/uv.lock. Draft from the tools the project's config and
dependencies name, run through uv run … when uv.lock exists. Set project-discovery to the
pyproject.toml roots.package.json/tsconfig*.json. Pick check-cmd/fix-cmd (format-only) and code-fix-cmd (semantic lint autofixes) from the
configured linter (biome.json → Biome format vs check --write; eslint config → ESLint)..github/workflows/ present (lint-only surface. /toolchain:lint runs it,
/toolchain:check does not).typos/gitleaks/editorconfig-checker/lychee-offline present (lint-only).Repo-specific CI-parity gates beyond plain build/test/lint (lockfile drift, generated-artifact
freshness, schema regeneration) belong in the ecosystem file's gates array. Draft one when the
repo's CI runs such a check. For an ecosystem with project-discovery, a gate that is repo-wide
rather than per-project (protobuf generation, schema freshness. Checks something that exists once,
not once per discovered project root) needs run-from: repo-root on the drafted gate; omitting it
defaults to per-project execution, which redundantly re-runs the check in every root or fails in
roots lacking its config. Ask which shape applies when the CI check's own scope is ambiguous from its
command alone.
When apply <ecosystem> names one ecosystem and its inference is unambiguous, write the drafted
command surface non-interactively. Otherwise interview, one decision at a time: present each inferred
ecosystem's drafted command surface with a recommendation; let the user accept, edit, or skip it. When
inference is ambiguous (multiple test runners, no configured linter), ask for the command rather than
guessing. Offer any ecosystem the repo has that inference missed.
Materialize one $REPO_ROOT/docs/conventions/ecosystems/<ecosystem>.yaml per accepted ecosystem,
conforming to the contract's ecosystem.schema.json. Each file carries a one-line header comment citing the
contract, globs (required), the four command keys (null where a phase does not apply), and the
optional keys that apply (anchor, project-discovery, opt-in, install-hint, requires, gates, notes,
lint-cmd, test-changed-cmd, code-fix-cmd).
Write requires for a command that needs more than its tool on PATH, such as a runtime package
it imports or the tool build CI pins, instead of an install step inside the command string.
Confirm each file is tracked, not ignored.
This skill is the one writer of fix-cmd and lint-cmd. A format or lint plugin's setup drafts the
values and sends the person here with them. Write lint-cmd only as a report-only command over
<files>. /toolchain:lint and /toolchain:check run these keys on request; no hook runs a
record's command.
Recommend the consumer validate these in their own gate, a check-jsonschema hook or CI lane against
the contract schema catches typos the tolerant reader would otherwise ignore.
Personal per-key overrides go in docs/conventions/ecosystems/<ecosystem>.local.yaml; a
user-global base at ~/.claude/ecosystems/<ecosystem>.yaml is also honored. Layers resolve
user-global → team → personal override, additively per key. Recommend the consumer add the recursive
docs/conventions/**/*.local.* line to .gitignore if not already covered.
Tracked docs/conventions/ecosystems/*.yaml files in the consuming repo, and a one-paragraph
summary of what was written and how to re-run this setup to reconfigure. check alone reports the effective
configuration and changes nothing.
/toolchain:check and /toolchain:lint.pluginConfigs.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub melodic-software/claude-code-plugins --plugin toolchain4 skills in this plugin
/checkBuild, test, and lint verification for changed files in each recorded or build-file-implied ecosystem, running only project commands and reporting unresolved ones. Use when: 'does it compile', 'run tests', 'does this still build', or after code edits. Not for lint only: /toolchain:lint; outcome verification: /verification:confirm./lintLint and format checks across changed ecosystems without a full build, honoring config-file opt-in; --fix formats only, --code-fix applies semantic lint autofixes behind confirmation. Use when: 'lint this', 'format check', 'run prettier/ruff/eslint', or quick lint/format feedback. Not for build and test: /toolchain:check./ratchetCount ratchet: freezes a lint violation, suppression, check, performance or telemetry count at today's value as a checked-in CI ceiling (fails on rise, lowered as count falls). Counters only, never durations; proposes files for human merge. Use when: 'ratchet' lint rule or suppressions, freeze a violation count, or 'stop this count from growing'.Other plugins' skills for the same job