{"id":"ba81032d-8d43-4402-9798-c887eeac2c44","shortId":"4yB95z","kind":"skill","title":"budget-diminishing-continue","tagline":"Issue continuation nudges while the turn stays under budget, then halt once diminishing returns or the budget cap justify stopping.","description":"# SKILL: Budget Diminishing Continue\n**Domain:** tool-orchestration  \n**Trigger:** Apply when you have a task-level token budget and must decide between continuing and stopping while respecting diminishing returns.\n**Source Pattern:** Distilled from reviewed tool-loop and result-shaping patterns.\n\n## Core Method\nTrack 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.\n\n## Key Rules\n- Initialize `BudgetTracker` at turn start and update `continuationCount`, `lastDeltaTokens`, and `lastGlobalTurnTokens` after each continuation decision.\n- Allow continuations only when under `budget * COMPLETION_THRESHOLD` and the last token deltas are meaningful; otherwise treat it as diminishing returns.\n- When stoppage occurs due to diminishing returns, include the `completionEvent` that records counts, percentages, and elapsed duration so callers can log or surface why the turn ended.\n- If the budget or agent ID is missing, return an immediate `stop` with `completionEvent = null` to avoid undefined behavior.\n- Always compute the continuation message via `getBudgetContinuationMessage` so the user sees consistent phrasing and the tracker returns the tidy `pct`/`turnTokens` metrics.\n\n## Example Application\nIf 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.\n\n## Anti-Patterns (What NOT to do)\n- Do not keep continuing just because the earlier logic returned `continue`; re-run the decision each iteration to respect the latest token deltas.\n- Do not drop the `completionEvent` data when stopping; it contains the telemetry the backend uses to tell budgets apart from user cancellations.","tags":["budget","diminishing","continue","cskill","agents","ychampion","agent-skills","ai-agents","cli","coding-agents","context-engineering","developer-tools"],"capabilities":["skill","source-ychampion","skill-budget-diminishing-continue","topic-agent-skills","topic-ai-agents","topic-cli","topic-coding-agents","topic-context-engineering","topic-developer-tools","topic-mcp","topic-multi-agent","topic-terminal-ui"],"categories":["cskill-agents"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/ychampion/cskill-agents/budget-diminishing-continue","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add ychampion/cskill-agents","source_repo":"https://github.com/ychampion/cskill-agents","install_from":"skills.sh"}},"qualityScore":"0.467","qualityRationale":"deterministic score 0.47 from registry signals: · indexed on github topic:agent-skills · 34 github stars · SKILL.md body (2,274 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-22T06:56:45.674Z","embedding":null,"createdAt":"2026-04-18T22:19:52.111Z","updatedAt":"2026-04-22T06:56:45.674Z","lastSeenAt":"2026-04-22T06:56:45.674Z","tsv":"'100k':264 '90':87,272 'across':96 'add':115 'advanc':261 'agent':219 'allow':167 'also':136 'alway':234 'anti':299 'anti-pattern':298 'apart':347 'appli':34 'applic':257 'avoid':231 'backend':342 'behavior':233 'budget':2,13,21,26,43,172,217,266,346 'budget-diminishing-continu':1 'budgetdecision.action':138 'budgettrack':153 'caller':140,206 'cancel':350 'cap':22 'cell':111 'complet':132,173 'completionev':197,228,333 'completionthreshold':86 'comput':235 'consist':245 'consum':74 'contain':338 'continu':4,6,28,48,79,98,126,165,168,237,267,308,315 'continuationcount':159 'core':68 'count':200 'cumul':72 'data':334 'decid':46 'decis':166,280,320 'default':89 'delta':94,179,328 'detect':102 'differenti':142 'diminish':3,17,27,53,100,118,186,193,285 'diminishing-return':99,284 'distil':57 'domain':29 'drop':331 'due':191 'durat':204 'earlier':312 'elaps':203 'emit':129 'end':214,296 'exampl':256 'fewer':116 'final':131 'flag':287 'forev':108 'gentl':144 'getbudgetcontinuationmessag':240 'growth':275 'guid':137 'halt':15 'hard':147 'hit':271 'id':220 'immedi':225 'includ':195 'initi':152 'intent':297 'issu':5,77 'iter':322 'justifi':23 'keep':103,307 'key':150 'know':293 'last':177 'lastdeltatoken':160 'lastglobalturntoken':162 'latest':326 'level':41 'log':208,282 'logic':313 'loop':62,105,107 'meaning':181 'messag':238 'method':69 'metric':255 'miss':222 'must':45 'nudg':7,80,145 'null':229 'occur':190 'orchestr':32 'otherwis':182 'pattern':56,67,300 'payload':133 'pct':253 'per':75 'percentag':201 'phrase':246 'queri':260 're':317 're-run':316 'reach':124 'record':199 'repeat':97 'respect':52,324 'result':65 'result-shap':64 'return':18,54,101,187,194,223,250,286,314 'review':59 'row':114 'rule':151 'run':318 'see':244 'sever':125 'shape':66 'shrink':95 'signal':149 'skill':25 'skill-budget-diminishing-continue' 'slow':276 'sourc':55 'source-ychampion' 'start':156 'stay':11,84 'stop':24,50,91,127,148,226,279,336 'stoppag':189 'stream':268,295 'surfac':210 'task':40 'task-level':39 'telemetri':292,340 'tell':345 'threshold':119,174 'tidi':252 'token':42,73,93,120,178,265,274,327 'tool':31,61 'tool-loop':60 'tool-orchestr':30 'topic-agent-skills' 'topic-ai-agents' 'topic-cli' 'topic-coding-agents' 'topic-context-engineering' 'topic-developer-tools' 'topic-mcp' 'topic-multi-agent' 'topic-terminal-ui' 'toward':262 'track':70 'tracker':123,135,249 'treat':183 'trigger':33,281 'turn':10,76,155,213 'turntoken':254 'two':110 'undefin':232 'updat':158 'usag':83,270 'use':343 'user':243,290,349 'via':239","prices":[{"id":"183a33e4-9c88-4540-be50-48ab2cf65ce7","listingId":"ba81032d-8d43-4402-9798-c887eeac2c44","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"ychampion","category":"cskill-agents","install_from":"skills.sh"},"createdAt":"2026-04-18T22:19:52.111Z"}],"sources":[{"listingId":"ba81032d-8d43-4402-9798-c887eeac2c44","source":"github","sourceId":"ychampion/cskill-agents/budget-diminishing-continue","sourceUrl":"https://github.com/ychampion/cskill-agents/tree/main/skills/budget-diminishing-continue","isPrimary":false,"firstSeenAt":"2026-04-18T22:19:52.111Z","lastSeenAt":"2026-04-22T06:56:45.674Z"}],"details":{"listingId":"ba81032d-8d43-4402-9798-c887eeac2c44","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"ychampion","slug":"budget-diminishing-continue","github":{"repo":"ychampion/cskill-agents","stars":34,"topics":["agent-skills","ai-agents","cli","coding-agents","context-engineering","developer-tools","mcp","multi-agent","terminal-ui"],"license":"mit","html_url":"https://github.com/ychampion/cskill-agents","pushed_at":"2026-04-04T14:13:23Z","description":"Agent skills for coding CLIs, multi-agent runtimes, context engines, MCP extensions, and terminal tooling. Instead of using claude code's source code, give your agent skills to create your own!","skill_md_sha":"3fabbd73d4f6991ec7d0c96b4dbfd116d8025744","skill_md_path":"skills/budget-diminishing-continue/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/ychampion/cskill-agents/tree/main/skills/budget-diminishing-continue"},"layout":"multi","source":"github","category":"cskill-agents","frontmatter":{"name":"budget-diminishing-continue","description":"Issue continuation nudges while the turn stays under budget, then halt once diminishing returns or the budget cap justify stopping."},"skills_sh_url":"https://skills.sh/ychampion/cskill-agents/budget-diminishing-continue"},"updatedAt":"2026-04-22T06:56:45.674Z"}}