declarative-read-only-command-allowlists

declarative-read-only-command-allowlists is a skill for Claude Code, Codex from ychampion/cskill-agents. It costs 26 tokens per session (448 once invoked), scanned A, original, MIT.

A method for defining which shell commands and options are safe to run in read-only tooling. It stores the rules in fixed command and flag maps.

In plain words
What is it for?
Use it when building shell validation for commands such as git, Docker logs, or ripgrep, including extra checks for unusual cases.
Why use it?
It makes command-safety rules easier to inspect and apply consistently, reducing scattered checks and accidental permission gaps.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when building shell validation for commands such as git, Docker logs, or ripgrep, including extra checks for unusual cases.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ychampion/cskill-agents/declarative-read-only-command-allowlists
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ychampion/cskill-agents --skill declarative-read-only-command-allowlists
Clone the repo
git clone --depth 1 https://github.com/ychampion/cskill-agents

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for declarative-read-only-command-allowlists

README.md
[![agentmods](https://agentmods.dev/badge/skills/ychampion/cskill-agents/declarative-read-only-command-allowlists.svg)](https://agentmods.dev/skills/ychampion/cskill-agents/declarative-read-only-command-allowlists)
Your own site
<a href="https://agentmods.dev/skills/ychampion/cskill-agents/declarative-read-only-command-allowlists"><img src="https://agentmods.dev/badge/skills/ychampion/cskill-agents/declarative-read-only-command-allowlists.svg" alt="Measured on agentmods" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 448 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00026 $0.00448
Opus 5 $0.00013 $0.00224
Sonnet 5 $0.00005 $0.00090
Haiku 4.5 $0.00003 $0.00045

Measured 8d ago against content hash 6728988ba0c6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

declarative-read-only-command-allowlists scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/claude-code/skills/declarative-read-only-command-allowlists/SKILL.md · 28 lines

How it starts

The opening of the file, as written. The whole thing — 28 lines — stays where its author put it; the contents beside it link to each section on GitHub.

SKILL: Declarative Read Only Command Allowlists

Domain: shell-validation 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. Source Pattern: Distilled from reviewed permission, shell-safety, and worktree-management implementations.

Core Method

Define 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.

Key Rules

  • Keep every command entry immutable so runtime validators can memoize them and share the same configuration between BashTool and PowerShellTool.
  • 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.
  • 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.
  • Treat unknown commands or flags as rejects, making the declarative tables the only source of truth for allowed operations.

Example Application

When 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.

Anti-Patterns (What NOT to do)

  • Don’t hardwire flag lists inside the tool executor; that risks drift between git diff and the security policy.
  • 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.

Read the full file on GitHub · 28 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 28 lines · 26 tokens per session scan A 6728988ba0c6

Subscribe to this mod's changes

declarative-read-only-command-allowlists is a skill published in the GitHub repository ychampion/cskill-agents (36 stars, last pushed 5mo ago), licensed MIT. It adds 26 tokens to every session and 448 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories