{"id":"50b4647f-3656-4edc-b51c-9d73970a9de5","shortId":"A6kQW7","kind":"skill","title":"hook-context-attachment-injection","tagline":"Surface hook-provided startup context by packaging it as metadata attachments before the agent's first request.","description":"# SKILL: Hook Context Attachment Injection\n**Domain:** multi-agent\n**Trigger:** Use when startup hooks generate extra context that a child agent should see before it makes its first model request.\n**Source Pattern:** Distilled from reviewed startup-hook context seeding flows.\n\n## Core Method\nCollect any hook-provided context while the child agent is starting, combine it into a structured metadata attachment, and inject that attachment into the initial conversation state before the query loop begins. This lets startup hooks enrich the child agent without mutating shared parent state or pretending the hook output came from the user. Keeping the payload as metadata preserves provenance and keeps the startup context easy to reason about.\n\n## Key Rules\n- Gather hook output before the first request so the initial reasoning step sees the same context as later logging and transcript paths.\n- Package hook output as metadata attachments, not as synthetic user or assistant text.\n- Keep attachment construction deterministic so retries and resumes produce the same startup context.\n\n## Example Application\nIf a startup hook gathers repository hints and policy notes for a spawned coding agent, inject them as one metadata attachment before the child begins planning.\n\n## Anti-Patterns (What NOT to do)\n- Do not append startup hook context after the first model turn.\n- Do not mix hook metadata into user-authored content.\n- Do not mutate shared parent conversation state just to deliver child-specific startup hints.","tags":["hook","context","attachment","injection","cskill","agents","ychampion","agent-skills","ai-agents","cli","coding-agents","context-engineering"],"capabilities":["skill","source-ychampion","skill-hook-context-attachment-injection","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/hook-context-attachment-injection","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,519 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:49.477Z","embedding":null,"createdAt":"2026-04-18T22:20:29.539Z","updatedAt":"2026-04-22T06:56:49.477Z","lastSeenAt":"2026-04-22T06:56:49.477Z","tsv":"'agent':20,32,44,76,107,204 'anti':217 'anti-pattern':216 'append':225 'applic':189 'assist':173 'attach':4,17,27,85,89,167,176,210 'author':242 'begin':99,214 'came':118 'child':43,75,106,213,255 'child-specif':254 'code':203 'collect':67 'combin':79 'construct':177 'content':243 'context':3,11,26,40,62,72,133,155,187,228 'convers':93,249 'core':65 'deliv':253 'determinist':178 'distil':56 'domain':29 'easi':134 'enrich':104 'exampl':188 'extra':39 'first':22,51,145,231 'flow':64 'gather':140,194 'generat':38 'hint':196,258 'hook':2,8,25,37,61,70,103,116,141,163,193,227,237 'hook-context-attachment-inject':1 'hook-provid':7,69 'initi':92,149 'inject':5,28,87,205 'keep':122,130,175 'key':138 'later':157 'let':101 'log':158 'loop':98 'make':49 'metadata':16,84,126,166,209,238 'method':66 'mix':236 'model':52,232 'multi':31 'multi-ag':30 'mutat':109,246 'note':199 'one':208 'output':117,142,164 'packag':13,162 'parent':111,248 'path':161 'pattern':55,218 'payload':124 'plan':215 'polici':198 'preserv':127 'pretend':114 'produc':183 'proven':128 'provid':9,71 'queri':97 'reason':136,150 'repositori':195 'request':23,53,146 'resum':182 'retri':180 'review':58 'rule':139 'see':46,152 'seed':63 'share':110,247 'skill':24 'skill-hook-context-attachment-injection' 'sourc':54 'source-ychampion' 'spawn':202 'specif':256 'start':78 'startup':10,36,60,102,132,186,192,226,257 'startup-hook':59 'state':94,112,250 'step':151 'structur':83 'surfac':6 'synthet':170 'text':174 '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' 'transcript':160 'trigger':33 'turn':233 'use':34 'user':121,171,241 'user-author':240 'without':108","prices":[{"id":"781ff018-58da-4a56-90b2-06c028337c81","listingId":"50b4647f-3656-4edc-b51c-9d73970a9de5","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:29.539Z"}],"sources":[{"listingId":"50b4647f-3656-4edc-b51c-9d73970a9de5","source":"github","sourceId":"ychampion/cskill-agents/hook-context-attachment-injection","sourceUrl":"https://github.com/ychampion/cskill-agents/tree/main/skills/hook-context-attachment-injection","isPrimary":false,"firstSeenAt":"2026-04-18T22:20:29.539Z","lastSeenAt":"2026-04-22T06:56:49.477Z"}],"details":{"listingId":"50b4647f-3656-4edc-b51c-9d73970a9de5","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"ychampion","slug":"hook-context-attachment-injection","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":"0725e3e8e14139a93a8968b489aabda86d00db10","skill_md_path":"skills/hook-context-attachment-injection/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/ychampion/cskill-agents/tree/main/skills/hook-context-attachment-injection"},"layout":"multi","source":"github","category":"cskill-agents","frontmatter":{"name":"hook-context-attachment-injection","description":"Surface hook-provided startup context by packaging it as metadata attachments before the agent's first request."},"skills_sh_url":"https://skills.sh/ychampion/cskill-agents/hook-context-attachment-injection"},"updatedAt":"2026-04-22T06:56:49.477Z"}}