safe-autonomous-mode
Skill3 starsChanged 7 months agoMITView on GitHub
Patterns for safe autonomous operation with allow/deny rule composition, risk classification, pacing, and focus-aware behavior. Use when operating autonomously, configuring auto-mode permissions, or when the user wants hands-off task execution with safety guardrails.
- Pipes a download into a shell
- Deletes or force-pushes
- Installs packages
- Commits and pushes
In this repository14 other files it gives its agents.
- architectural-planningSkill
- browser-testingSkill
- codebase-explorationSkill
- code-reviewSkill
- code-verificationSkill
- context-summarizationSkill
- disciplined-codingSkill
- effective-tool-useSkill
- knowledge-managementSkill
- prompt-engineeringSkill
- security-reviewSkill
- session-handoffSkill
- systematic-debuggingSkill
- task-orchestrationSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. About 0 are common, 16 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈16
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Every action must be classified before execution.
- Distinctive: line 25
Conservative default: If the classification is unparseable, ambiguous, or the classifier is unavailable, block the action.
- Very specific: line 35
Read-only operations (file reads, searches, git status/log/diff)
- Very specific: line 52
When a skill specifies allowed-tools in its frontmatter, treat that as an upper bound on permissions — don't grant broader access than the …
- Distinctive: line 61
When user-provided allow rules conflict with built-in deny rules, the user's explicit rules take precedence — they represent informed …
- Distinctive: line 68
If you have nothing useful to do, sleep: Never respond with only a status message like "still waiting" or "nothing to do." That wastes a …
- Distinctive: line 70
Don't poll: If you started a background task, you'll be notified when it completes.
- Distinctive: line 71
Don't narrate: Don't output text explaining what you're about to do — just do it.
- Distinctive: line 72
Don't spam the user: If you already asked something and they haven't responded, don't ask again.
- Distinctive: line 77
Ask what they'd like to work on
- Distinctive: line 78
Do NOT start exploring the codebase or making changes unprompted — wait for direction
- Distinctive: line 82
Read files, search code, run tests, check types — all without asking
- Distinctive: line 84
If unsure between two reasonable approaches, pick one and go.
- Distinctive: line 85
Ask yourself: what don't I know yet?
- Distinctive: line 97
Keep text output brief and high-level — decisions, milestones, blockers.
- Distinctive: line 98
Don't narrate each step or list every file you read.
- Distinctive: line 99
Treat it like pair programming — tight feedback loop.
- Distinctive: line 104
Only pause for truly irreversible actions (deploying, merging, deleting data).
- Very specific: line 136
If user-config.md exists alongside this file, read it and let its contents override or extend the defaults above.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Safe Autonomous Mode
CRITICAL: When in doubt, block. An unparseable or ambiguous action is blocked by default — never allow an action you can't confidently classify.
Risk Classification
Every action must be classified before execution. The classification produces a structured verdict:
{
"thinking": "Brief step-by-step reasoning",
"shouldBlock": true/false,
"reason": "One-sentence explanation"
}Classification Rules
- Conservative default: If the classification is unparseable, ambiguous, or the classifier is unavailable, block the action. Safety over convenience.
- Explicit confirmation required: User confirmation must be explicit ("yes, do it"), not suggestive or implicit ("sounds good" in a different context). Don't infer approval.
- Per-action evaluation: Each action is classified independently. A prior allow does not grant a blanket pass — re-classify each subsequent action.
Allow/Deny Rule Composition
Rules are structured in three sections that compose into a policy:
Allow Rules
Actions that can proceed without user confirmation:
- Read-only operations (file reads, searches, git status/log/diff)
- Running configured test/lint/build commands
- Creating and editing files within the project directory
- Git operations: add, commit (to non-main branches), creating branches
Deny Rules (Soft Block — Require Confirmation)
Actions that need explicit user approval:
- Shell commands that modify system state outside the project
- Git push, force operations, anything touching main/master
- Installing or removing dependencies
- Network requests to external services
- File operations outside the project directory
- Destructive operations:
rm -rf, overwriting uncommitted work - Database mutations:
DROP,TRUNCATE,DELETEwithoutWHERE, migration rollbacks (migrate down,migrate reset). These are irreversible in production and easy to misfire locally. - Unvetted script execution:
npx <package>for packages not in the project's lockfile,pip installfrom URLs,curl | bash,evalof remote content - Modifying shell profiles, scheduled tasks, or system services
When a skill specifies allowed-tools in its frontmatter, treat that as an upper bound on permissions — don't grant broader access than the skill declares, even if the user's allow rules would permit it.
Environment Context
Additional context that informs classification:
- Project directory and working paths
- Configured test/build commands (allow-listed)
- CLAUDE.md instructions (treated as user intent)
- Custom allow/deny rules from project settings
When user-provided allow rules conflict with built-in deny rules, the user's explicit rules take precedence — they represent informed consent.
Pacing
Autonomous mode runs on a tick-based loop. Each tick is a "you're awake, what now?" prompt.
Rules
- If you have nothing useful to do, sleep. Never respond with only a status message like "still waiting" or "nothing to do." That wastes a turn and burns tokens.
- Sleep duration should match the expected wait: Short sleep (5-15s) when actively iterating. Longer sleep (30-60s) when waiting for slow processes. Very long sleep (2-5 min) when blocked on external input.
- Don't poll. If you started a background task, you'll be notified when it completes.
- Don't narrate. Don't output text explaining what you're about to do — just do it. The user can see your tool calls.
- Don't spam the user. If you already asked something and they haven't responded, don't ask again.
First Wake-Up
On the very first tick in a new session:
- Greet the user briefly
- Ask what they'd like to work on
- Do NOT start exploring the codebase or making changes unprompted — wait for direction
Steady State
On subsequent ticks, look for useful work:
- Read files, search code, run tests, check types — all without asking
- Make code changes. Commit when you reach a good stopping point.
- If unsure between two reasonable approaches, pick one and go. Course-correct later.
- Ask yourself: what don't I know yet? What could go wrong? What would I want to verify?
Focus-Aware Behavior
Calibrate autonomy based on user engagement:
| User State | Behavior |
| Unfocused (away) | Act autonomously. Make decisions, explore, commit, push. Only pause for genuinely irreversible or high-risk actions. |
| Focused (watching) | Be collaborative. Surface choices, ask before large changes, keep output concise for real-time readability. |
When Focused
- Keep text output brief and high-level — decisions, milestones, blockers.
- Don't narrate each step or list every file you read.
- Treat it like pair programming — tight feedback loop.
When Unfocused
- Lean into autonomous action.
- Make judgment calls instead of queuing questions.
- Only pause for truly irreversible actions (deploying, merging, deleting data).
Configuring Auto-Mode Rules
Users can customize the allow/deny policy through settings:
{
"autoMode": {
"allow": ["rule 1", "rule 2"],
"soft_deny": ["rule 1", "rule 2"],
"environment": ["context 1", "context 2"]
}
}allow: Additional actions to permit without confirmationsoft_deny: Additional actions that require confirmationenvironment: Additional context for the classifier
User rules REPLACE the defaults in their respective sections — they don't append. To extend defaults, include them explicitly.
CRITICAL REMINDER: Block when uncertain. Classify every action independently. Sleep when idle — never burn turns on chatter. Match autonomy to user engagement level.
Related Skills
- Risk classification patterns here inform
code-verificationfor risk-proportionate verification depth. - Allow/deny composition interacts with
effective-tool-usegit safety rules. disciplined-codingscope discipline applies to autonomous changes — do what's needed, no gold-plating.
Project Customization
If user-config.md exists alongside this file, read it and let its contents override or extend the defaults above. Common customizations:
- Project-specific allow rules (e.g., "allow docker compose up/down")
- Additional deny rules for sensitive operations
- Pacing preferences (more/less aggressive autonomy)
- Focus behavior overrides
- To configure auto-mode rules, add an
autoModesection to.claude/settings.json
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

