Timebudget Guard — AI skill for Claude Code
Stop an AI agent from silently grinding: a time budget plus three progress-window rules that force a report before the hour is gone.
How to install Timebudget Guard
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open tkkpku/timebudget-guard and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Timebudget Guard does
Stop an AI agent from silently grinding: a time budget plus three progress-window rules that force a report before the hour is gone. DeepSeek Harness plugin + portable Claude Code/Codex hook + rule pack.
Alternatives in AI
- LongHorizon Harness — The long-horizon computer-use harness 1.3k ★
- Abu Cowork — Open-source alternative to Claude Cowork — a local-first AI agent desktop app · multi-model · self-evolving sk 349 ★
- Agenttrail — Local observability map for AI coding agents 269 ★
README
timebudget-guard
An agent that silently grinds burns your hour, and you find out only when it either finishes or gives up. This guard makes the overrun an event: it watches a wall-clock budget plus three stuck-patterns, and when one fires it **locks writes and shell** until the agent reports four specific things.
Three deployment shapes, one core:
| Shape | For | Strength |
|---|---|---|
lib/index.mjs |
DeepSeek Harness (Cordis plugin API) | full: deny calls, inject mid-request lines, cancel the turn |
hooks/hook.mjs |
Claude Code, Codex, any Claude Code / Codex dialect hook host | partial: deny calls, attach context to the next request, block Stop |
rules/AGENTS-snippet.md |
anything else | convention only: no enforcement |
Zero dependencies. No build step. Node 20+.
The one habit that matters
**State a time budget when you assign the task.**
budget 20min: refactor the auth module and add tests
预算 20min:把这几个接口对齐
Without a budget the guard defaults to 20 minutes, but it cannot know that *this particular* task was supposed to take five. A five-minute task that quietly runs to ten only gets caught when the default budget runs out — the guard has no prior for "how long this should have taken", and the coarse estimate available to it is far too crude to use as a deadline.
With a budget, the moment the clock is spent becomes an event the agent has to answer for. `budget 0` means unlimited. A bare "continue" keeps the previous budget, so acknowledging the agent never resets the clock.
This habit is worth more than the tool. The tool can only react to a budget it was given.
What it watches
Four signals. The first three are **sliding-window** rules over the trailing calls, never cumulative counters — 500 productive calls cannot add up to a false positive, because the window only ever holds the tail.
| Signal | Default | Meaning |
|---|---|---|
repeat |
same call ×3 with the same output | not moving |
| `repeat-error |
Related Skills
Agent SSD Guard
Keep AI coding agent CLIs from grinding down your SSD — relocate regenerable write targets to a RAM disk
Foundation Guard
Deterministic guard rails for AI coding agents like Claude Code. Blocks force-pushes, weakened tests and switc
Usage Band Mod
Claude Code mod: a live usage band above the prompt with context window, 5-hour, weekly and per-model limits a
Whatsapp Receptionist Builder
Agent Skill for building an AI receptionist on the WhatsApp Cloud API: webhook signature over the raw body, th
Claude Lot
Claude Code skill: shared usage cap for headless claude -p jobs across all projects on a machine (85 % 5-hour
Context Token Budget
Guard AI context usage with a fail-closed token budget — stop burning tokens. 用 fail-closed 的 token 预算守护 AI 上下
Related Agents
Checkpoint Archiver
Cleans stale RSI checkpoints beyond the 24-hour expiry window
Entry Manager
Entry and order manager. Use after the orchestrator has a TRADE decision - turns the trade plan into precise o
Hook Health
Monitor and diagnose hook failures, silent data corruption, and schema mismatches in the .claude/hooks/ infras