/ever-better:ever-better-runfrom ever-better
Runs the entire ever-better quality process unattended on a repository: diagnose, install, freeze, then drain the backlog of rules, duplication, and dead code. Opens issues for decisions it cannot make alone.
Ships in ever-better. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The unattended mode. The user has handed you a repository and expects to come back to pull requests, not questions.
Default to acting. Everything in this process that can be decided from the code, you decide. The list of things that stop and ask is short and is written down below — if something is not on it, do it.
QUALITY.md carries three sections this mode depends on, all rendered from
.ever-better/state.json:
Record as you go, not at the end:
npx ever-better log --kind drained --rule max-depth "6 violations, 1 real bug (unreachable branch)"
npx ever-better log --kind deferred --rule max-lines "server/router.ts is 1400 lines; splitting is its own project"
npx ever-better log --kind issue --rule no-floating-promises "opened #42 — swallowed error, product decision"
npx ever-better log --kind note "eslint 8 -> 10 before freezing; the ceiling is from the new rule set"
The commit stamp is the point. A note saying "router.ts needs splitting" is useless six months and four hundred commits later unless a reader can see when it was true.
Nothing writes these for you, and in this mode nobody else can. The counts are recorded by
freeze and prune; every reason behind them exists only if you write it. One entry per commit as
you make it — a batch at the end stamps them all with the wrong commit — and one for each decision
as well as each fix, including the tier you left off and the clone you chose not to extract. This
table is the first thing the owner reads when they come back to a stack of pull requests, so it is
worth writing as if it were the only thing they read.
Re-diagnose first. ever-better status prints a STALE line, and QUALITY.md opens with a
warning, when the diagnosis is more than thirty days old, more than fifty commits behind, or was
taken on a commit no longer in this history (a rebase or force-push). All three mean the same
thing: file names and counts in the ledger may describe code that has moved.
npx ever-better diagnose --write
The ratchet itself never goes stale — eslint-suppressions.json is maintained by ESLint against
the current tree. It is the diagnosis that ages: gap list, file sizes, and every deferred note.
Re-read Carried over after re-diagnosing and drop the entries that no longer describe anything. A stale checklist that nobody prunes is how the list stops being read at all.
Small and often. One rule per commit during a drain; a config change, its verification and the fixes it prompts are three commits, not one. A twenty-file commit mixing a lint fix, a bug fix and a refactor cannot be reviewed or reverted, and an unattended run produces exactly that unless the cadence is deliberate.
The commit message says which rule, how many violations, and — separately — any behaviour that changed. A reviewer has to be able to tell "renamed a variable" from "this was returning undefined".
An edit that re-indents a block is itself two commits — the change at the old indentation, then the
reflow — or the three lines you wrote disappear into a whole-block diff. See ever-better-drain,
step 8.
Before every push, run what CI runs: the whole suite, with CI's flags, and a read of the diff for the
platforms you cannot run here. A run opens many PRs, and each one that goes red costs a fix, a push
and another review. See ever-better-drain, step 8.
Run ever-better-prepare if this is a first run here, or if diagnose reports no
CLAUDE.md / AGENTS.md. Everything below is done by an agent reading instructions.
Confirm the working tree is clean. git status --porcelain. If it is not, stop and say so:
this process installs packages and rewrites files, and untangling that from someone's own work
afterwards is not worth the risk.
Confirm you may open pull requests, and on which base branch. gh repo view --json defaultBranchRef.
Say how long this will take and what will arrive. A first run on an untouched repository produces: one formatting PR, one bootstrap PR, one freeze PR, then one PR per rule. That is not two or three pull requests, and the user should know before you start.
npx ever-better diagnose
Read it, then follow ever-better-bootstrap and ever-better-freeze. Four separate pull
requests, in this order, each merged before the next:
chore: raise the toolchain — linter, formatter, type checker, test runner, build tool to
current, majors included (bootstrap step 3). Skip it only if they already are: every number the
next three PRs record is a number from this rule set, and upgrading afterwards invalidates it.chore: format — mechanical, whole-repo, unreviewable if mixed with anything else.chore: quality tooling — the bootstrap output: ESLint config, scripts, .gitattributes,
workflows.chore: freeze the baseline — eslint-suppressions.json, .ever-better/state.json,
QUALITY.md.After (4), CI rejects any new violation. Everything from here is optional cleanup that can stop at any point without leaving the repo worse.
Loop with ever-better-drain. One rule per pull request, smallest backlog first:
npx ever-better status -> smallest remaining rule
fix it, extract the pure function, write the test
npx ever-better prune
npx ever-better check
commit, PR, wait for CI, merge
repeat
Keep going while the backlog is non-empty and nothing on the stop list below has come up. Report progress as you go — the ceiling before and after each PR is the number that matters.
When the backlog is empty, add the next tier and freeze again. Type-aware rules first if the repo
is TypeScript and they were off, then eslint-plugin-security if it touches the filesystem, child
processes or user input. Each tier is a bootstrap + freeze pair, and then drain again.
This is also where the runtime dependency majors belong — the ones held back at phase 0 because
nothing could tell you they broke. P3 has since built the suite that can. One dependency per pull
request, and a package that turns out to be unmaintained gets replaced or reimplemented rather than
pinned; see "Dependencies" in the ever-better entry skill.
ever-better-dry. These are report-only and never gate, so this phase is pure cleanup.
Open a GitHub issue, then continue with the next item — do not wait:
| Situation | Why it is not yours |
|---|---|
| The fix changes behaviour ambiguously | Should this throw, retry or log? That is a product decision. |
| The fix changes a public API | A published signature, a wire format, a config key in someone's file. |
| A refactor is a project in itself | Splitting a 2000-line file; a module that wants redesigning rather than editing. |
| A rule looks wrong for this repo | The answer may be to configure the rule, not change the code. |
| CI fails for a reason unrelated to your change | Flaky test, expired secret, broken runner. Report; do not "fix" it by disabling. |
Each issue: the rule, the file and line, the two or three options, and which one you would pick with the reason. Then move on.
Stop the whole run — and ask — only for these:
freeze reports violations it could not suppress. That is a broken config, and every later PR
would be red.When you stop — finished or blocked — say:
freeze a second time to make a red build green. It refuses; --force is not the answer.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub isamu/ever-better --plugin ever-better8 skills in this plugin
/ever-betterEntry point for making a repository's quality only go up. Diagnoses what tooling is missing, explains what each gap costs, and routes to the skill that closes it. Use when the user says "この repo の品質を上げたい", "lint を入れたい", "リファクタリングを始めたい", "technical debt", "where do I start with this codebase", or asks what ever-better would do here./ever-better-bootstrapever-better bootstrapInstall the quality tooling a repository is missing and review the generated config before anything is enforced. Use after `ever-better diagnose` reports gaps in the bootstrap phase, or when the user says "lint を入れて", "eslint 設定して", "set up linting and tests here", "TypeScript にしたい". Ends at the point where the baseline can be frozen — it never freezes./ever-better-drainever-better drainWork a frozen backlog down one rule at a time — fix the violations, extract the pure function that makes a fix testable, write the test, prune the ceiling, commit. Automates everything it can and opens a GitHub issue only for a refactor that genuinely needs the owner's judgment. Use after `ever-better freeze`, or when the user says "warn を減らして", "backlog を潰して", "リファクタリングして", "drain the baseline", "テストを増やして"./ever-better-dryever-better dryTurn duplication that jscpd found into shared functions, and dead code that knip found into deletions. Judges which clones are knowledge worth extracting and which are coincidence to leave alone. Use when the user says "重複を消して", "DRY にして", "コピペを共通化", "dead code を消して", or after a duplication scan reports clones. Runs after the lint backlog is drained./ever-better-freezeever-better freezePin a repository's current lint violations as a ceiling that can only fall, and wire CI to enforce it. Use after `ever-better-bootstrap`, or when the user says "ベースラインを固定して", "freeze the baseline", "既存のエラーは許して新しいのだけ止めたい", "grandfather the existing violations". Also covers reclaiming the ceiling with prune after a fix./ever-better-migrateever-better migrateMove a JavaScript repository to TypeScript in one pass — rename everything, get it compiling, and let the lint fallout land in the ratchet instead of blocking the migration. Use when `diagnose` reports "No TypeScript", or the user says "TypeScript にしたい", "型を入れたい", "migrate this to TypeScript", "ts化して". Not for adding types to a repo that is already TypeScript — that is the drain skill's type tier.Other plugins' skills for the same job