agentleFS
jpoindexterjpoindexter/ai-agent-skills/keep-green/SKILL.md

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

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
  1. Distinctive:

    Keep the current branch green by running the full gate, repairing breaks, and committing the fix.

    line 7
  2. Distinctive:

    Run in order: typecheck → tests → build.

    line 12
  3. Distinctive:

    Read the failure output. Fix minimally — do not refactor beyond the break.

    line 13
  4. Very specific:

    Commit from the repo root with a conventional message: fix: <what was broken>.

    line 15
  5. Distinctive:

    Never push to main/master.

    line 19
  6. Very specific:

    Never run migrations or touch .env/secrets.

    line 20

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Keep Green

Keep the current branch green by running the full gate, repairing breaks, and committing the fix.

Steps

  1. Detect the project's check commands — package.json scripts, Makefile, cargo, or pyproject.toml.
  2. Run in order: typecheck → tests → build. Stop at the first red gate.
  3. Read the failure output. Fix minimally — do not refactor beyond the break.
  4. Re-run the failed gate until it passes, then run the full sequence to confirm nothing regressed.
  5. 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 red

Already 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>.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.