autonomy

A command for viewing or switching project autonomy profiles. An autonomy profile controls which actions an AI coding agent may perform automatically.

In plain words
What is it for?
Use it to check the active profile, review allowed and blocked tools, or switch between safe, moderate, full, and continuous-integration modes.
Why use it?
It makes the project’s current permissions visible and lets you choose a safer or more permissive operating mode.

Command for Claude Code

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.

agentmods
npx agentmods add commands/agoldian/claudenv/autonomy
Clone the repo
git clone --depth 1 https://github.com/AGoldian/claudenv

Made for: Claude Code.

Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 685 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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 $0.00017 $0.00685
Opus 5 $0.00009 $0.00342
Sonnet 5 $0.00003 $0.00137
Haiku 4.5 $0.00002 $0.00068

Measured 2d ago against content hash d643cf374415, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

autonomy scanned grade C with 1 finding 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 2d 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.

Recursive force deletehighDestructive command

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

Safety net: audit logging + hard blocks on rm -rf / and force push to main
scaffold/global/.claude/commands/autonomy.md · 91 lines

How it starts

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

Autonomy Profile Manager

Manage Claude Code autonomy profiles directly from within a session.

Instructions

Parse $ARGUMENTS and execute the matching action below.

1. Determine the action

  • If $ARGUMENTS is empty or status → go to Status
  • If $ARGUMENTS starts with safe, moderate, full, or ci → go to Switch Profile
  • Otherwise → go to Usage Help

2. Status

Show the current autonomy configuration:

  1. Check if .claude/hooks/pre-tool-use.sh exists in the current project directory.
    • If it exists, read the first 5 lines to find the # Profile: comment header and report the active profile name.
    • If it doesn't exist, report "No autonomy profile configured for this project."
  2. Check if .claude/settings.json exists. If so, read it and summarize the permissions (allowedTools, disallowedTools counts).
  3. List available profiles: safe, moderate, full, ci.

3. Switch Profile

The target profile is the first word of $ARGUMENTS. Check for --dry-run flag in the remaining arguments.

If the profile is full: Before proceeding, display this warning:

⚠️  FULL AUTONOMY MODE — UNRESTRICTED ACCESS

This profile grants Claude Code complete access including:
• All file system operations (read, write, delete)
• Credential files (~/.ssh, ~/.aws, ~/.gnupg, ~/.kube, etc.)
• All git operations including force push
• No permission prompts (--dangerously-skip-permissions)

Safety net: audit logging + hard blocks on rm -rf / and force push to main

Ask the user to confirm before proceeding. If they decline, abort.

Apply the profile:

Build the command:

claudenv autonomy --profile <name> --yes --overwrite

If --dry-run is present in $ARGUMENTS, append --dry-run to the command.

Run the command via Bash. If the command fails with "command not found", tell the user:

claudenv is not on PATH. Install it with:
  npm install -g claudenv

After successful execution, show the output and confirm the profile was applied.

Read the full file on GitHub · 91 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. 2d ago First seen · 91 lines · 17 tokens per session scan C d643cf374415

Subscribe to this mod's changes

autonomy is a command published in the GitHub repository AGoldian/claudenv (10 stars, last pushed 2mo ago), licensed MIT. It adds 17 tokens to every session and 685 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.