agentleFS
david-vrbadavid-vrba/claude-power-skills/skills/overnight/SKILL.md

overnight

Skill4 starsChanged 5 months agoMITView on GitHub

Schedule the current task to run unattended overnight (default 2 AM) via headless `claude -p`, isolated on a git branch, with results auto-surfaced in your next morning session. Use when the user says "do this at 2am", "run this while I sleep", or "queue this for tonight".

8 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    MaxTurns: default 60; raise for large build tasks, lower (1–3) for trivial ones.

    line 27

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “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

Overnight runner

Captures the task being discussed right now, schedules a Windows Task Scheduler job that runs claude -p headless at the chosen time (the machine wakes itself), and writes a result that the morning session shows automatically.

Files: scripts live in ~/.claude/overnight/bin/. You orchestrate; the PowerShell does the work.

Steps

1. Settle the parameters

Infer from the conversation; ask only if genuinely ambiguous.

  • Schedule → RunAt (local yyyy-MM-dd HH:mm). Default next 02:00 (tomorrow if 2 AM already passed today). Parse "in 90m", "tonight", "at 3", "tomorrow 04:00" relative to the current date/time in context. Must be in the future.
  • Mode: build if the task writes code/files; research if it only investigates/reads/searches and produces a written report.
  • ProjectDir: the current working directory (absolute path).
  • MaxTurns: default 60; raise for large build tasks, lower (1–3) for trivial ones.
  • Goal: one crisp human-readable line (shown in the morning summary).

2. Write a self-contained brief

The overnight run starts fresh — it sees only this brief plus the project files, NOT this conversation. So the brief must stand alone. Write it to a temp file (e.g. ~/.claude/overnight/_brief_tmp.md) containing:

  • Objective — what to accomplish.
  • Context — everything relevant from this conversation: decisions made, constraints, paths, prior findings, links.
  • Deliverables — concrete outputs (files to create/modify, or the report to produce).
  • Definition of done — how the run knows it succeeded.
  • Guardrails — what NOT to touch. For build tasks, instruct it to leave changes in the working tree and NOT run git commit/push — the runner commits to an isolated branch automatically. Telling it to commit wastes turns and can hit the turn limit.

Be generous and explicit — under-specifying is the main failure mode.

3. Schedule it

Run (Windows, pwsh):

pwsh -NoProfile -File "$HOME/.claude/overnight/bin/new-job.ps1" `
  -Goal "<one line>" `
  -BriefPath "$HOME/.claude/overnight/_brief_tmp.md" `
  -RunAt "2026-01-01 02:00" `
  -Mode build `
  -ProjectDir "<cwd>" `
  -MaxTurns 60

Optional: -Model opus, -AllowedTools "Read Edit Write Glob Grep Bash", -NoWorktree (build directly in the project with no branch isolation — only if the user insists).

4. Confirm

Relay the script's confirmation block (id, fire time, mode, branch, wake status). Then delete the temp brief. Tell the user: results appear automatically at the start of their next session; build work lands on branch overnight/<id> (review with git checkout), main untouched.

Reliability notes (mention only if asked)

  • Machine wakes via Task Scheduler -WakeToRun; missed starts run on next wake (-StartWhenAvailable).
  • One retry on failure, then a lighter-model fallback on overload; a result.md is always written, even on crash.
  • Runs serialized (global mutex) so two jobs never contend.
  • Cancel: Unregister-ScheduledTask 'OvernightClaude-<id>'. List: Get-ScheduledTask 'OvernightClaude-*'.
  • On subscription plans, headless claude -p may draw from a separate Agent SDK credit pool — check your plan's current terms before relying on heavy unattended runs.

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.