applying-a-permission-policy

applying-a-permission-policy is a skill for Claude Code, Codex from mvschwarz/openrig. It costs 111 tokens per session (4,782 once invoked), scanned D, original, Apache-2.0.

A guide to applying one permission policy across different coding-agent tools, including Claude, Codex, and Pi. A permission policy controls what an agent may read, change, or run.

In plain words
What is it for?
Use it to configure permissions for an agent seat, check the translation in a safe environment, and apply or hand-edit the resulting settings.
Why use it?
It helps translate the same rules into each tool’s configuration while accounting for differences and possible version changes.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also reads ~/.codex or $CODEX_HOME. Also seen: reads .claude/ paths; mentions Claude Code; mentions Codex.

Part of the openrig-core plugin — 19 skills shipped together

Good fit Use it to configure permissions for an agent seat, check the translation in a safe environment, and apply or hand-edit the resulting settings.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mvschwarz/openrig/applying-a-permission-policy
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 mvschwarz/openrig --skill applying-a-permission-policy
Clone the repo
git clone --depth 1 https://github.com/mvschwarz/openrig

Made for: Claude Code, Codex.

Or install openrig-core, the plugin that ships this one along with the rest of its 19 skills.

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 applying-a-permission-policy

README.md
[![agentmods](https://agentmods.dev/badge/skills/mvschwarz/openrig/applying-a-permission-policy/github.svg)](https://agentmods.dev/skills/mvschwarz/openrig/applying-a-permission-policy)
Your own site
<a href="https://agentmods.dev/skills/mvschwarz/openrig/applying-a-permission-policy"><img src="https://agentmods.dev/badge/skills/mvschwarz/openrig/applying-a-permission-policy/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for applying-a-permission-policy

Your own site · 80×15
<a href="https://agentmods.dev/skills/mvschwarz/openrig/applying-a-permission-policy"><img src="https://agentmods.dev/badge/skills/mvschwarz/openrig/applying-a-permission-policy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 111 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,782 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 3 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.00111 $0.04782
Opus 5 $0.00056 $0.02391
Sonnet 5 $0.00022 $0.00956
Haiku 4.5 $0.00011 $0.00478

Measured yesterday against content hash fa4eaa920a4f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade D, and why

applying-a-permission-policy scanned grade D with 3 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 yesterday.

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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

6. **Back up the current config**, then write. Prefer the **user-level** file (`~/.claude/settings.json`) for durable policy — it's the clobber-resistant tier (deny wins across the union). **ALWAYS include `defaultMode:

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

| delete_everything | `Bash(rm -rf:*)` `Bash(rm -fr:*)` | **best_effort** — same leak → default to `ask`, never a silent deny |

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

5. **Resolve best-effort actions by the built-in's rule FIRST, then ask only on genuine ambiguity.** Best-effort destructive actions (`force_push`, `delete_files`, `delete_everything`, `read_secrets`) default to **`ask`*
packages/daemon/assets/plugins/openrig-core/skills/applying-a-permission-policy/SKILL.md · 118 lines

How it starts

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

Applying a permission policy

Translation is best-effort — read this first

This skill provides the policy schema and OpenRig's best current understanding of how to translate it to each harness. That guidance is best-effort and version-stamped: harness permission surfaces change frequently across versions, so a mapping that is correct today can drift on a later release. When you apply a config-surface policy:

  • Verify against the current docs for your installed harness version. Treat this skill's tables as version-stamped starting points (see tested_against), not settled truth.
  • Prefer testing in a protected or disposable environment first. An incorrect write can lock a seat out or over-permit it, so confirm the format before applying it to a live seat.
  • Hand-editing via the harness's own settings tools is always a valid path. If a translation is uncertain, setting the policy directly — or asking the user to — is a legitimate outcome, not a failure.

The reliable, deterministic parts are the blunt instruments: the YOLO full-bypass flag and the floor (Claude acceptEdits / Codex workspace-write), which ride the stable launch-flag surface. Fine-grained config-rule translation — the allow/ask/deny prefix rules and the Codex posture — is the best-effort part and carries no guarantee of exact fidelity. If a translation looks wrong, fall back to a blunt instrument or a direct hand-edit.

⚠ Read this preamble first — why this is a SKILL, not a script (do not "improve" it into a deterministic updater)

Harness permission formats are a moving target. The exact fact this skill is stamped against — Claude Code 2.1.220 permission rules are prefix-only (no flag-precise Bash match) — is version-specific; the rule grammar can change on the next point release. A hardcoded/deterministic updater would foot-gun the instant it does, and a wrong permission write can lock a seat out or silently over-permit it. So the maintained artifact is this caveated, version-stamped skill that an agent reads and applies interactively, grounding in the live format — never a code path that writes blindly. If you are tempted to replace this with a deterministic projector: that temptation is the bug this preamble exists to stop.

Read the full file on GitHub · 118 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. yesterday Changed · -3 lines fa4eaa920a4f
  2. 10d ago First seen · 121 lines · 111 tokens per session scan D 7fde2a1220ba

Subscribe to this mod's changes

applying-a-permission-policy is a skill published in the GitHub repository mvschwarz/openrig (66 stars, last pushed today), licensed Apache-2.0. It adds 111 tokens to every session and 4,782 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it D with 3 findings (reads agent configuration directories, recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.