Skip to content
Skill

Overnight loop

Runs long unattended agent loops with a fixed invariant, trusted metrics and stop rules

Overnight loop is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
18
Last commit
License
AGPL-3.0
Listing updated

Similar skills

About Overnight loop

This skill guides an agent through designing and running unattended or long-horizon loops, such as overnight hardening, draining a queue or sweeping a codebase repeatedly. Before the first pass it has the agent write an invariant file that holds the goal, a success metric, the per-iteration steps, stop conditions, allowed tools and the handoff location, so the loop re-reads its instructions each cycle instead of relying on the operator to re-paste them.

The workflow includes a pre-flight step: the metric command is dry-run on untouched code to confirm it returns a parseable number, which becomes the iteration-zero baseline, and the working tree is checked to be clean on a dedicated branch. During the loop the skill sets a noise floor so single noisy readings neither keep nor revert a change, separates a progress metric from a regression guard, and makes criterion and guard files read-only to the loop. When several discards occur in a row it escalates through a short ladder before stopping. It closes with a morning handoff using the progress-handoff skill.

It expects a shell-capable agent with a test or metric command available, and it is written around loop drivers such as the /loop command, ralph-loop and workflow scripts. Unattended changes are meant to land on a branch, with merging left to a person.

When your agent uses it

Design and run unattended or long-horizon loops (overnight hardening, drain queues, iterative sweeps) with a written invariant the harness re-reads every iteration — no manual re-pasting, trustworthy metrics, explicit stop conditions, and correct model routing. Replaces bounded-loop-runner. Use for "overnight", "unattended", "keep iterating until", "밤새 돌려", "루프 돌려", ralph-loop or /loop driven work.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 1 file (5 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the episteme plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add junjslee/episteme
/plugin install episteme@episteme

Or copy only this skill to ~/.claude/skills/overnight-loop:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/junjslee/episteme.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/overnight-loop &&
cp -R "$tmp/skills/custom/overnight-loop" ~/.claude/skills/overnight-loop &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/overnight-loop inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/overnight-loop to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/junjslee/episteme.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/overnight-loop &&
cp -R "$tmp/skills/custom/overnight-loop" ~/.agents/skills/overnight-loop &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/overnight-loop inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/overnight-loop to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/junjslee/episteme.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/overnight-loop &&
cp -R "$tmp/skills/custom/overnight-loop" ~/.cursor/skills/overnight-loop &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/overnight-loop inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/junjslee/episteme.git --path skills/custom/overnight-loop

Or copy the folder to ~/.gemini/skills/overnight-loop yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/overnight-loop:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/junjslee/episteme.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/overnight-loop &&
cp -R "$tmp/skills/custom/overnight-loop" ~/.copilot/skills/overnight-loop &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/overnight-loop inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/junjslee/episteme.git

Then copy episteme/skills/custom/overnight-loop into your agent's skills folder as overnight-loop. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Written loop invariant
Creates a file capturing the goal, per-iteration steps, stop conditions and allowed actions that every iteration re-reads.
Pre-flight metric baseline
Dry-runs the metric command on untouched state and records the result as the iteration-zero baseline before looping.
Noise-aware metric checks
Uses a minimum delta or repeated runs so single noisy readings do not falsely keep or roll back changes.
Guard and progress separation
Keeps a regression guard distinct from the improvement metric and treats success and guard files as read-only.
Stuck-loop escalation ladder
Defines steps to take after consecutive discards before the loop halts, along with a coverage grid for sweeps.
Model routing for fan-out
Specifies running parallel execution subagents on a named model rather than the session's design-tier model.

Good for

  • Run an overnight hardening pass that keeps iterating until tests pass
  • Drain a queue of tasks unattended and log one line per item
  • Repeat an iterative code sweep with a metric and stop conditions
  • Set up a /loop or ralph-loop job that records results to a handoff file
  • Write a morning status summary after an unattended run

Overnight loop FAQ

What does the skill need before a loop starts?

It needs a metric command that exits cleanly and prints a parseable number, plus a clean working tree on a dedicated branch.

Can an unattended loop merge its own changes?

No. The skill keeps unattended work on a branch and leaves merging as a human-gated step.

Which loop drivers does Overnight loop cover?

It names the /loop command in dynamic or cron form, ralph-loop and Workflow scripts.

What happens when the loop stops making progress?

After several consecutive discards it re-reads the invariant, combines kept changes, tries the opposite approach, and only then stops.

Does Overnight loop include scripts?

No. The skill is a single SKILL.md file with no bundled scripts.

How do I install Overnight loop in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/overnight-loop to use it in all your projects, or to .claude/skills/overnight-loop in one project. Or install the episteme plugin, which includes it: /plugin marketplace add junjslee/episteme, then /plugin install episteme@episteme.

Does Overnight loop run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Overnight loop?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Overnight loop?

The closest alternatives to Overnight loop are Loop controller, Continuous agent loop, Autonomous loops, Autonomous loops and Loop engine.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from junjslee/episteme

  1. Runs one bounded episteme event from branch through PR, merge and post-merge sync

    • Open source
    • 18 GitHub stars
    • Developer tools
  2. Lets an agent stress-test a high-impact decision by verifying its key claims before acting

    • Open source
    • 18 GitHub stars
    • Developer tools
  3. Refreshes next-step and event docs so another agent can resume work quickly

    • Open source
    • 18 GitHub stars
    • Developer tools
  4. Lets an agent write a valid episteme gate artifact on the first try

    • Open source
    • 18 GitHub stars
    • Developer tools
  5. Scaffolds a repo with the episteme operating files and checks they exist

    • Open source
    • 18 GitHub stars
    • Developer tools
  6. Iteratively refines a copied skill candidate against stated goals, with manual promotion

    • Open source
    • 18 GitHub stars
    • AI models and LLM tooling