rizalkr/agy-setup
소개
Token-optimized Antigravity setup: 6 Orchestrator presets, Context Guardian, zero global MCP bloat, and a skill router with 24 skills. Windows, macOS, Linux.
AI 및 머신러닝What you can do
- Separates planning and execution models according to your selected preset (1–3 Argon, 4–6 Neon, or 7–9 Carbon), avoiding wasted tokens from trial-and-error loops.
- Keeps global mcp_config.json empty ({"mcpServers": {}}) so unused MCP tool schemas are never injected into every turn.
- Project-specific MCP servers (such as Supabase, Wordcraft, or Jupyter) belong inside <project>/.agents/mcp_config.json (see settings/mcp_templates.example.json).
- Enforces targeted line-range reads (StartLine/EndLine), batched parallel tool calls, subagent delegation (research) for noisy exploration, .ipynb raw-read guard (preventing base64/output bloat), concise responses, lean-code guardrails, and automatic skill routing.
측정된 스타 증가
- in 24h
- 0
- in 7 days
- 기록 수집 중
- in 15 days
- 기록 수집 중
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalAntigravity (AGY) Token-Optimized CLI & IDE Setup
A portable, token-disciplined configuration for Google Antigravity (CLI, App, and IDE) across Windows, macOS, and Linux featuring configurable Orchestrator Mode presets, pruned MCP tool schemas, Progressive Disclosure skills, Context Guardian auto-compact advisor, and a Global Skill Router backed by a categorized 42-skill library.
Setup Presets (Choose Your Token vs. Quality Combo)
Pick the profile that matches your task, model family (Argon, Neon, or Carbon), and credit budget (defined in settings/presets.json):
| Series | Preset | Flag / Alias | Planner Model | Executor Model | Context Guardian (Yellow / Red) | Best For |
|---|---|---|---|---|---|---|
| Argon | Setup 1: Argon Balanced | --preset 1 / balanced / argon-balanced |
Gemini 4 Argon (Medium) |
Gemini 4 Hydrogen (Medium) |
75 / 120 steps (85k / 135k tokens) |
Balanced Argon planning with token-efficient Hydrogen Medium execution |
| Argon | Setup 2: Argon / Hydrogen Ultra Saver | --preset 2 / ultra-saver / argon-saver |
Gemini 4 Hydrogen (High) |
Gemini 4 Hydrogen (Low) |
50 / 85 steps (60k / 95k tokens) |
Tight token/credit budgets, repetitive edits, quick scripts |
| Argon | Setup 3: Argon Max Quality | --preset 3 / max-quality / argon-max |
Gemini 4 Argon (High) |
Gemini 4 Hydrogen (High) |
100 / 150 steps (110k / 160k tokens) |
Complex system architecture, deep debugging, multi-service refactors |
| Neon | Setup 4: Neon Balanced (Recommended / Default) | --preset 4 / neon-balanced / neon |
Gemini 4 Neon (High) |
Gemini 4 Hydrogen (Medium) |
75 / 120 steps (85k / 135k tokens) |
Daily full-stack coding: best balance of Neon reasoning and token efficiency |
| Neon | Setup 5: Neon Ultra Saver | --preset 5 / neon-saver / neon-ultra-saver |
Gemini 4 Neon (Medium) |
Gemini 4 Hydrogen (Low) |
55 / 90 steps (65k / 100k tokens) |
Lightweight Neon planning with tighter compaction thresholds |
| Neon | Setup 6: Neon Max Quality | --preset 6 / neon-max / neon-max-quality |
Gemini 4 Neon (XHigh) |
Gemini 4 Hydrogen (XHigh) |
100 / 150 steps (110k / 160k tokens) |
Peak Neon reasoning depth for complex architecture and deep debugging |
| Carbon | Setup 7: Carbon Balanced | --preset 7 / carbon-balanced / carbon |
Gemini 4 Carbon (Medium) |
Gemini 4 Hydrogen (Medium) |
75 / 120 steps (85k / 135k tokens) |
Daily coding with Gemini 4 Carbon planner and Hydrogen Medium executor |
| Carbon | Setup 8: Carbon Ultra Saver | --preset 8 / carbon-saver / carbon-ultra-saver |
Gemini 4 Carbon (Low) |
Gemini 4 Hydrogen (Low) |
55 / 90 steps (65k / 100k tokens) |
Lightweight Carbon planning with early compaction reminders |
| Carbon | Setup 9: Carbon Max Quality | --preset 9 / carbon-max / carbon-max-quality |
Gemini 4 Carbon (High) |
Gemini 4 Hydrogen (High) |
100 / 150 steps (110k / 160k tokens) |
High-depth Carbon architecture and multi-module refactoring |
Architecture Highlights
- Orchestrator Mode (Plan-Execute):
- Separates planning and execution models according to your selected preset (
1–3Argon,4–6Neon, or7–9Carbon), avoiding wasted tokens from trial-and-error loops.
- Separates planning and execution models according to your selected preset (
- Zero Global MCP Context Bloat:
- Keeps global
mcp_config.jsonempty ({"mcpServers": {}}) so unused MCP tool schemas are never injected into every turn. - Project-specific MCP servers (such as Supabase, Wordcraft, or Jupyter) belong inside
<project>/.agents/mcp_config.json(seesettings/mcp_templates.example.json).
- Keeps global
- Global Rules (
GEMINI.md):- Enforces targeted line-range reads (
StartLine/EndLine), batched parallel tool calls, subagent delegation (research) for noisy exploration,.ipynbraw-read guard (preventing base64/output bloat), concise responses, lean-code guardrails, and automatic skill routing. - Enforces Cache Hygiene: uses synchronous waits (
WaitMsBeforeAsync: 10000) and chained verification commands to prevent accidental background-task cache evictions, and prefers/compactbefore heavy async builds or task switches above100ktokens. - Integrates
graphify(~/GEMINI.md) to query codebase knowledge graphs before raw file reads.
- Enforces targeted line-range reads (
- Global Skill Router + Categorized Skill Library (42 Skills):
- Only
skill-router(plus 5 core skills:graphify,find-skills,lean-code,read-only-agent,security-audit) is registered globally in~/.gemini/config/skills/. - Domain skills live in
~/.gemini/skill-library/<category>/<skill>/SKILL.md, indexed intoINDEX.mdviaagy-index-skills. graphify/SKILL.md(~2.2 KB fast-path +references/full-pipeline.md) andsecurity-audit/SKILL.md(~10 KB guidance fast-path +FULL-AUDIT-SETUP.md) use Progressive Disclosure.
- Only
- Context Guardian (
PreInvocationAuto-Compact Advisor):- Monitors step count and active tokens (
input_tokens + cache_read_tokens) using your selected preset thresholds in~/.gemini/config/hooks/preset.json, with cooldown and automatic reset after/compact. - Enforces Never Compact Mid-Task: warns against compacting mid-fix, generates copy-paste
/compact <context + next step>commands after milestones, and provides New Session Handoff prompts when tasks finish or reach the Red Zone.
- Monitors step count and active tokens (
- Antigravity CLI v1.5.15–1.5.16 Compatibility:
- Supports
AGY_CLI_AUTO_COMPACT_OVERRIDE(e.g.,80%,800K) for CLI-native auto-compaction tuning alongside Context Guardian. - Sets
"showThinking": falseby default (toggle live thinking with/thinking), and preserves user-global~/.agents/skillsdiscovery while keeping~/.gemini/config/skills/clean.
- Supports
- Token Usage Analytics (
agy-token-stats):- Zero-dependency Python CLI installed globally to track daily/weekly token usage, cache hit rates, Context Guardian triggers,
/compactfrequency, and before/after savings directly from local CLI & IDEtranscript.jsonllogs.
- Zero-dependency Python CLI installed globally to track daily/weekly token usage, cache hit rates, Context Guardian triggers,
Skill Library Catalog (42 Starter Skills Across 8 Categories)
This library is an opinionated starter bundle tailored around Next.js/React, Tailwind/shadcn, web design styles, Laravel, FastAPI, Python/ML, and Supabase/Drizzle. Because
skill-routerloads skills on demand fromINDEX.md, unused skills add zero prompt bloat—and you can freely add or remove category folders and re-runagy-index-skills.
| Category | Skills |
|---|---|
backend |
fastapi-pydantic-v2, laravel13-specialist, saas-multitenant-highperf-api |
frontend |
nextjs-react19-best-practices, tailwind-v4-shadcn-ui, high-end-visual-taste, saas-dashboard-ux, design-system-microinteractions |
web-styles |
animation-vocabulary, bento, better-typography, claymorphism, dark-mode-design, editorial, flat, frontend-design, futuristic, glassmorphism, gsap-scrolltrigger, impeccable, material-3, minimal, neobrutalism, neumorphism, retro, threejs-fundamentals, ui-ux-pro-max, vintage, web-design-guidelines |
database |
drizzle-orm-postgres, supabase-ssr-rls |
testing |
playwright-e2e-rbac, vitest-rtl-testing, laravel-phpunit-tdd |
devops |
docker-compose-cicd-cloud |
data-ai |
colab-jupyter-notebooks, python-data-ml-scraping, python-modern-workflow, rag-llm-agents-embeddings, reverse-engineering-appsec |
docs-office |
office-docs-guidebook-automation, copywriting |
Quick Setup with Agent CLI (Zero Manual Config)
Run agy (or any AI coding CLI) on a new machine (Windows, macOS, or Linux) and paste this single prompt (optionally specify preset 1–9—if omitted, the agent will ask you to choose):
Clone https://github.com/rizalkr/agy-setup.git to ~/Projects/agy-setup (or pull latest if it exists), then read and execute AGENT_SETUP.md to install the setup. Ask me which preset I want (Argon: 1 Balanced, 2 Ultra Saver, 3 Max Quality; Neon: 4 Neon Balanced [Recommended/Default], 5 Neon Ultra Saver, 6 Neon Max Quality; Carbon: 7 Carbon Balanced, 8 Carbon Ultra Saver, 9 Carbon Max Quality) before running the installer.
Or specify your preset directly in one shot:
Clone https://github.com/rizalkr/agy-setup.git to ~/Projects/agy-setup (or pull latest if it exists), then read and execute AGENT_SETUP.md with preset 4 (neon-balanced).
Manual Installation
Linux / macOS (Bash/Zsh)
Interactive preset menu (choose 1–9 across Argon, Neon, or Carbon series):
git clone https://github.com/rizalkr/agy-setup.git ~/Projects/agy-setup
cd ~/Projects/agy-setup
./install.sh --choose
Or install a specific preset non-interactively (--full defaults to Preset 4 neon-balanced):
./install.sh --preset 4 # Neon: 4/neon-balanced (default) | 5/neon-saver | 6/neon-max
./install.sh --preset 1 # Argon: 1/balanced | 2/ultra-saver | 3/max-quality
./install.sh --preset 7 # Carbon: 7/carbon-balanced | 8/carbon-saver | 9/carbon-max
Minimal setup (rules, Context Guardian preset.json, & skills only, without merging CLI settings):
./install.sh
Safe Install Flags & Model Independence
- Non-destructive by default: Existing
~/.gemini/GEMINI.mdand~/GEMINI.mdare backed up to*.bakbefore overwrite, existing UX preferences (colorScheme,vimInsertFirst,agentMode,artifactReviewPolicy,showThinking) are preserved, and custom skills in~/.gemini/config/skills/or~/.agents/skills/are left intact (only DataCloud auto-injected bloat is pruned). - Keep your current model (
--no-orchestrator): If your Antigravity version or plan uses different model names—or you simply prefer your current model—pass--no-orchestratoralongside--preset:./install.sh --preset 4 --no-orchestrator - Opt-in global skill cleanup (
--prune-skills): Pass--prune-skillsonly if you explicitly want to remove all non-core skills from~/.gemini/config/skills/.
Ensure ~/.local/bin is in your PATH so agy-index-skills works globally.
Windows (PowerShell)
Requires Python 3 (py or python) installed on PATH.
Interactive preset menu (choose 1–9 across Argon, Neon, or Carbon series):
git clone https://github.com/rizalkr/agy-setup.git "$env:USERPROFILE\Projects\agy-setup"
cd "$env:USERPROFILE\Projects\agy-setup"
powershell -ExecutionPolicy Bypass -File .\install.ps1 --choose
Or install a specific preset directly (--full defaults to Preset 4 neon-balanced):
powershell -ExecutionPolicy Bypass -File .\install.ps1 --preset 4 # or 1..9
Minimal setup (rules & skills only):
powershell -ExecutionPolicy Bypass -File .\install.ps1
Switching Presets Later
You can switch between Argon (1–3), Neon (4–6), and Carbon (7–9) presets anytime without losing permissions or workspaces:
./install.sh --preset 4 # Linux/macOS: Neon Balanced (Default)
./install.sh --preset carbon-balanced # Linux/macOS: Carbon Balanced
.\install.ps1 --preset 4 # Windows PowerShell: Neon Balanced
.\install.ps1 --preset 7 # Windows PowerShell: Carbon Balanced
Optional Templates
settings/mcp_templates.example.json-> copy individual servers (Supabase, Wordcraft, or Jupyter) into<project>/.agents/mcp_config.jsonrules/personal.example.md-> optional personal preferences (e.g., no-emoticons or conversation language rules) you can append to~/.gemini/GEMINI.md
Token Usage Analytics (agy-token-stats)
Monitor token usage, cache hit rate, Context Guardian triggers, /compact activity, and before/after savings directly from local Antigravity CLI and IDE transcript.jsonl logs:
agy-token-stats # Last 14 days daily breakdown
agy-token-stats --period weekly # Weekly breakdown across all history
agy-token-stats --since 2026-11-18 --compare 2026-11-23T08:27 # Before vs After comparison
agy-token-stats --env cli --json # CLI-only JSON output
Measured Before vs. After Benchmark
Apple-to-apple comparison across 168 Gemini 4 sessions (agy-token-stats --since 2026-11-18 --compare 2026-11-23T08:27, covering Nov 18–23 08:26 before setup vs. Nov 23 08:27–Dec 1 after setup):
| Metric | Before Setup | After Setup | Delta |
|---|---|---|---|
| Daily turns / day | 49.3 | 72.4 | +46.8% |
| Total input / turn | 1.58M | 954.8k | -39.5% |
| New input (uncached) / turn | 194.1k | 135.2k | -30.3% |
| Same-model new input / call | 17.8k | 10.5k | -41.0% |
Effective cost proxy / turn (1*NewIn + 0.1*Cache + 4*Out) |
374.3k | 268.3k | -28.3% (~242k / -35% post-lean-code) |
| Total input / day | 77.85M | 69.17M | -11.2% (with +46.8% more turns) |
| Sessions >400k peak context | 6 (max 644.7k) | 1 (max 465.5k) | -83.3% |
/compact usage |
5 | 66 | +1220.0% |
Observed Trade-offs & Cache Hygiene:
- Orchestrator model handoffs: Cache hit dipped slightly (
87.7%->85.8%) mainly because KV-cache is not shared across different models (Neon<->Hydrogen). Use a single model (--no-orchestrator) for short iterative chats, and reserve Orchestrator mode for larger multi-step plan-execute tasks. - Background-task wakeups: Async
run_commandnotifications when a command exceedsWaitMsBeforeAsyncreset conversation KV-cache;rules/global-GEMINI.mdnow enforcesWaitMsBeforeAsync: 10000and chained verification commands to prevent avoidable cache evictions.
Adding New Skills & Syncing
Tip for other users: Fork this repository first and clone your own fork if you plan to push personal rule/skill changes with
sync.sh/sync.ps1.
- Drop any new skill into
~/.gemini/skill-library/<category>/<skill-name>/SKILL.md. - Refresh the index:
agy-index-skills - Sync local changes back into this repository and push:
- Linux / macOS:
./sync.sh && git add -A && git commit -m "chore: update skills" && git push - Windows (PowerShell):
.\sync.ps1; git add -A; git commit -m "chore: update skills"; git push
- Linux / macOS:
관련 프로젝트 살펴보기
불러오는 중…