Skip to content
Back to skills

Setup

ASecurity

Check (default, read-only) or write (apply) tracked docs/conventions/ecosystems/ECOSYSTEM.yaml build, test, and lint commands. Re-runnable.

  • 34 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added September 2, 2026
ai-agentstypescriptpythonrustgoshellbashgit

Works with

  • claude code

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned December 3, 2026

npx -y skills add melodic-software/claude-code-plugins --skill setup --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Setup?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Setup
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/melodic-software-setup-211c2ba9/badge)](https://www.skillsdirectory.com/skills/melodic-software-setup-211c2ba9)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
description: "Check (default, read-only) or write (apply) tracked docs/conventions/ecosystems/ECOSYSTEM.yaml build, test, and lint commands. Re-runnable."
argument-hint: "[check|apply] [<ecosystem>]"
user-invocable: true
disable-model-invocation: true
---

# Setup

## Purpose

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`](${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.

### Resolve repo root

```bash
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.

1. **Configured ecosystems.** For each `$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.
2. **Unconfigured ecosystems.** INFO: detect which ecosystems the repo has that are *not* yet
   configured (see the inference signals under `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).

### 1. Read existing config first

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.

### 2. Infer candidates from the repo before asking

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.

- **dotnet**. `*.slnx`/`*.sln`/`*.csproj` present. Resolve the `anchor` (solution file at root, else <!-- portability-ok: R6 kept-adapter ecosystem manifest detection -->
  nearest project). Note any repo-specific trap in `notes` (e.g. the xUnit v3 `--nologo` pin).
- **python**. `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.
- **typescript**. `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).
- **bash** / **powershell**. Shell/PowerShell files present; draft the check/fix commands the repo
  documents or its linter and formatter configs imply, and ask for the rest.
- **markdown**, a markdownlint config present.
- **yaml**. `.github/workflows/` present (lint-only surface. `/toolchain:lint` runs it,
  `/toolchain:check` does not).
- **cross-cutting**. Repo-root config for `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.

### 3. Interview or write non-interactively

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.

### 4. Write the files

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.

### 5. Offer the personal override convention

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.

## Output

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.

## Next

- Build and test with the recorded commands: /toolchain:check.
- Lint and format checks only: /toolchain:lint.

## What this skill does not do

- Run build/test/lint. That is `/toolchain:check` and `/toolchain:lint`.
- Write machine-local state. Configuration lives in the consumer's tracked files, never in the plugin
  directory or the plugin data directory.
- Write the plugin cache, Claude Code user settings, or `pluginConfigs`.
- Draft a command from a plugin default. Every drafted command comes from the repository or from the
  person's answer.

Files in this skill

  • SKILL.md8.3 KB
  • evals/evals.json3.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.