{"id":"79b58e29-9695-4f20-931a-0589489acbd2","shortId":"gzt2cA","kind":"skill","title":"declarative-read-only-command-allowlists","tagline":"Express shell-command safety as declarative flag maps so tooling knows exactly what passes.","description":"# SKILL: Declarative Read Only Command Allowlists\n**Domain:** shell-validation\n**Trigger:** Use when you want tooling to enforce read-only shell commands by referencing a static map of command names, allowed flags, and supplemental callbacks.\n**Source Pattern:** Distilled from reviewed permission, shell-safety, and worktree-management implementations.\n\n## Core Method\nDefine each safe command as a declarative entry keyed by its full name such as `git diff`, `docker logs`, or `rg`. Each entry should describe allowed flags, argument rules, and any extra validation needed for edge cases. Build the shell policy layer by consulting these tables instead of scattering safety logic across the executor. The executor then only needs to look up the command, validate its flags against the declarative spec, and reject anything not explicitly allowed.\n\n## Key Rules\n- Keep every command entry immutable so runtime validators can memoize them and share the same configuration between BashTool and PowerShellTool.\n- Prefer breaking large maps (git, docker, rg) into shared flag groups (e.g., git stat flags, git color flags) to avoid duplication and to make audits easy.\n- Allow supplemental callbacks only for the few commands that need extra context (e.g., `git remote show` needs remote-name validation) and keep them side-effect-free.\n- Treat unknown commands or flags as rejects, making the declarative tables the only source of truth for allowed operations.\n\n## Example Application\nWhen building a new shell agent, load the read-only command map, validate the tokenized flags for each request against that map, and allow execution only when the command matches an approved entry. This makes the policy auditable and consistent across shells.\n\n## Anti-Patterns (What NOT to do)\n- Don’t hardwire flag lists inside the tool executor; that risks drift between `git diff` and the security policy.\n- Don’t extend the tables casually; every new command or flag should be justified and validated against the same argument rules as the rest of the policy.","tags":["declarative","read","only","command","allowlists","cskill","agents","ychampion","agent-skills","ai-agents","cli","coding-agents"],"capabilities":["skill","source-ychampion","skill-declarative-read-only-command-allowlists","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/declarative-read-only-command-allowlists","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,047 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.938Z","embedding":null,"createdAt":"2026-04-18T22:20:14.030Z","updatedAt":"2026-04-22T06:56:47.938Z","lastSeenAt":"2026-04-22T06:56:47.938Z","tsv":"'across':125,289 'agent':253 'allow':53,99,150,199,244,272 'allowlist':6,27 'anti':292 'anti-pattern':291 'anyth':147 'applic':247 'approv':280 'argument':101,336 'audit':197,286 'avoid':192 'bashtool':170 'break':174 'build':111,249 'callback':57,201 'case':110 'casual':322 'color':189 'command':5,10,26,44,51,77,137,155,206,229,259,277,325 'configur':168 'consist':288 'consult':117 'context':210 'core':72 'declar':2,13,23,80,143,236 'declarative-read-only-command-allowlist':1 'defin':74 'describ':98 'diff':90,312 'distil':60 'docker':91,178 'domain':28 'drift':309 'duplic':193 'e.g':184,211 'easi':198 'edg':109 'effect':225 'enforc':39 'entri':81,96,156,281 'everi':154,323 'exact':19 'exampl':246 'execut':273 'executor':127,129,306 'explicit':149 'express':7 'extend':319 'extra':105,209 'flag':14,54,100,140,182,187,190,231,264,301,327 'free':226 'full':85 'git':89,177,185,188,212,311 'group':183 'hardwir':300 'immut':157 'implement':71 'insid':303 'instead':120 'justifi':330 'keep':153,221 'key':82,151 'know':18 'larg':175 'layer':115 'list':302 'load':254 'log':92 'logic':124 'look':134 'make':196,234,283 'manag':70 'map':15,49,176,260,270 'match':278 'memoiz':162 'method':73 'name':52,86,218 'need':107,132,208,215 'new':251,324 'oper':245 'pass':21 'pattern':59,293 'permiss':63 'polici':114,285,316,343 'powershelltool':172 'prefer':173 'read':3,24,41,257 'read-on':40,256 'referenc':46 'reject':146,233 'remot':213,217 'remote-nam':216 'request':267 'rest':340 'review':62 'rg':94,179 'risk':308 'rule':102,152,337 'runtim':159 'safe':76 'safeti':11,66,123 'scatter':122 'secur':315 'share':165,181 'shell':9,30,43,65,113,252,290 'shell-command':8 'shell-safeti':64 'shell-valid':29 'show':214 'side':224 'side-effect-fre':223 'skill':22 'skill-declarative-read-only-command-allowlists' 'sourc':58,240 'source-ychampion' 'spec':144 'stat':186 'static':48 'supplement':56,200 'tabl':119,237,321 'token':263 'tool':17,37,305 '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':227 'trigger':32 'truth':242 'unknown':228 'use':33 'valid':31,106,138,160,219,261,332 'want':36 'worktre':69 'worktree-manag':68","prices":[{"id":"f6feabc5-4264-4bde-a20e-041e5ea5623c","listingId":"79b58e29-9695-4f20-931a-0589489acbd2","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:14.030Z"}],"sources":[{"listingId":"79b58e29-9695-4f20-931a-0589489acbd2","source":"github","sourceId":"ychampion/cskill-agents/declarative-read-only-command-allowlists","sourceUrl":"https://github.com/ychampion/cskill-agents/tree/main/skills/declarative-read-only-command-allowlists","isPrimary":false,"firstSeenAt":"2026-04-18T22:20:14.030Z","lastSeenAt":"2026-04-22T06:56:47.938Z"}],"details":{"listingId":"79b58e29-9695-4f20-931a-0589489acbd2","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"ychampion","slug":"declarative-read-only-command-allowlists","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":"0346fe1bc2a0f32ec0e36736923f344b75c5d1f6","skill_md_path":"skills/declarative-read-only-command-allowlists/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/ychampion/cskill-agents/tree/main/skills/declarative-read-only-command-allowlists"},"layout":"multi","source":"github","category":"cskill-agents","frontmatter":{"name":"declarative-read-only-command-allowlists","description":"Express shell-command safety as declarative flag maps so tooling knows exactly what passes."},"skills_sh_url":"https://skills.sh/ychampion/cskill-agents/declarative-read-only-command-allowlists"},"updatedAt":"2026-04-22T06:56:47.938Z"}}