Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

agent-deadline-setup

БесплатноЗапускает вложенные скриптыНе проверен

Installs, configures or removes the agent-deadline hooks (soft wall-clock budget for subagents). Triggers: agent-deadline, subagent timeout, agent time limit…

kochetkov-maот kochetkov-ma★ 41 звезда на GitHub

Об этом скилле

Agent Deadline

Two self-contained hooks (PreToolUse guard + SubagentStop cleanup) put a soft wall-clock budget on every subagent. This skill decides mode, scope and budget only; the brewcode:hook-creator agent does the file work from the runbook.

Claude Code has no wall-clock timeout for subagents. maxTurns stops a run at its turn cap; since 2.1.246 the caller receives a partial-marked result with a continuation hint, while unwritten analysis remains unrecoverable. These hooks kill nothing: they narrow what an over-budget agent can still call, so it finishes its report.

Prompt contract

$ARGUMENTS is one free-form RU/EN prompt; mode tokens and flags (--unattended) may sit anywhere in it.

  1. Mode: strip --unattended first: a flag, never a mode, scope or name (Modes, Unattended). Then an explicit mode token wins outright; else the most distinct whole-word keyword hits (table in Step 2). Tie with a destructive mode (purge) or of install with a removal mode (uninstall) -> AskUserQuestion; with status -> status; of two other mutating modes -> the keyword that comes first. No hit or empty -> status.
  2. Scope: prose that is not a mode/id/path is still input: take the id, path or target from it.
  3. Ask: at most ONE AskUserQuestion (max 4 questions) to resolve mode and scope, before any work, only when the answer changes what gets written. A read-only run asks nothing. --unattended asks nothing: an open question there ends in RESULT skipped (Modes, Unattended).

Print once, before the first action (labels literal, values in the conversation language):

PLAN — brewtools:agent-deadline-setup
INPUT:  <arguments verbatim, or "(empty)">
MODE:   <resolved> — <explicit | matched keyword: X | default>
SCOPE:  <resolved paths / target / level / flags>
DO:     <2-5 imperative bullets>
RESULT: <what the user ends up holding>

What the hooks do (informational — skill does NOT implement)

Hook Event Behavior
agent-deadline-guard.mjs PreToolUse (.*) tracks elapsed per agent_id and narrows the tools, table below
agent-deadline-cleanup.mjs SubagentStop stamps stopped on the agent's state file, never deletes it; prunes state by age
Elapsed Guard
80% of budget non-blocking additionalContext notice
100% permissionDecision:"deny" outside the finalization set: Read, Write, Edit, NotebookEdit, TodoWrite, TaskUpdate, SubagentHandback (the 7 its messages advertise) plus TaskCreate, unlisted by design
hardStopRatio x budget (config key, default 2, must be >1) hard stop: only Write, Edit, SubagentHandback pass, deny reason starts Time budget far exceeded. Stops an agent that loops inside the finalization set (re-reading files, rewriting todos)

SubagentHandback is always allowed: in auto mode a subagent reports through it, so a deny leaves the caller with no report. AskUserQuestion is denied on purpose: a subagent parked on a human answer is unbounded wall-clock time. Agent types in config readOnlyAgentTypes (default Explore, Plan) are told to return what they have now, every other agent to save to a file if the task expects one, then report. The payload has no tool inventory, so an unlisted custom read-only agent is still told to save.

State: <os.tmpdir()>/brewtools-agent-deadline/<session_id>/<agent_id>.json = { start, warned, expired, config, stopped? }, config = path of the governing config file (what uninstall/purge match on); pruned by age: stop stamps past 5 minutes, files and session dirs untouched for 24 h. SubagentStop fires several times per agent, so cleanup keeps the state and the guard decides on the same agent_id's next tool call (time-based: the payload does not tell a continued run from a resumed one):

Stop stamp age Clock When
under 5 minutes original clock continues, the pause counts stop blocked once by another guard (e.g. the agent-return size check), harness nudge, quick SendMessage resume: an over-budget agent can only finalize
5 minutes or more, or state already pruned fresh window from that call a later resume, or any pause that long

Honest limits (verified on CC 2.1.220, stop/resume on 2.1.296 — state these to the user, do not oversell)

Fact Consequence
Time is sampled only at tool-call boundaries An agent stuck inside one 25-min Bash call is not observed in between: a soft deadline, not a timeout. Cap long commands with BASH_MAX_TIMEOUT_MS.
Clock starts at the agent's first tool call, not at spawn Pre-tool thinking time is free.
Stop/resume is the table above A quick resume inherits a spent budget; a 5-minute pause earns a fresh one.
Main session vs subagent is discriminated by absence of agent_id/agent_type Main session = no-op, always.
agent_type for plugin agents (`
Полный SKILL.md на GitHub

Установить agent-deadline-setup в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Read
Bash
AskUserQuestion
Agent

Вложенные файлы

README.mdassets/INSTALL.mdassets/agent-deadline-cleanup.mjsassets/agent-deadline-guard.mjs

FAQ

Что делает скилл agent-deadline-setup?

Installs, configures or removes the agent-deadline hooks (soft wall-clock budget for subagents). Triggers: agent-deadline, subagent timeout, agent time limit, дедлайн агента, таймаут саб-агента.

Как установить скилл agent-deadline-setup?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл agent-deadline-setup запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить agent-deadline-setup с