{"id":"6744a687-6db5-4b4a-8c51-1463ea7c3709","shortId":"cg7DME","kind":"skill","title":"ordered-streaming-tool-execution","tagline":"Buffer and execute streaming tool calls with concurrency awareness so results appear in request order even when multiple runners overlap.","description":"# SKILL: Ordered Streaming Tool Execution\n**Domain:** tool-orchestration  \n**Trigger:** Streaming toolUse input where progress must be shown in the original queue order, even if some tools run concurrently.  \n**Source Pattern:** Distilled from reviewed tool execution, streaming, persistence, and output-budget implementations.\n\n## Core Method\nMaintain an ordered queue of tracked tools whose statuses include `queued`, `executing`, and `completed`. When a tool becomes eligible, start it only if no incompatible executor is running (non-concurrency-safe tools block the queue) and mark it `executing`. Buffer results and progress messages per tool and never yield them until all previous tools have finished; only then append their buffered messages to the output stream in the original order. This preserves a deterministic user view while still allowing safe tools to run in parallel.\n\n## Key Rules\n- Represent each tool use with a tracked descriptor holding queue position, assistant metadata, context modifiers, pending progress, and results.\n- Only start tools when can execute tool permits; concurrent-safe ones may run alongside others but non-safe ones must wait for the queue drain.\n- Buffer output (results/progress/heuristics) and flush it only after every earlier tool has resolved, so ordering cannot be disrupted by race conditions.\n\n## Example Application\nImplement a streaming tool runner for a conversational agent by streaming helper tasks into the executor, letting concurrency-safe tools run in parallel, and deferring emission until all prior toolUse entries have completed so the transcript matches the request order.\n\n## Anti-Patterns (What NOT to do)\n- Emit tool results as soon as they arrive in the background, which scrambles the perceived order and confuses the user.\n- Ignore is concurrency safe and start mutually exclusive tools simultaneously, risking inconsistent shared resources.\n- Fail to keep pending progress separate and merge them out of order, which causes partial updates to interleave incorrectly.","tags":["ordered","streaming","tool","execution","cskill","agents","ychampion","agent-skills","ai-agents","cli","coding-agents","context-engineering"],"capabilities":["skill","source-ychampion","skill-ordered-streaming-tool-execution","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/ordered-streaming-tool-execution","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,041 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-22T00:56:53.413Z","embedding":null,"createdAt":"2026-04-18T22:20:51.042Z","updatedAt":"2026-04-22T00:56:53.413Z","lastSeenAt":"2026-04-22T00:56:53.413Z","tsv":"'agent':236 'allow':150 'alongsid':192 'anti':270 'anti-pattern':269 'appear':17 'append':130 'applic':227 'arriv':283 'assist':170 'awar':14 'background':286 'becom':88 'block':104 'budget':67 'buffer':6,111,132,205 'call':11 'cannot':220 'caus':323 'complet':84,261 'concurr':13,54,101,187,246,298 'concurrency-saf':245 'concurrent-saf':186 'condit':225 'confus':293 'context':172 'convers':235 'core':69 'defer':253 'descriptor':166 'determinist':145 'disrupt':222 'distil':57 'domain':31 'drain':204 'earlier':214 'elig':89 'emiss':254 'emit':276 'entri':259 'even':21,49 'everi':213 'exampl':226 'exclus':303 'execut':5,8,30,61,82,110,183 'executor':96,243 'fail':310 'finish':127 'flush':209 'helper':239 'hold':167 'ignor':296 'implement':68,228 'includ':80 'incompat':95 'inconsist':307 'incorrect':328 'input':38 'interleav':327 'keep':312 'key':157 'let':244 'maintain':71 'mark':108 'match':265 'may':190 'merg':317 'messag':115,133 'metadata':171 'method':70 'modifi':173 'multipl':23 'must':41,199 'mutual':302 'never':119 'non':100,196 'non-concurrency-saf':99 'non-saf':195 'one':189,198 'orchestr':34 'order':2,20,27,48,73,141,219,268,291,321 'ordered-streaming-tool-execut':1 'origin':46,140 'other':193 'output':66,136,206 'output-budget':65 'overlap':25 'parallel':156,251 'partial':324 'pattern':56,271 'pend':174,313 'per':116 'perceiv':290 'permit':185 'persist':63 'posit':169 'preserv':143 'previous':124 'prior':257 'progress':40,114,175,314 'queu':81 'queue':47,74,106,168,203 'race':224 'repres':159 'request':19,267 'resolv':217 'resourc':309 'result':16,112,177,278 'results/progress/heuristics':207 'review':59 'risk':306 'rule':158 'run':53,98,154,191,249 'runner':24,232 'safe':102,151,188,197,247,299 'scrambl':288 'separ':315 'share':308 'shown':43 'simultan':305 'skill':26 'skill-ordered-streaming-tool-execution' 'soon':280 'sourc':55 'source-ychampion' 'start':90,179,301 'status':79 'still':149 'stream':3,9,28,36,62,137,230,238 'task':240 'tool':4,10,29,33,52,60,77,87,103,117,125,152,161,180,184,215,231,248,277,304 'tool-orchestr':32 'toolus':37,258 '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' 'track':76,165 'transcript':264 'trigger':35 'updat':325 'use':162 'user':146,295 'view':147 'wait':200 'whose':78 'yield':120","prices":[{"id":"f800c44f-c3d1-4e11-957e-f99bc69f1060","listingId":"6744a687-6db5-4b4a-8c51-1463ea7c3709","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:20:51.042Z"}],"sources":[{"listingId":"6744a687-6db5-4b4a-8c51-1463ea7c3709","source":"github","sourceId":"ychampion/cskill-agents/ordered-streaming-tool-execution","sourceUrl":"https://github.com/ychampion/cskill-agents/tree/main/skills/ordered-streaming-tool-execution","isPrimary":false,"firstSeenAt":"2026-04-18T22:20:51.042Z","lastSeenAt":"2026-04-22T00:56:53.413Z"}],"details":{"listingId":"6744a687-6db5-4b4a-8c51-1463ea7c3709","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"ychampion","slug":"ordered-streaming-tool-execution","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":"26b4c640a0acc16489b58f7b19d709c575d6ec01","skill_md_path":"skills/ordered-streaming-tool-execution/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/ychampion/cskill-agents/tree/main/skills/ordered-streaming-tool-execution"},"layout":"multi","source":"github","category":"cskill-agents","frontmatter":{"name":"ordered-streaming-tool-execution","description":"Buffer and execute streaming tool calls with concurrency awareness so results appear in request order even when multiple runners overlap."},"skills_sh_url":"https://skills.sh/ychampion/cskill-agents/ordered-streaming-tool-execution"},"updatedAt":"2026-04-22T00:56:53.413Z"}}