permissions

permissions is a skill for Claude Code from oprogramadorreal/optimus-claude. It costs 64 tokens per session (1,183 once invoked), scanned A, original, MIT.

A configuration tool for Claude Code permissions and safety checks. It adds rules and a hook that restrict file paths, risky deletions, protected Git branches, and sensitive files.

In plain words
What is it for?
Use it after Optimus initialization, or by itself, to configure allowed actions and path, deletion, and branch protections.
Why use it?
It reduces accidental changes outside the project and adds safeguards around destructive actions and protected files.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md; names the AskUserQuestion tool.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the optimus plugin — 19 skills, 2 agents, 3 hooks shipped together

Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add oprogramadorreal/optimus-claude
Claude Code
/plugin install optimus

Made for: Claude Code.

Or install optimus, the plugin that ships this one along with the rest of its 19 skills, 2 agents, 3 hooks.

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 permissions

README.md
[![agentmods](https://agentmods.dev/badge/skills/oprogramadorreal/optimus-claude/permissions.svg)](https://agentmods.dev/skills/oprogramadorreal/optimus-claude/permissions)
Your own site
<a href="https://agentmods.dev/skills/oprogramadorreal/optimus-claude/permissions"><img src="https://agentmods.dev/badge/skills/oprogramadorreal/optimus-claude/permissions.svg" alt="Measured on agentmods" height="20"></a>
Per session 64 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,183 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00064 $0.01183
Opus 5 $0.00032 $0.00592
Sonnet 5 $0.00013 $0.00237
Haiku 4.5 $0.00006 $0.00118

Measured 6d ago against content hash 7c902e204313, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

permissions 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 6d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (templates/hooks/restrict-paths.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/permissions/SKILL.md · 48 lines

How it starts

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

Optimus Permissions

Configure permission rules and a path-restriction hook so Claude Code agents can work autonomously inside the project without constant prompts, while destructive operations outside it stay gated.

Security model in brief: the installed hook prompts on writes and blocks deletes outside the project (Claude's memory store and session scratchpad are exempt), asks before editing any precious unversioned file and blocks deleting the unrecoverable ones (a backup or IDE scratch file only asks), and blocks history-modifying git operations on protected branches. Inside the project, operations not on the deny list run without prompts.

Step 1: Detect existing configuration

  1. If .claude/settings.json exists, read it in full — it will be preserved during the merge.
  2. Note whether .claude/hooks/restrict-paths.sh already exists (fresh install vs update — report which in Step 4).
  3. If .mcp.json exists at the project root, extract the top-level MCP server names for Step 3.

Step 2: Install the path-restriction hook

If an existing .claude/hooks/restrict-paths.sh differs from the template, list the user's modifications (e.g., a customized PROTECTED_BRANCHES array or extra is_precious() patterns) and use AskUserQuestion: Re-apply (Recommended) — install the fresh template, then re-apply the listed customizations (and only those) on top — or Discard them.

Copy $CLAUDE_PLUGIN_ROOT/skills/permissions/templates/hooks/restrict-paths.sh to .claude/hooks/restrict-paths.sh (creating the directory if needed), overwriting any existing version. Copy the contents exactly — never modify the template during copy.

Step 3: Create or update settings.json

Base configuration: $CLAUDE_PLUGIN_ROOT/skills/permissions/templates/settings.json.

If .claude/settings.json does not exist, create it from the template. If it exists, merge — read, merge, write, never blind-overwrite:

  1. permissions.allow — add template entries not already present. Never remove existing entries.
  2. permissions.deny — add template entries not already present. If the existing settings have git deny entries (git as a command, not part of words like github) beyond the template's set, they may block the feature-branch workflow (commit/push) that skills like /optimus:tdd need — list them and use AskUserQuestion: Replace with template set (Recommended) — remove only the extra git deny entries and use the template's (branch protection is still enforced by the hook); non-git deny entries untouched — or Keep all.
  3. hooks.PreToolUse — add the template's hook entry, appending to any existing array; skip if an entry already references restrict-paths.sh.
  4. Preserve everything else — existing PostToolUse hooks, custom sections, all unrelated configuration.

Read the full file on GitHub · 48 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 6d ago First seen · 48 lines · 64 tokens per session scan A 7c902e204313

Subscribe to this mod's changes

permissions is a skill published in the GitHub repository oprogramadorreal/optimus-claude (73 stars, last pushed yesterday), licensed MIT. It adds 64 tokens to every session and 1,183 once invoked, about $0.0003 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

masterplan-detect

Suggest /masterplan import only when legacy masterplan bundle state files (docs/masterplan/ /state.yml at schema 5.x) exist without a matching v8 run. Generic planning artifacts (PLAN.md, TODO.md, ROADMAP.md, design docs, PR task lists) are NOT importable — no /masterplan import can ingest them; mention them only as…

rasatpetabit/masterplan · 116 tokens

claude-md-rules-creator

Authors and audits CLAUDE.md, CLAUDE.local.md and .claude/rules/.md: which scope to use, paths: scoping, @path imports, splitting an oversized file, and why an instruction is being ignored.

anilcancakir/claude-code · 60 tokens

skill-creator

Authors and audits Claude Code skills: frontmatter, directory layout, scope, invocation control, and bundled references or scripts.

anilcancakir/claude-code · 28 tokens

git-master

Git expert: atomic commits with style detection, rebase and squash, and history archaeology through blame, bisect and pickaxe.

anilcancakir/claude-code · 29 tokens

guide

Open the showreel visual setup guide, or walk the user through installing the plugin's dependencies. Use when the user asks how to set up showreel, install its dependencies, pre-warm the capture motor, install vhs, or says "showreel guide", "setup guide", "como instalar o showreel".

HeyRenan/showreel · 70 tokens

showreel

Use when the user wants to explain or document something visually — annotated screenshots, feature demos, flow GIFs, terminal recordings, before/after comparisons — or says "take a screenshot", "record this flow", "make a gif of", "show how this works", "annotate this page", "demo this feature", "grava um gif", "tira…

HeyRenan/showreel · 98 tokens