Budget diminishing continue

From ychampion/cskill-agents · View interactive version

Budget diminishing continue is an AI agent skill from the GitHub repository ychampion/cskill-agents. Issue continuation nudges while the turn stays under budget, then halt once diminishing returns or the budget cap justify stopping.

How to use this skill

Skill file

SKILL: Budget Diminishing Continue

Domain: tool-orchestration

Trigger: Apply when you have a task-level token budget and must decide between continuing and stopping while respecting diminishing returns.

Source Pattern: Distilled from reviewed tool-loop and result-shaping patterns.

Core Method

Track the cumulative tokens consumed per turn, issue a continuation nudge while the usage stays below completionThreshold (90% by default), and stop once token deltas shrink across repeated continuations. Diminishing-return detection keeps the loop from looping forever: once two cells in a row add fewer than DIMINISHING_THRESHOLD tokens, or the tracker reached several continuations, stop and emit the final completion payload. The tracker also guides budgetDecision.action so callers can differentiate between gentle nudges and hard stop signals.

Key Rules

Example Application

If a query advances toward a 100k token budget, continue streaming until usage hits 90% or token growth slows; when the stop decision triggers, log the diminishing-returns flag so both user and telemetry know the stream ended intentionally.

Anti-Patterns (What NOT to do)

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.