/optimus:permissionsfrom optimus
Configures Claude Code permission rules and a PreToolUse hook to gate destructive operations outside the project while allowing autonomous work inside it.
Ships in optimus. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Under Codex, stop without changing files: this skill configures Claude Code only. Recommend configuring Codex's own sandbox and approval policy instead.
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.
To remove this setup while keeping init's artifacts, use /optimus:reset permissions.
$CLAUDE_PLUGIN_ROOT below means this skill's base directory minus /skills/permissions. Write that absolute path into every Bash command, where the variable can be empty. Read $CLAUDE_PLUGIN_ROOT/skills/init/references/managed-files.md and apply it to the hook and every settings entry this run adds or removes. Do not write .claude/.optimus-version.
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 them (backups and IDE scratch files stay deletable), and blocks history-modifying git operations on protected branches. Inside the project, operations not on the deny list run without prompts.
.claude/settings.json exists, read it in full; if it is not valid JSON, show the parse problem and ask the user how to proceed before changing any file..claude/hooks/restrict-paths.sh already exists (fresh install vs update)..mcp.json exists at the project root, extract the top-level MCP server names for Step 3.If an existing .claude/hooks/restrict-paths.sh differs from the template, apply managed-files.md's Overwrite and migration rules: replace a recorded refresh: "template" copy whose hash still matches without asking. Otherwise read it, show a concrete comparison that separates customizations from older-template drift, and use AskUserQuestion for its Merge / Keep existing / Replace choice. Keep existing also reports the remaining version/behavior difference; Replace discards only the differences explicitly shown.
When creating or replacing as selected, cp $CLAUDE_PLUGIN_ROOT/skills/permissions/templates/hooks/restrict-paths.sh to .claude/hooks/restrict-paths.sh (never re-type it through Read/Write), then apply only approved customizations. Keep-existing does not authorize a later verification step to overwrite that file.
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:
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.restrict-paths.sh.In either case, if .mcp.json was found, add mcp__<server-name> entries to permissions.allow for each server. The result must be valid JSON.
Fix any issue before reporting:
.claude/hooks/restrict-paths.sh matches the template plus only approved customizations — diff against it and run bash -n on the installed copy. Correct accidental copy errors; preserve a file the user chose to keep..claude/settings.json has a PreToolUse entry that resolves to the installed restrict-paths.sh — a merge that drops or misspells it leaves the project unprotected with no other symptom.sed -n '/^strip_backup_suffix() {/,/^}/p;/^is_precious_name() {/,/^}/p;/^is_recoverable_precious_name() {/,/^}/p' .claude/hooks/restrict-paths.sh instead of reading the whole hook. Exclude .git/, dependencies, build output, and .claude/.optimus-reset-backups/. Report untracked matches as protected, distinguishing the intentionally deletable backup/IDE category. Offer specific custom patterns for sensitive files the scan misses..claude/.optimus-managed.json matches the hook written and the settings entries this run added.Report: files created or updated (fresh install vs update), allow/deny counts, detected MCP servers, and the one-line security summary from the top of this skill. Point to this skill's README for the trust model, the auto-mode layering, and the not-OS-sandboxing caveat.
If .claude/CLAUDE.md does not exist, recommend /optimus:init next; otherwise /optimus:unit-test to establish coverage or /optimus:tdd to start developing. Suggest a fresh conversation for it.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub oprogramadorreal/optimus-claude --plugin optimus19 skills in this plugin
/brainstormRuns a structured design conversation — clarifies intent, proposes 2-3 approaches with trade-offs, iterates the design — and writes a user-approved engineering spec to docs/specs/ that /optimus:tdd auto-detects. No implementation happens until the spec is approved. With the scaffold argument, creates docs/product/ steering skeletons instead (never overwrites, authors no content). Recommends /optimus:init first./code-reviewCode ReviewReviews local changes, an open PR/MR, or a branch diff for bugs, security issues, and violations of the project's own coding guidelines, through review lenses applied inline on a small diff or in parallel agents on a larger one. Excludes style and linter-catchable issues. Read-only: applies fixes or posts PR/MR comments only on explicit approval. For an iterative auto-fix loop, use /optimus:deep review./commitStages, commits, and optionally pushes local changes with a Conventional Commits message — always previews and confirms first, and offers a feature branch on protected branches. Modes: "suggest" proposes a message without committing (read-only); "branch [description]" creates and switches to a conventionally named branch, never committing or altering local changes. Multi-repo aware./deepDeep ModeRuns an iterative auto-fix loop on a chosen target — review, refactor, or coverage — dispatching the base skill into fresh subagent contexts per iteration, applying fixes automatically without per-change approval, running tests with bisection on failure, and checkpoint-committing until convergence or the cap. Requires /optimus:init and a test command in .claude/CLAUDE.md./dreamDream — prune and consolidate auto-memoryPrunes and consolidates the project's auto-memory to keep it minimal — deletes stale, wrong, or redundant memories, merges overlapping ones into existing files, and trims the index. Strong bias against growth: never creates new memory files and never stores new facts. Verifies staleness against the current codebase, then presents the plan and asks before deleting. Requires Claude Code auto-memory; run periodically after heavy stretches of work./gauntletRuns a Gauntlet Loop: turns an ambitious goal into a builder/critic prompt judged against a concrete quality bar, confirms with the user, then leads the run until the output beats the bar or the user stops it — or exports a paste-ready /goal prompt for a fresh session. Use for long-horizon goals with an inspectable reference. Long-running; spawns many subagents, edits project files, and commits and pushes finished pieces to a feature branch.Other plugins' skills for the same job