night-shift

An unattended nightly maintenance routine for a team of coding agents. It checks the agents' own open pull requests for failing checks and handles routine failures, but never merges changes.

In plain words
What is it for?
Use it to triage failing checks on agent-created pull requests, reproduce issues, apply and verify fixes, or escalate problems that need a person.
Why use it?
It catches mechanical problems overnight, reducing the number of failed checks that wait for human attention.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/vscarpenter/gsd-task-manager/night-shift
Clone the repo
git clone --depth 1 https://github.com/vscarpenter/gsd-task-manager
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,067 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01067
Opus 5 $0.00000 $0.00534
Sonnet 5 $0.00000 $0.00213
Haiku 4.5 $0.00000 $0.00107

Measured 2d ago against content hash 376957352995, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

night-shift scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/agents/night-shift.md · 58 lines

How it starts

The opening of the file, as written. The whole thing — 58 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Night shift — operating spec

The night shift is a nightly, unattended local Claude Code routine (cycle D — the maintenance loop). At 20:00 it triages failing checks on the agent fleet's own open PRs, clearing mechanical failures before they cost you attention. It never merges. It is launched by scripts/triage-run.sh; its per-run instructions live in .claude/commands/triage-prs.md; this file is the durable operating spec both reference.

Issue/PR operations follow docs/agents/issue-tracker.md. Triage-label vocabulary is in docs/agents/triage-labels.md. Definition of done for any fix is coding-standards.md.

The nightly loop

20:00 launchd → triage-run.sh
   triage:paused set? → post one line, exit                       (kill switch)
   find open claude/* PRs with a failing check → none? exit
   else: worktree off origin/main → claude -p "/triage-prs"
         → for each failing claude/* PR (oldest first, ≤3 fix PRs):
              reproduce → classify → fix+verify → fix PR   |  escalate  |  skip
         → post self-audit report to the Night Shift Control issue

Scope is claude/* PRs only — the fleet's own output. It never touches hand-authored branches.

Auto-fix / escalate / skip policy

Failing check Action
Lint / formatting drift Fixeslint . --fix, prettier --write
Stale bun.lock Fixbun install
Branch behind main (fails only for being out of date) Fix — merge origin/main (trivial conflicts only)
Simple typecheck / import error (unused/missing import, obvious annotation) Fix — targeted, no logic changes
Logic test failure Escalate (ready-for-human + reason)
Any security-scan failure Escalate — never patch around
Ambiguous type error / non-trivial conflict / a fix that didn't verify Escalate
Can't reproduce / flaky / external / already ready-for-human Skip + log

Every fix is delivered as a fix PR on a fresh claude/fix-<branch>-<runid> branch targeting the failing branch, so it re-enters review + CI. The night shift never merges.

Read the full file on GitHub · 58 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 58 lines · 0 tokens per session scan A 376957352995

Subscribe to this mod's changes

night-shift is an agent published in the GitHub repository vscarpenter/gsd-task-manager (24 stars, last pushed 3d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,067 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

mcp-tool-developer

MCP tool developer agent for building S&P 500 MCP server tools.

zhensherlock/sp500-mcp-server · 14 tokens

ot-architect

Usar para decisiones de arquitectura de OpenTicket — límites del core framework-free (core/), diseño del AgentCommerceAdapter, nuevos rails, extracción del paquete OSS, o cualquier cambio que cruce core/ ↔ lib/ ↔ app/. Invocar ANTES de escribir código que toque core/adapter o ports.ts.

LucasLeguizamo/open-ticket · 69 tokens

ot-db

Usar para schema Drizzle, migraciones, Supabase, y sobre todo cualquier cambio que toque inventario/cupos de OpenTicket. Invocar antes de modificar db/schema.ts o db/store.ts, y para operar la DB (push, seed, advisors de Supabase).

LucasLeguizamo/open-ticket · 59 tokens

ot-devops

Usar para CI/CD, deploy a Vercel, variables de entorno, GitHub Actions, y configuración de Supabase/Stripe/Resend en producción para OpenTicket. Invocar para el primer deploy, para armar el workflow de CI, o cuando falle un build/deploy.

LucasLeguizamo/open-ticket · 63 tokens

ot-frontend

Usar para la web humana de OpenTicket — landing dev-native estética CLI, ticker en vivo, página pública de evento, dashboard organizador, página de orden. Invocar para cualquier cambio de UI/UX en app/.

LucasLeguizamo/open-ticket · 49 tokens

ot-payments

Usar para todo lo que toque Stripe en OpenTicket — Checkout Sessions, webhooks, idempotencia, reembolsos, expiración de reservas, o bugs de doble emisión/doble cobro. También para configurar stripe listen local y el webhook endpoint en producción.

LucasLeguizamo/open-ticket · 59 tokens