auto-mode
Skill1 starsChanged 2 months agoMITView on GitHub
Configure and manage the autonomous permission classifier for Antigravity (agy). Use when checking auto-mode quota, adjusting allow/deny rules in auto_mode_rules.json, or troubleshooting permission prompts.
- Reads credentials
- Deletes or force-pushes
- Installs packages
3 other projects use a version of this.
Adopted by
Most recently taken up by
- tboome33/obsidian-mcp-routertheir own version, first seen Nov 15, 2026
- tranquocthong/auto-modetheir own version, first seen Sep 29, 2026
- LuVAxCiN/ClaudeCode-AutoModetheir own version, first seen May 23, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- LuVAxCiN/ClaudeCode-AutoMode★ 2same name
- tboome33/obsidian-mcp-router★ 1same name
- tranquocthong/auto-mode★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repositoryOne other file it gives its agents.
- rules/AGENTS.mdAGENTS.md
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
Every tool call passes through a 3-Tier Decision Engine:
- Very specific: line 28
Every segment safe → instant allow.
- Distinctive: line 43
Cascading Failover: If a model hits rate limits (HTTP 429), it automatically fails over without delay:
- Very specific: line 53
If offline, unauthenticated, rate-limited, or on timeout, it defaults to fail-closed heuristics: unrecognized or ambiguous commands prompt …
- Distinctive: line 97
Check current rolling 24-hour quota usage:
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Antigravity Auto-Mode Security Classifier
The auto-mode plugin gives Antigravity CLI (agy) and Antigravity IDE a
Claude Code-style Auto-Mode Security Classifier.
Threat Model
Auto-mode is designed to prevent an aligned AI coding agent from executing
catastrophic or dangerous actions by accident or misunderstanding. Commands like
npm run, pytest, cargo test, and make execute developer code by design.
It is not an OS-level sandbox against a compromised model or malicious repository.
How Auto-Mode Works
Every tool call passes through a 3-Tier Decision Engine:
- Tier 1: Fast Path (<2ms)
- Catastrophic patterns (
rm -rf /, raw disk format, fork bombs) are instantly denied with 0ms latency. - Dangerous commands (
sudo,su,rm -rf,git reset --hard,--upload-pack, destructivefind) prompt for confirmation (force_ask). - Sensitive path boundaries (
~/.ssh,~/.aws,~/.gnupg,/etc) prompt for confirmation. - Compound commands (chained via
;,&&,||,|,\n) are decomposed and each sub-command gets its own verdict —safe,dangerous, orunknown.- Every segment
safe→ instant allow. - Any segment
dangerous→force_ask, returned immediately. A dangerous verdict is never sent to Tier 2, so the AI cannot upgrade it toallow. - Otherwise → escalate to Tier 2.
- Every segment
- Benign developer actions are allowed instantly, and the allow-list is broad enough that everyday work does not prompt: read-only utilities (
ls,cat,head,rg,grep,find,jq,awk,sed -n,wc,diff,which,cd), read-only git (status,diff,log,rev-parse,ls-files,blame,describe,reflog,remote -v,config --get,fetch,worktree list), recoverable git writes (add,commit,stash, branch-shapedcheckout/switch), build/test/lint runners, lockfile dependency restores (npm ci,pip install -r), and read-onlydockerqueries. - Everyday shell shapes stay on the fast path too: pipes and
2>&1, redirection to/dev/nullor a workspace-relative file, env-prefixed commands (NODE_ENV=test npm test),timeout/timewrappers, virtualenv andnode_modules/.binlaunchers, and workspace-relative writes (mkdir,touch,cp,mv,sed -i). - Command substitutions (
$(...), backticks,<(...)) are extracted and classified on their own rather than blocking the fast path wholesale, socd $(git rev-parse --show-toplevel)runs whileecho $(git checkout -- .)prompts. - The breadth is bounded by what the segment can actually reach: a write, copy or redirect whose target leaves the workspace prompts; so do execution-redirecting env assignments (
PATH=,LD_PRELOAD=,NODE_OPTIONS=,PYTHONPATH=,BASH_ENV=,GIT_SSH_COMMAND=,IFS=), inline interpreter code (python -c,node -e), text-tool shell escapes (awk system(),sede/w/-f), and installing packages that are not already declared in the manifest. - Constructs that quietly destroy work or execute code are
dangerous:git checkout -- ./git checkout ./-f/--discard-changes/--ours/--theirs,git restore(without--staged),git stash drop|clear,git submodule update|foreach, git--upload-pack/--receive-pack/--exec/--output/--ext-diff/-coverrides, destructivefindpredicates, andsource/.of anything but a virtualenv activate script. - Safe workspace file modifications (
write_to_file,replace_file_content) inside active workspaces are allowed. Edits outside workspaces or with missing targets fail closed. When the host sends noworkspacePaths, the host-provided working directory is used as the boundary instead — the filesystem root and the bare home directory are rejected, since neither is a boundary. - Network tools (
read_url_content,browser_subagent) hard-deny cloud metadata endpoints (169.254.169.254,169.254.170.2,metadata.google.internal). Loopback and RFC1918 are allowed — reading your own dev server is routine. Plaincurlfetches at a local target are fast-pathed too, unless they upload a body or write a file (-d,-F,-T,-o,-K,>).
- Catastrophic patterns (
- Tier 2: AI Auto-Classifier (Cascading Multi-Model Pool)
- Ambiguous commands or novel scripts are evaluated by Google AI Studio models using your free API key.
- Active security policies from
auto_mode_rules.jsonare serialized into the model prompt. - Commands are wrapped with prompt-injection defense tags
<untrusted_proposed_command>. - Cascading Failover: If a model hits rate limits (HTTP 429), it automatically fails over without delay:
gemini-2.5-flash(GA primary)gemini-2.5-flash-lite(GA fast workhorse)gemini-2.0-flash/gemini-1.5-flash(GA fallbacks)gemini-3.5-flash-lite/gemini-3.1-flash-lite(Preview workhorses)gemini-3.8-flash(Preview reasoning tier)gemma-2-27b-it(Open model reserve)
- Runs with a strict global 5.5s timeout budget to guarantee response before Antigravity's 8.0s hook timeout.
- Tier 3: Fail-Closed Heuristic Fallback
- If offline, unauthenticated, rate-limited, or on timeout, it defaults to fail-closed heuristics: unrecognized or ambiguous commands prompt for confirmation (
force_ask) rather than executing silently.
- If offline, unauthenticated, rate-limited, or on timeout, it defaults to fail-closed heuristics: unrecognized or ambiguous commands prompt for confirmation (
Customizing Security Policies
You can customize the rules globally in ~/.gemini/config/auto_mode_rules.json
(or edit auto_mode_rules.json in the plugin directory):
{
"allow": [
"Standard developer, build, test, and package management commands"
],
"soft_deny": [
"File deletions (rm, rm -rf)",
"Privileged system commands (sudo, su)",
"Force git pushes or hard resets"
],
"hard_deny": [
"Data exfiltration of credentials, private keys, or API tokens",
"Root filesystem wipes or disk partition formatting"
]
}[!NOTE] Rules are loaded exclusively from global configuration to prevent untrusted cloned repositories from tampering with security boundaries.
Managing API Keys
The classifier checks for your Google AI Studio API key in:
- Shell environment:
export GEMINI_API_KEY="your-key-here" - Shell environment:
export GOOGLE_API_KEY="your-key-here" - User env file:
~/.envor~/.gemini/config/.env
Get a free key (no credit card required) at Google AI Studio.
Monitoring Usage
Check current rolling 24-hour quota usage:
cat ~/.gemini/config/classifier_usage.jsonDoes 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.

