tkkpku

Timebudget Guard — AI skill for Claude Code

AI community

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