ranger

Installation
SKILL.md

Walk the territory and leave it cleaner than you found it. Sweep the area $ARGUMENTS for small, real defects and genuine simplifications, fix them, prove each fix independently, and ship the results as themed draft PRs. This runs unattended overnight with a large token budget: the user is asleep, so you cannot ask questions mid-run. Routine gaps follow the safety contract below without pausing — but anything genuinely needing a judgment call (a serious bug, a risky change, an ambiguous root cause) is not swallowed: it escalates to the morning report's needs-your-call section for the user's attention, never forced into a decision.

Refuse to run without a named area. If $ARGUMENTS is empty, ask for a path or component and stop. The named area is the blast radius; never touch files outside it except to read.

Safety contract (non-negotiable, holds every phase)

Because no human is watching, safety comes from what you cannot do, not from approval:

  • Nothing merges. Open draft PRs only. Never merge, never push to main, never force-push, never rebase or delete anyone's branch, never touch tags or releases.
  • One branch per themed cluster, cut from the pinned run base. Branches never depend on each other; each PR must stand and be reviewable alone.
  • Every fix is small, local, and obviously intended. A fix ships only if the correct behavior is unambiguous and the diff is small. Anything requiring product or design judgment — an observable behavior change a user could reasonably want either way, an API/contract/persisted-format change, a security-sensitive change — is not fixed. It goes to the morning report's needs-your-call list with evidence, and no code.
  • Regression coverage or it doesn't ship. A behavioral fix lands with a test that fails before and passes after. If the area has no test harness to hang that test on, the finding is downgraded to needs-your-call.
  • No churn. Do not reformat, rename, or restructure code that has no defect. Every changed line traces to a specific finding with evidence. A diff that is mostly cosmetic is a failure of this skill, not a success.
  • Refactors must be net-negative. A cleanup or simplification cluster ships only if it removes more code than it adds. Replacing 100 lines of bad code with 500 lines of worse-abstracted code is the exact failure this skill exists to prevent — a refactor that isn't net-negative is a rewrite in disguise; drop it. Count net lines on human-authored production code only — exclude tests, generated files, and pure formatting. Bug-fix clusters are exempt from the line count (a fix plus its regression test may add lines) but must still be the smallest change that addresses the mechanism. A cluster that mixes a bug fix and a refactor is split so each is judged by its own rule.
  • Stay in the area. Findings outside $ARGUMENTS are recorded in the report but not fixed. The only edits allowed outside the area are lockfiles or generated files that an in-scope change deterministically produces — and only when listed explicitly in the PR body; if an in-scope fix would require hand-editing code outside the area, drop the cluster.
  • No destructive git or filesystem commands. Never git reset --hard, git clean, git checkout/restore over dirty paths, or recursive deletion, except inside a disposable worktree this run created and has confirmed holds no user work. Recovery from any bad state — a mid-cluster crash, a partial commit, half-written fixer output — is always the same: stop that cluster, leave its branch and worktree exactly as they are, log it under Incomplete, and move on. Never continue from a dirty tree, never wipe it.

Design taste — the direction every fix moves

Installs
3
GitHub Stars
25
First Seen
Jul 1, 2026
ranger — arsenyinfo/skills