keep-green
Skill1 starsChanged 5 months agoMITView on GitHub
Run typecheck + tests + build on the current branch, fix any breaks, commit the fix. Use when asked to keep a repo building, or as the body of a /loop or /schedule job.
- Reads credentials
In this repository13 other files it gives its agents.
- adversarial-verifySkill
- closed-loopSkill
- cluster-feedbackSkill
- doubt-gateSkill
- fleet-loopSkill
- hill-climbSkill
- loop-auditSkill
- loop-readinessSkill
- loop-stateSkill
- prod-watchSkill
- scaffold-planningSkill
- ship-preflightSkill
- source-groundedSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 7
Keep the current branch green by running the full gate, repairing breaks, and committing the fix.
- Distinctive: line 12
Run in order: typecheck → tests → build.
- Distinctive: line 13
Read the failure output. Fix minimally — do not refactor beyond the break.
- Very specific: line 15
Commit from the repo root with a conventional message: fix: <what was broken>.
- Distinctive: line 19
Never push to main/master.
- Very specific: line 20
Never run migrations or touch .env/secrets.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Keep Green
Keep the current branch green by running the full gate, repairing breaks, and committing the fix.
Steps
- Detect the project's check commands —
package.jsonscripts,Makefile,cargo, orpyproject.toml. - Run in order: typecheck → tests → build. Stop at the first red gate.
- Read the failure output. Fix minimally — do not refactor beyond the break.
- Re-run the failed gate until it passes, then run the full sequence to confirm nothing regressed.
- Commit from the repo root with a conventional message:
fix: <what was broken>.
Constraints
- Never push to main/master.
- Never run migrations or touch
.env/secrets. - Never deploy.
- Give up after 3 attempts on the same failure — report the blocker instead of guessing.
- Any fix that took more than one attempt: append the lesson to the loop's state file (see
/loop-state) so the next run doesn't rediscover it.
Report format (each run)
What broke: <gate + error>
What changed: <files + lines>
Status: green | still redAlready green → print "clean" and end.
Loop usage
/loop 15m keep this repo green on the current branch.or as a nightly routine:
/schedule every night 02:00: run /keep-green across <repos>.Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

