{"id":"4944e072-ffcc-4397-a26d-66d67f93386c","shortId":"pPuxD8","kind":"skill","title":"preview-first-large-output-messages","tagline":"Annotate persisted tool results with a preview-first header that leads with the saved artifact reference and shows the first slice before truncation.","description":"# SKILL: Preview-First Large Output Messages\n**Domain:** messaging  \n**Trigger:** Apply whenever a persisted tool result response must include a preview so the model sees the start of the output along with the saved artifact reference.  \n**Source Pattern:** Distilled from reviewed large-result persistence and preview UX implementations.\n\n## Core Method\nWhen tool output is too large to show inline, persist the full artifact first and then render a response that leads with the saved-file reference plus a short preview from the beginning of the content. Build the preview from the stored artifact rather than regenerating it from a second formatting path, so what the user sees matches what was actually saved. Include enough metadata to show that the preview is partial and that the full artifact remains available for later reading.\n\n## Key Rules\n- Always begin the visible message with the persisted-file reference and the preview block so readers know the full output was preserved.\n- Generate the preview from the saved content so the preview equals the displayed portion; don’t replay the original stream twice.\n- Include an explicit partial-output marker when the original content exceeded the preview length so downstream renderers know the preview is incomplete.\n- Persisted metadata should note whether the content is JSON so future reads interpret the file correctly.\n\n## Example Application\nWhen a tool returns a 200 KB JSON dump, store it as `tool-results/<id>.json`, then emit a message that points to that file and shows the first couple kilobytes as a preview so the user immediately understands what was returned.\n\n## Anti-Patterns (What NOT to do)\n- Don’t reinject the entire persisted file into the preview; keep the preview length bound to the configured slice.\n- Don’t omit the persisted-file reference; without it, the preview becomes a dead end instead of a usable large-output contract.","tags":["preview","first","large","output","messages","cskill","agents","ychampion","agent-skills","ai-agents","cli","coding-agents"],"capabilities":["skill","source-ychampion","skill-preview-first-large-output-messages","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/preview-first-large-output-messages","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 (1,913 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:54.304Z","embedding":null,"createdAt":"2026-04-18T22:20:59.480Z","updatedAt":"2026-04-22T00:56:54.304Z","lastSeenAt":"2026-04-22T00:56:54.304Z","tsv":"'200':257 'actual':143 'along':61 'alway':167 'annot':7 'anti':295 'anti-pattern':294 'appli':41 'applic':251 'artifact':22,65,94,125,159 'avail':161 'becom':332 'begin':115,168 'block':181 'bound':315 'build':119 'configur':318 'content':118,196,221,240 'contract':343 'core':80 'correct':249 'coupl':281 'dead':334 'display':202 'distil':69 'domain':38 'downstream':227 'dump':260 'emit':269 'end':335 'enough':146 'entir':305 'equal':200 'exampl':250 'exceed':222 'explicit':213 'file':107,176,248,276,307,326 'first':3,15,27,34,95,280 'format':133 'full':93,158,186 'futur':244 'generat':190 'header':16 'immedi':289 'implement':79 'includ':49,145,211 'incomplet':233 'inlin':90 'instead':336 'interpret':246 'json':242,259,267 'kb':258 'keep':311 'key':165 'kilobyt':282 'know':184,229 'larg':4,35,73,87,341 'large-output':340 'large-result':72 'later':163 'lead':18,102 'length':225,314 'marker':217 'match':140 'messag':6,37,39,171,271 'metadata':147,235 'method':81 'model':54 'must':48 'note':237 'omit':322 'origin':208,220 'output':5,36,60,84,187,216,342 'partial':154,215 'partial-output':214 'path':134 'pattern':68,296 'persist':8,44,75,91,175,234,306,325 'persisted-fil':174,324 'plus':109 'point':273 'portion':203 'preserv':189 'preview':2,14,33,51,77,112,121,152,180,192,199,224,231,285,310,313,331 'preview-first':13,32 'preview-first-large-output-messag':1 'rather':126 'read':164,245 'reader':183 'refer':23,66,108,177,327 'regener':128 'reinject':303 'remain':160 'render':98,228 'replay':206 'respons':47,100 'result':10,46,74,266 'return':255,293 'review':71 'rule':166 'save':21,64,106,144,195 'saved-fil':105 'second':132 'see':55,139 'short':111 'show':25,89,149,278 'skill':31 'skill-preview-first-large-output-messages' 'slice':28,319 'sourc':67 'source-ychampion' 'start':57 'store':124,261 'stream':209 'tool':9,45,83,254,265 'tool-result':264 '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' 'trigger':40 'truncat':30 'twice':210 'understand':290 'usabl':339 'user':138,288 'ux':78 'visibl':170 'whenev':42 'whether':238 'without':328","prices":[{"id":"47756a78-6413-4502-95b2-ab1817b92530","listingId":"4944e072-ffcc-4397-a26d-66d67f93386c","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:59.480Z"}],"sources":[{"listingId":"4944e072-ffcc-4397-a26d-66d67f93386c","source":"github","sourceId":"ychampion/cskill-agents/preview-first-large-output-messages","sourceUrl":"https://github.com/ychampion/cskill-agents/tree/main/skills/preview-first-large-output-messages","isPrimary":false,"firstSeenAt":"2026-04-18T22:20:59.480Z","lastSeenAt":"2026-04-22T00:56:54.304Z"}],"details":{"listingId":"4944e072-ffcc-4397-a26d-66d67f93386c","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"ychampion","slug":"preview-first-large-output-messages","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":"e37d97d633eca84f89278f897793dd1aee3b79c1","skill_md_path":"skills/preview-first-large-output-messages/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/ychampion/cskill-agents/tree/main/skills/preview-first-large-output-messages"},"layout":"multi","source":"github","category":"cskill-agents","frontmatter":{"name":"preview-first-large-output-messages","description":"Annotate persisted tool results with a preview-first header that leads with the saved artifact reference and shows the first slice before truncation."},"skills_sh_url":"https://skills.sh/ychampion/cskill-agents/preview-first-large-output-messages"},"updatedAt":"2026-04-22T00:56:54.304Z"}}