{"id":"f09f32b7-947b-43fe-96ea-c41162623ead","shortId":"tyD4zA","kind":"skill","title":"cross-shell-command-safety-maps","tagline":"Describe how to centralize cross-platform safe commands, UNC detection, and per-shell path guards so every shell tool shares the same policy.","description":"# SKILL: Cross Shell Command Safety Maps\n**Domain:** security\n**Trigger:** Apply this when you need to enforce identical permissions across bash/PowerShell, detect UNC paths, and keep dangerous config files hidden to both shells.\n**Source Pattern:** Distilled from reviewed permission, shell-safety, and worktree-management implementations.\n\n## Core Method\nMaintain one shared policy source for command allowlists, UNC-path rejection, and sensitive-path checks, then have both the Bash and PowerShell entrypoints consume that same policy. Each shell may parse its own command syntax, but the decisions about what is read-only, what path patterns are dangerous, and when to reject remote shares should come from the same central maps. This keeps cross-platform behavior aligned and prevents one shell surface from quietly drifting into a weaker security posture.\n\n## Key Rules\n- Only include commands that behave predictably across both shells; the shared allowlist should stay conservative and portable.\n- Perform UNC detection before executing commands on Windows, covering backslash, forward slash, mixed separators, IPv4/IPv6 addresses, and WebDAV patterns.\n- Normalize candidate paths before comparison and reuse the same sensitive-path deny rules in both shell tools.\n- Keep these maps static so callers can memoize them and still share them among multiple shell entry points.\n\n## Example Application\nWhen launching either shell tool, load the shared read-only command map and run the same UNC-path and sensitive-path checks before execution. A path that is rejected in Bash should be rejected for the same reason in PowerShell.\n\n## Anti-Patterns (What NOT to do)\n- Don’t re-derive UNC heuristics per tool; this invites Windows credential-exfiltration bugs.\n- Don’t treat UNIX-only commands as cross-shell safe; the shared list must be conservative and portable.","tags":["cross","shell","command","safety","maps","cskill","agents","ychampion","agent-skills","ai-agents","cli","coding-agents"],"capabilities":["skill","source-ychampion","skill-cross-shell-command-safety-maps","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/cross-shell-command-safety-maps","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,867 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:47.637Z","embedding":null,"createdAt":"2026-04-18T22:20:10.962Z","updatedAt":"2026-04-22T06:56:47.637Z","lastSeenAt":"2026-04-22T06:56:47.637Z","tsv":"'across':50,172 'address':198 'align':150 'allowlist':87,177 'among':233 'anti':284 'anti-pattern':283 'appli':41 'applic':239 'backslash':192 'bash':101,273 'bash/powershell':51 'behav':170 'behavior':149 'bug':305 'caller':225 'candid':203 'central':10,142 'check':96,264 'come':138 'command':4,15,35,86,115,168,188,251,312 'comparison':206 'config':58 'conserv':180,323 'consum':105 'core':78 'cover':191 'credenti':303 'credential-exfiltr':302 'cross':2,12,33,147,315 'cross-platform':11,146 'cross-shel':314 'cross-shell-command-safety-map':1 'danger':57,130 'decis':119 'deni':214 'deriv':294 'describ':7 'detect':17,52,185 'distil':66 'domain':38 'drift':158 'either':242 'enforc':47 'entri':236 'entrypoint':104 'everi':25 'exampl':238 'execut':187,266 'exfiltr':304 'file':59 'forward':193 'guard':23 'heurist':296 'hidden':60 'ident':48 'implement':77 'includ':167 'invit':300 'ipv4/ipv6':197 'keep':56,145,220 'key':164 'launch':241 'list':320 'load':245 'maintain':80 'manag':76 'map':6,37,143,222,252 'may':111 'memoiz':227 'method':79 'mix':195 'multipl':234 'must':321 'need':45 'normal':202 'one':81,153 'pars':112 'path':22,54,90,95,127,204,213,259,263,268 'pattern':65,128,201,285 'per':20,297 'per-shel':19 'perform':183 'permiss':49,69 'platform':13,148 'point':237 'polici':31,83,108 'portabl':182,325 'postur':163 'powershel':103,282 'predict':171 'prevent':152 'quiet':157 're':293 're-der':292 'read':124,249 'read-on':123,248 'reason':280 'reject':91,134,271,276 'remot':135 'reus':208 'review':68 'rule':165,215 'run':254 'safe':14,317 'safeti':5,36,72 'secur':39,162 'sensit':94,212,262 'sensitive-path':93,211,261 'separ':196 'share':28,82,136,176,231,247,319 'shell':3,21,26,34,63,71,110,154,174,218,235,243,316 'shell-safeti':70 'skill':32 'skill-cross-shell-command-safety-maps' 'slash':194 'sourc':64,84 'source-ychampion' 'static':223 'stay':179 'still':230 'surfac':155 'syntax':116 'tool':27,219,244,298 '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' 'treat':308 'trigger':40 'unc':16,53,89,184,258,295 'unc-path':88,257 'unix':310 'unix-on':309 'weaker':161 'webdav':200 'window':190,301 'worktre':75 'worktree-manag':74","prices":[{"id":"fdfe564f-9900-497a-ba6e-224e3a28dec7","listingId":"f09f32b7-947b-43fe-96ea-c41162623ead","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:10.962Z"}],"sources":[{"listingId":"f09f32b7-947b-43fe-96ea-c41162623ead","source":"github","sourceId":"ychampion/cskill-agents/cross-shell-command-safety-maps","sourceUrl":"https://github.com/ychampion/cskill-agents/tree/main/skills/cross-shell-command-safety-maps","isPrimary":false,"firstSeenAt":"2026-04-18T22:20:10.962Z","lastSeenAt":"2026-04-22T06:56:47.637Z"}],"details":{"listingId":"f09f32b7-947b-43fe-96ea-c41162623ead","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"ychampion","slug":"cross-shell-command-safety-maps","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":"49aab5d8de5404a625dcf30eddf3c31d3f523dd4","skill_md_path":"skills/cross-shell-command-safety-maps/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/ychampion/cskill-agents/tree/main/skills/cross-shell-command-safety-maps"},"layout":"multi","source":"github","category":"cskill-agents","frontmatter":{"name":"cross-shell-command-safety-maps","description":"Describe how to centralize cross-platform safe commands, UNC detection, and per-shell path guards so every shell tool shares the same policy."},"skills_sh_url":"https://skills.sh/ychampion/cskill-agents/cross-shell-command-safety-maps"},"updatedAt":"2026-04-22T06:56:47.637Z"}}