overnight-agent-guardrails

overnight-agent-guardrails is a skill for Claude Code, Codex from toolshedlabs-hash/nightshift. It costs 146 tokens per session (628 once invoked), scanned A, original, MIT.

A set of safety scripts for running a coding agent unattended for long periods, such as overnight. It limits the run, saves handoff information, and requires checks before accepting work.

In plain words
What is it for?
Use it to cap iterations or time, run tests and lint checks as a stopping gate, and continue an interrupted agent run from a handoff file.
Why use it?
It prevents an agent from looping indefinitely, continuing after failures, spending without a limit, or leaving unfinished work impossible to resume.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to cap iterations or time, run tests and lint checks as a stopping gate, and continue an interrupted agent run from a handoff file.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/toolshedlabs-hash/nightshift/overnight-agent-guardrails
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.

Any agent
npx skills add toolshedlabs-hash/nightshift --skill overnight-agent-guardrails
Clone the repo
git clone --depth 1 https://github.com/toolshedlabs-hash/nightshift

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for overnight-agent-guardrails

README.md
[![agentmods](https://agentmods.dev/badge/skills/toolshedlabs-hash/nightshift/overnight-agent-guardrails/github.svg)](https://agentmods.dev/skills/toolshedlabs-hash/nightshift/overnight-agent-guardrails)
Your own site
<a href="https://agentmods.dev/skills/toolshedlabs-hash/nightshift/overnight-agent-guardrails"><img src="https://agentmods.dev/badge/skills/toolshedlabs-hash/nightshift/overnight-agent-guardrails/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for overnight-agent-guardrails

Your own site · 80×15
<a href="https://agentmods.dev/skills/toolshedlabs-hash/nightshift/overnight-agent-guardrails"><img src="https://agentmods.dev/badge/skills/toolshedlabs-hash/nightshift/overnight-agent-guardrails.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 146 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 628 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00146 $0.00628
Opus 5.5 $0.00058 $0.00251
Sonnet 5.5 $0.00029 $0.00126
Haiku 4.5 $0.00015 $0.00063

Measured 2mo ago against content hash fd125b199007, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

overnight-agent-guardrails 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 2mo 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.

skills/overnight-agent-guardrails/SKILL.md · 61 lines

What it actually says

Overnight agent guardrails

Use this when a user wants to leave a coding agent running unattended and needs the run to be bounded, resumable and checkable afterwards.

When this applies

  • "leave it running overnight", "run this unattended", "let it work while I sleep"
  • a run that kept going and produced hours of output nobody verified
  • wanting a hard ceiling on what one unattended run can cost

What to do

The four scripts ship inside this skill directory, so there is nothing to fetch. Refer to them as $SKILL_DIR below, meaning the folder this file is in.

  1. Wrap the existing loop in the runaway guard. It exits nonzero when the run should stop, so it belongs in the while condition:

    while "$SKILL_DIR/runaway-guard" --max-iters 40 --max-minutes 480; do
      ... one bounded unit of work ...
    done
    

    At least one cap is required. It refuses to start with none, because an unbounded loop is the thing it exists to prevent.

  2. Put the project's real checks behind the gate, so unchecked work is never accepted:

    "$SKILL_DIR/verify-gate" "npm test" "npm run lint"
    

    Nonzero means stop or escalate, rather than piling more work on a broken base.

  3. Write the handoff file at the end of every unit of work, rewritten and not appended. HANDOFF.md in this directory is the template. A fresh run reads that one file and continues.

  4. Record events as you go with "$SKILL_DIR/nightlog", then produce the summary with "$SKILL_DIR/morning-brief". The verdict lands on the first line.

Notes

  • touch $NIGHTSHIFT_DIR/STOP halts a running loop by hand. That is the whole kill switch.
  • There is no daemon. State is one counter directory you can delete to reset.
  • Everything is MIT and about 300 lines of bash. Reading it takes ten minutes.
Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2mo ago First seen · 61 lines · 146 tokens per session scan A fd125b199007

Subscribe to this mod's changes

overnight-agent-guardrails is a skill published in the GitHub repository toolshedlabs-hash/nightshift (4 stars, last pushed 3mo ago), licensed MIT. It adds 146 tokens to every session and 628 once invoked, about $0.0006 per session on Opus 5.5. 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-31.

Related

overnight-agent-guardrails compared with skills from other repositories

overnight-agent-guardrails next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
overnight-agent-guardrailstoolshedlabs-hash/nightshiftSkill43mo agoMITA146Claude Code, Codex
web-design-system-foundationmakifbaysal/tasktrooperSkill122yesterdayApache-2.0A77Claude Code, Codex
implementation-task-specmakifbaysal/tasktrooperSkill122yesterdayApache-2.0A29Claude Code, Codex
analiz-html-reportmakifbaysal/tasktrooperSkill122yesterdayApache-2.0A35Claude Code, Codex
llm-and-agent-securitymakifbaysal/tasktrooperSkill122yesterdayApache-2.0A73Claude Code, Codex
design-system-authoringmakifbaysal/tasktrooperSkill122yesterdayApache-2.0A62Claude Code, Codex
screen-mockup-htmlmakifbaysal/tasktrooperSkill122yesterdayApache-2.0A63Claude Code, Codex