{"id":"0782f754-a83e-41d0-ab79-0b029efbb56b","shortId":"Wp8FhE","kind":"skill","title":"modality-preserving-binary-offload","tagline":"Persist binary output with a mime-derived extension and a matching saved-file message so downstream tools keep the right modality.","description":"# SKILL: Modality-Preserving Binary Offload\n**Domain:** tool-result-storage\n**Trigger:** Apply when a tool emits binary content that must be saved out of band without losing the file type or downstream usability.\n**Source Pattern:** Distilled from reviewed tool execution, streaming, persistence, and output-budget implementations.\n\n## Core Method\nPreserve modality by deriving the output extension from MIME type, writing the raw bytes unchanged, and returning a saved-file message that names the type, size, and location. This ensures the resulting file can be opened by the correct downstream tool chain instead of being flattened into an opaque blob with the wrong extension. The offload path remains generic while still honoring modality-specific dispatch.\n\n## Key Rules\n- Strip MIME parameters before extension lookup so content types like application pdf; charset binary still resolve correctly.\n- Use conservative extension mapping: known types get their proper extension and unknown types fall back to `bin`.\n- Write bytes as-is rather than stringifying them, or the saved artifact will no longer be usable by native readers.\n- Return a human-readable saved-file message with MIME, size, and path so downstream agents know what was persisted.\n\n## Example Application\nIf an MCP server returns a PDF or spreadsheet, derive `pdf` or `xlsx` from the MIME type, persist the raw bytes into the tool-results directory, and emit a saved-file message so later steps can hand the file to a PDF reader or spreadsheet parser without guessing the format.\n\n## Anti-Patterns (What NOT to do)\n- Do not save binary content with a generic text extension; downstream tooling dispatch often depends on the suffix.\n- Do not stringify binary bytes before writing; that destroys the original modality and makes the file unusable.","tags":["modality","preserving","binary","offload","cskill","agents","ychampion","agent-skills","ai-agents","cli","coding-agents","context-engineering"],"capabilities":["skill","source-ychampion","skill-modality-preserving-binary-offload","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/modality-preserving-binary-offload","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,815 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:51.170Z","embedding":null,"createdAt":"2026-04-18T22:20:44.949Z","updatedAt":"2026-04-22T06:56:51.170Z","lastSeenAt":"2026-04-22T06:56:51.170Z","tsv":"'agent':219 'anti':279 'anti-pattern':278 'appli':41 'applic':158,225 'artifact':194 'as-i':184 'back':179 'band':54 'bin':181 'binari':4,7,33,46,161,288,306 'blob':129 'budget':75 'byte':92,183,246,307 'chain':121 'charset':160 'conserv':166 'content':47,155,289 'core':77 'correct':118,164 'depend':299 'deriv':13,82,235 'destroy':311 'directori':252 'dispatch':145,297 'distil':65 'domain':35 'downstream':23,61,119,218,295 'emit':45,254 'ensur':109 'exampl':224 'execut':69 'extens':14,85,133,152,167,174,294 'fall':178 'file':20,58,99,112,210,258,266,318 'flatten':125 'format':277 'generic':138,292 'get':171 'guess':275 'hand':264 'honor':141 'human':206 'human-read':205 'implement':76 'instead':122 'keep':25 'key':146 'know':220 'known':169 'later':261 'like':157 'locat':107 'longer':197 'lookup':153 'lose':56 'make':316 'map':168 'match':17 'mcp':228 'messag':21,100,211,259 'method':78 'mime':12,87,149,213,241 'mime-deriv':11 'modal':2,28,31,80,143,314 'modality-preserv':30 'modality-preserving-binary-offload':1 'modality-specif':142 'must':49 'name':102 'nativ':201 'offload':5,34,135 'often':298 'opaqu':128 'open':115 'origin':313 'output':8,74,84 'output-budget':73 'paramet':150 'parser':273 'path':136,216 'pattern':64,280 'pdf':159,232,236,269 'persist':6,71,223,243 'preserv':3,32,79 'proper':173 'rather':187 'raw':91,245 'readabl':207 'reader':202,270 'remain':137 'resolv':163 'result':38,111,251 'return':95,203,230 'review':67 'right':27 'rule':147 'save':19,51,98,193,209,257,287 'saved-fil':18,97,208,256 'server':229 'size':105,214 'skill':29 'skill-modality-preserving-binary-offload' 'sourc':63 'source-ychampion' 'specif':144 'spreadsheet':234,272 'step':262 'still':140,162 'storag':39 'stream':70 'stringifi':189,305 'strip':148 'suffix':302 'text':293 'tool':24,37,44,68,120,250,296 'tool-result':249 'tool-result-storag':36 '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 'type':59,88,104,156,170,177,242 'unchang':93 'unknown':176 'unus':319 'usabl':62,199 'use':165 'without':55,274 'write':89,182,309 'wrong':132 'xlsx':238","prices":[{"id":"cde07216-da50-4b45-abb6-c1fec6025487","listingId":"0782f754-a83e-41d0-ab79-0b029efbb56b","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:44.949Z"}],"sources":[{"listingId":"0782f754-a83e-41d0-ab79-0b029efbb56b","source":"github","sourceId":"ychampion/cskill-agents/modality-preserving-binary-offload","sourceUrl":"https://github.com/ychampion/cskill-agents/tree/main/skills/modality-preserving-binary-offload","isPrimary":false,"firstSeenAt":"2026-04-18T22:20:44.949Z","lastSeenAt":"2026-04-22T06:56:51.170Z"}],"details":{"listingId":"0782f754-a83e-41d0-ab79-0b029efbb56b","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"ychampion","slug":"modality-preserving-binary-offload","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":"6735752416a79f6204687422ba32d0f98b00c3e3","skill_md_path":"skills/modality-preserving-binary-offload/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/ychampion/cskill-agents/tree/main/skills/modality-preserving-binary-offload"},"layout":"multi","source":"github","category":"cskill-agents","frontmatter":{"name":"modality-preserving-binary-offload","description":"Persist binary output with a mime-derived extension and a matching saved-file message so downstream tools keep the right modality."},"skills_sh_url":"https://skills.sh/ychampion/cskill-agents/modality-preserving-binary-offload"},"updatedAt":"2026-04-22T06:56:51.170Z"}}