Agent skill · kochetkov-ma

agent-return-setup

Installs, configures or removes the agent-return hooks (size budget on every subagent's final return message). Triggers: agent-return, subagent return budget, return too large, бюджет ответа агента, размер отчёта саб-агента.

What it needs

About 12k tokens when loaded.

What this skill does

Agent Return Installer/configurator skill. It wires a hook pair plus their shared module (SubagentStart contract + SubagentStop guard) that puts a SIZE budget on every subagent's final return message — or configures/removes them. All runtime behavior lives in the hook files and in a JSON config; this skill only decides mode, scope and the two thresholds, then delegates the file work to the brewcode:hook-creator agent following the runbook. Subagent returns are the largest single context cost in a manager session. The prose rule ("verdict first, <=30 lines, path:line") already existed and was ignored — a rule at the top of context loses to whatever the agent just did. This pair restates it mechanically at the moment it bites: the contract is injected at spawn, and at return the message is sized (chars/4) and compared against two integers. No LLM judge anywhere — a number comparison. Prompt contract Position 1 of $ARGUMENTS is a free-form prompt (RU/EN) — modes and flags are optional and may follow in any order. Nobody types keys: resolve mode + scope FROM the prompt. 1. Strip flags. An explicit mode token anywhere wins outright, no scoring. 2. Else score modes by distinct whole-word keyword hits (table in Step 2). Highest unique score wins. Tie with a destructive mode (purge) -> AskUserQuestion; tie with status -> status; tie of two mutating modes -> the keyword appearing first; all zero -> status. 3. Empty arguments -> status; ask ONE scoping AskUserQuestion only when the answer changes what gets written. A read-only run asks nothing. 4. Outcome-changing ambiguity -> ONE AskUserQuestion (max 4 questions) BEFORE any work. 5. Prose that is not a mode/id/path is still input: extract the id, path or target from it. Then print this block ONCE, before the first action: Labels are literal; values follow the conversation language. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills kochetkov-ma/agent-return-setup

View the source on GitHub

Browse the @skills marketplace