{"id":"59eb4826-19e9-47ae-a6b6-116567d2f443","shortId":"apcrrX","kind":"skill","title":"inherited-flags-for-spawned-teammates","tagline":"Propagate CLI flags/environment variables from the leader into tmux teammates so they share permission mode, plugins, and env configuration.","description":"# SKILL: Inherited Flags For Spawned Teammates\n**Domain:** multi-agent  \n**Trigger:** Apply whenever a teammate or tmux-based sub-agent is spawned and it must inherit the parent’s CLI flags and environment to stay aligned.\n**Source Pattern:** Distilled from reviewed multi-agent coordination and child-runtime patterns.\n\n## Core Method\nCollect the leader’s active CLI options (permission mode, model override, settings path, inline plugins, teammate-mode, chrome override) via `buildInheritedCliFlags`, rendering them into `--flag value` strings that the spawned command receives. Parallelly, spool key environment variables (provider overrides, upstream proxy, credential markers) into `buildInheritedEnvVars`, giving the new process `CLAUDECODE=1`, `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`, and any configured provider/proxy keys so the teammate shares the same backend references. Apply both sets when composing the tmux `env` + command invocation so the teammate behaves identically to its leader.\n\n## Key Rules\n- Propagate permission mode flags only when plan mode is not required; plan mode takes precedence and should block bypass propagation.\n- Always include model, settings, plugin directories, teammate mode, and chrome toggles that the leader specified.\n- Forward provider-specific env vars (e.g., MITM proxy, CLAUDE_CODE_USE_BEDROCK) plus canonical teammates flags so spawned shells hit the same endpoints.\n- Add `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` and `CLAUDECODE=1` to signal the child process about the teammate experiment context.\n\n## Example Application\nWhen a coordinator spawns a tmux teammate for `claude backup`, reuse this skill by calling the helper functions, appending the resulting `--flag` arguments and `env KEY=VAL` string to the `tmux new-session` command so the teammate shares flags, models, plugins, and upstream proxy configuration.\n\n## Anti-Patterns (What NOT to do)\n- Don’t spawn teammates with a blank env—they will default to first-party endpoints and lose plugin context.\n- Don’t forget to skip bypass-permissions flags when plan mode is required; inheriting bypass would violate plan-mode guarantees.\n- Avoid hardcoding env keys; derive the list from the `TEAMMATE_ENV_VARS` constant so new proxies or secrets get forwarded consistently.","tags":["inherited","flags","for","spawned","teammates","cskill","agents","ychampion","agent-skills","ai-agents","cli","coding-agents"],"capabilities":["skill","source-ychampion","skill-inherited-flags-for-spawned-teammates","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/inherited-flags-for-spawned-teammates","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,283 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.678Z","embedding":null,"createdAt":"2026-04-18T22:20:31.116Z","updatedAt":"2026-04-22T06:56:49.678Z","lastSeenAt":"2026-04-22T06:56:49.678Z","tsv":"'1':131,137,236,239 'activ':84 'add':230 'agent':35,47,71,135,234 'align':63 'alway':191 'anti':299 'anti-pattern':298 'append':270 'appli':37,151 'applic':251 'argument':274 'avoid':347 'backend':149 'backup':261 'base':44 'bedrock':218 'behav':164 'blank':311 'block':188 'buildinheritedcliflag':101 'buildinheritedenvvar':125 'bypass':189,331,340 'bypass-permiss':330 'call':266 'canon':220 'child':75,243 'child-runtim':74 'chrome':98,200 'claud':132,215,231,260 'claudecod':130,238 'cli':8,57,85 'code':133,216,232 'collect':80 'command':111,159,286 'compos':155 'configur':25,140,297 'consist':367 'constant':359 'context':249,324 'coordin':72,254 'core':78 'credenti':122 'default':315 'deriv':351 'directori':196 'distil':66 'domain':32 'e.g':212 'endpoint':229,320 'env':24,158,210,276,312,349,357 'environ':60,116 'exampl':250 'experi':248 'experiment':134,233 'first':318 'first-parti':317 'flag':3,28,58,105,174,222,273,291,333 'flags/environment':9 'forget':327 'forward':206,366 'function':269 'get':365 'give':126 'guarante':346 'hardcod':348 'helper':268 'hit':226 'ident':165 'includ':192 'inherit':2,27,53,339 'inherited-flags-for-spawned-teamm':1 'inlin':93 'invoc':160 'key':115,142,169,277,350 'leader':13,82,168,204 'list':353 'lose':322 'marker':123 'method':79 'mitm':213 'mode':21,88,97,173,178,183,198,336,345 'model':89,193,292 'multi':34,70 'multi-ag':33,69 'must':52 'new':128,284,361 'new-sess':283 'option':86 'overrid':90,99,119 'parallelli':113 'parent':55 'parti':319 'path':92 'pattern':65,77,300 'permiss':20,87,172,332 'plan':177,182,335,344 'plan-mod':343 'plugin':22,94,195,293,323 'plus':219 'preced':185 'process':129,244 'propag':7,171,190 'provid':118,208 'provider-specif':207 'provider/proxy':141 'proxi':121,214,296,362 'receiv':112 'refer':150 'render':102 'requir':181,338 'result':272 'reus':262 'review':68 'rule':170 'runtim':76 'secret':364 'session':285 'set':91,153,194 'share':19,146,290 'shell':225 'signal':241 'skill':26,264 'skill-inherited-flags-for-spawned-teammates' 'skip':329 'sourc':64 'source-ychampion' 'spawn':5,30,49,110,224,255,307 'specif':209 'specifi':205 'spool':114 'stay':62 'string':107,279 'sub':46 'sub-ag':45 'take':184 'team':136,235 'teammat':6,16,31,40,96,145,163,197,221,247,258,289,308,356 'teammate-mod':95 'tmux':15,43,157,257,282 'tmux-bas':42 'toggl':201 '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':36 'upstream':120,295 'use':217 'val':278 'valu':106 'var':211,358 'variabl':10,117 'via':100 'violat':342 'whenev':38 'would':341","prices":[{"id":"97be471f-fffd-4c94-b70f-17f265ed7e79","listingId":"59eb4826-19e9-47ae-a6b6-116567d2f443","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:31.116Z"}],"sources":[{"listingId":"59eb4826-19e9-47ae-a6b6-116567d2f443","source":"github","sourceId":"ychampion/cskill-agents/inherited-flags-for-spawned-teammates","sourceUrl":"https://github.com/ychampion/cskill-agents/tree/main/skills/inherited-flags-for-spawned-teammates","isPrimary":false,"firstSeenAt":"2026-04-18T22:20:31.116Z","lastSeenAt":"2026-04-22T06:56:49.678Z"}],"details":{"listingId":"59eb4826-19e9-47ae-a6b6-116567d2f443","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"ychampion","slug":"inherited-flags-for-spawned-teammates","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":"2b099ae3698e6c3af261d1dd82208adfdfd7522a","skill_md_path":"skills/inherited-flags-for-spawned-teammates/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/ychampion/cskill-agents/tree/main/skills/inherited-flags-for-spawned-teammates"},"layout":"multi","source":"github","category":"cskill-agents","frontmatter":{"name":"inherited-flags-for-spawned-teammates","description":"Propagate CLI flags/environment variables from the leader into tmux teammates so they share permission mode, plugins, and env configuration."},"skills_sh_url":"https://skills.sh/ychampion/cskill-agents/inherited-flags-for-spawned-teammates"},"updatedAt":"2026-04-22T06:56:49.678Z"}}