Progress first tool emission

From ychampion/cskill-agents · View interactive version

Progress first tool emission is an AI agent skill from the GitHub repository ychampion/cskill-agents. Emit progress/value updates as soon as they arrive while still buffering final results and handling cancellations or sibling errors.

How to use this skill

Skill file

SKILL: Progress-First Tool Emission

Domain: tool-orchestration

Trigger: Streaming tool runners that produce progress messages or status updates alongside final tool results.

Source Pattern: Distilled from reviewed tool execution, streaming, persistence, and output-budget implementations.

Core Method

Track progress messages separately from final results by adding them to a dedicated buffer as soon as they arrive, and yield those messages to the user immediately, even while the tool is still running. Keep the final tool result buffered until the tool completes, and only then release it respecting the queue order. Handle cancellations, sibling errors, or streaming fallbacks by emitting synthetic tool error messages that describe the reason before closing the tool's slot, so the user sees a consistent progression of updates.

Key Rules

Example Application

For a CLI agent running shell commands that stream stdout/stderr, use this pattern so the UI gets progress-level updates (stream lines, spinner ticks) immediately, yet the final success/failure summary appears once the command finishes and in the correct sequential order relative to other tools.

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.