<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: RIZAL KURNIA</title>
    <description>The latest articles on DEV Community by RIZAL KURNIA (@rizalkr).</description>
    <link>https://dev.to/rizalkr</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4259601%2Ff0629f3c-90a0-4587-89b8-7d102f75765e.jpg</url>
      <title>DEV Community: RIZAL KURNIA</title>
      <link>https://dev.to/rizalkr</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rizalkr"/>
    <language>en</language>
    <item>
      <title>How I Built a Token-Disciplined, Self-Installing Setup for Google Antigravity</title>
      <dc:creator>RIZAL KURNIA</dc:creator>
      <pubDate>Mon, 23 Nov 2026 03:11:55 +0000</pubDate>
      <link>https://dev.to/rizalkr/how-i-built-a-token-disciplined-self-installing-setup-for-google-antigravity-13e6</link>
      <guid>https://dev.to/rizalkr/how-i-built-a-token-disciplined-self-installing-setup-for-google-antigravity-13e6</guid>
      <description>&lt;p&gt;If you use &lt;strong&gt;Google Antigravity (&lt;code&gt;agy&lt;/code&gt; CLI, App, or IDE)&lt;/strong&gt; every day, burning through credits or hitting context degradation usually comes down to four silent leaks:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Over-provisioning models&lt;/strong&gt;: Using a flagship reasoning model for both architectural planning and routine edits.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Global MCP schema tax&lt;/strong&gt;: Leaving MCP servers configured globally so thousands of unused tool-schema tokens get injected into every single turn.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bad compaction timing&lt;/strong&gt;: Letting sessions drift past 120k+ tokens—or panic-running &lt;code&gt;/compact&lt;/code&gt; right in the middle of an unresolved bug so the agent loses the stack trace.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Redundant file reads&lt;/strong&gt;: Letting the agent dump entire 800-line files repeatedly instead of querying a dependency graph or reading narrow line slices.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To solve this permanently across &lt;strong&gt;Windows, macOS, and Linux&lt;/strong&gt;, I packaged my configuration, hooks, and skills into an open-source repo: &lt;strong&gt;&lt;a href="https://github.com/rizalkr/agy-setup" rel="noopener noreferrer"&gt;agy-setup&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  1. Decoupling Planning from Execution: 6 Argon &amp;amp; Neon Orchestrator Presets
&lt;/h3&gt;

&lt;p&gt;Instead of using one heavyweight model for everything, &lt;code&gt;agy-setup&lt;/code&gt; ships 6 Orchestrator presets split across &lt;strong&gt;Argon Series (1–3)&lt;/strong&gt; and &lt;strong&gt;Neon Series (4–6)&lt;/strong&gt;. Each preset pairs a reasoning &lt;strong&gt;Planner&lt;/strong&gt; (&lt;code&gt;Gemini 4 Argon&lt;/code&gt; or &lt;code&gt;Gemini 4 Neon&lt;/code&gt;, except Argon Ultra Saver which uses &lt;code&gt;Hydrogen XHigh&lt;/code&gt;) with a fast &lt;strong&gt;Executor&lt;/strong&gt; (&lt;code&gt;Gemini 4 Hydrogen&lt;/code&gt;), alongside tuned Context Guardian thresholds:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;ID&lt;/th&gt;
&lt;th&gt;Preset&lt;/th&gt;
&lt;th&gt;Planner&lt;/th&gt;
&lt;th&gt;Executor&lt;/th&gt;
&lt;th&gt;Yellow Zone&lt;/th&gt;
&lt;th&gt;Red Zone&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;1&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;balanced&lt;/code&gt; (Recommended)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Gemini 4 Argon (Medium)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Gemini 4 Hydrogen (High)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;75 steps / 85k tokens&lt;/td&gt;
&lt;td&gt;120 steps / 135k tokens&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;2&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;ultra-saver&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Gemini 4 Hydrogen (XHigh)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Gemini 4 Hydrogen (High)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;50 steps / 60k tokens&lt;/td&gt;
&lt;td&gt;85 steps / 95k tokens&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;3&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;max-quality&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Gemini 4 Argon (High)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Gemini 4 Hydrogen (XHigh)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;100 steps / 110k tokens&lt;/td&gt;
&lt;td&gt;150 steps / 160k tokens&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;4&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;neon-balanced&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Gemini 4 Neon (High)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Gemini 4 Hydrogen (High)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;75 steps / 85k tokens&lt;/td&gt;
&lt;td&gt;120 steps / 135k tokens&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;5&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;neon-saver&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Gemini 4 Neon (Medium)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Gemini 4 Hydrogen (High)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;55 steps / 65k tokens&lt;/td&gt;
&lt;td&gt;90 steps / 100k tokens&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;6&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;neon-max&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Gemini 4 Neon (XHigh)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Gemini 4 Hydrogen (XHigh)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;100 steps / 110k tokens&lt;/td&gt;
&lt;td&gt;150 steps / 160k tokens&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Switching profiles does not overwrite your existing &lt;code&gt;permissions&lt;/code&gt; or &lt;code&gt;trustedWorkspaces&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Linux / macOS&lt;/span&gt;
./install.sh --preset 4

&lt;span class="c"&gt;# Windows (PowerShell)&lt;/span&gt;
.\install.ps1 --preset 4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  2. Context Guardian: A &lt;code&gt;PreInvocation&lt;/code&gt; Hook That Refuses to Compact Mid-Bug
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;context-guardian.py&lt;/code&gt; hooks into &lt;code&gt;PreInvocation&lt;/code&gt; and inspects &lt;code&gt;transcript.jsonl&lt;/code&gt; to measure two signals against your active preset:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Step count&lt;/strong&gt; since the start of the conversation (or since the last &lt;code&gt;/compact&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Active tokens&lt;/strong&gt; (&lt;code&gt;input_tokens + cache_read_tokens&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When usage crosses the &lt;strong&gt;Yellow Zone&lt;/strong&gt; or &lt;strong&gt;Red Zone&lt;/strong&gt;, the hook injects a structured &lt;code&gt;[CONTEXT_GUARDIAN: ...]&lt;/code&gt; advisory into the turn—with built-in step cooldowns so it does not spam every call, and automatic counter resets whenever &lt;code&gt;/compact&lt;/code&gt; runs.&lt;/p&gt;

&lt;p&gt;Most importantly, global rules in &lt;code&gt;GEMINI.md&lt;/code&gt; enforce &lt;strong&gt;"Never Compact Mid-Task"&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If a bug is still unresolved, a test is failing, or an edit is half-applied, the agent reports &lt;code&gt;Belum Aman Compact&lt;/code&gt; / not safe to compact and finishes the atomic step first.&lt;/li&gt;
&lt;li&gt;Once a milestone wraps up cleanly (or when Red Zone triggers), the agent appends a ready-to-copy &lt;code&gt;/compact Pertahankan konteks: ...&lt;/code&gt; command or a self-contained &lt;strong&gt;New-Session Handoff Prompt&lt;/strong&gt; for &lt;code&gt;/clear&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  3. Eliminating Global MCP Schema Tax
&lt;/h3&gt;

&lt;p&gt;Every globally enabled MCP server adds tool definitions to your prompt on every turn—even when you are just editing CSS or writing tests. &lt;code&gt;agy-setup&lt;/code&gt; sets global &lt;code&gt;mcp_config.json&lt;/code&gt; to &lt;code&gt;{"mcpServers": {}}&lt;/code&gt; and provides project-scoped templates in &lt;code&gt;settings/mcp_templates.example.json&lt;/code&gt; so you only attach servers like Supabase inside &lt;code&gt;&amp;lt;project&amp;gt;/.agents/mcp_config.json&lt;/code&gt; where they are actually used.&lt;/p&gt;




&lt;h3&gt;
  
  
  4. Progressive-Disclosure Skill Routing (5 Core + 18 Domain Skills)
&lt;/h3&gt;

&lt;p&gt;Loading 20+ framework guides globally burns context before you even type a prompt. Instead:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;5 core skills&lt;/strong&gt; live globally in &lt;code&gt;~/.gemini/config/skills/&lt;/code&gt; (&lt;code&gt;skill-router&lt;/code&gt;, &lt;code&gt;graphify&lt;/code&gt;, &lt;code&gt;find-skills&lt;/code&gt;, &lt;code&gt;read-only-agent&lt;/code&gt;, &lt;code&gt;security-audit&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;18 specialized domain skills&lt;/strong&gt; (Next.js 15 / React 19, Tailwind v4 + shadcn/ui, Laravel 13, FastAPI + Pydantic v2, Drizzle ORM, Supabase SSR/RLS, Playwright, Vitest, PHPUnit, Docker CI/CD, RAG/LLM agents, Python ML/scraping, AppSec, and Office docs) stay outside the global prompt inside &lt;code&gt;~/.gemini/skill-library/&lt;/code&gt; and are indexed in &lt;code&gt;INDEX.md&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When you work on a specific stack, &lt;code&gt;skill-router&lt;/code&gt; checks &lt;code&gt;INDEX.md&lt;/code&gt; and reads only the matching &lt;code&gt;SKILL.md&lt;/code&gt;. Adding new custom skills is a single command via the included &lt;code&gt;agy-index-skills&lt;/code&gt; CLI script.&lt;/p&gt;




&lt;h3&gt;
  
  
  5. Graphify AST Queries &amp;amp; Line-Range Rules
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;GEMINI.md&lt;/code&gt; bakes in strict context hygiene rules:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Query &lt;code&gt;graphify-out/&lt;/code&gt; AST knowledge graphs (&lt;code&gt;graphify query&lt;/code&gt; / &lt;code&gt;graphify path&lt;/code&gt; / &lt;code&gt;graphify explain&lt;/code&gt;) before running raw greps or opening full source files.&lt;/li&gt;
&lt;li&gt;Read targeted &lt;code&gt;StartLine&lt;/code&gt;/&lt;code&gt;EndLine&lt;/code&gt; ranges rather than dumping full files.&lt;/li&gt;
&lt;li&gt;Batch independent searches, reads, and edits in parallel turns.&lt;/li&gt;
&lt;li&gt;Offload noisy multi-file codebase exploration to the &lt;code&gt;research&lt;/code&gt; subagent so intermediate search logs stay out of the main conversation context.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  6. Try It in 30 Seconds (Zero Manual Config)
&lt;/h3&gt;

&lt;p&gt;You do not have to copy config files by hand. Open &lt;code&gt;agy&lt;/code&gt; and paste this prompt to let the agent clone the repo, ask which preset (&lt;code&gt;1&lt;/code&gt;–&lt;code&gt;6&lt;/code&gt;) you prefer, and run the installer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;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 [Recommended], 2 Ultra Saver, 3 Max Quality; Neon: 4 Neon Balanced, 5 Neon Ultra Saver, 6 Neon Max Quality) before running the installer.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or run the cross-platform installer manually:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/rizalkr/agy-setup.git ~/Projects/agy-setup
&lt;span class="nb"&gt;cd&lt;/span&gt; ~/Projects/agy-setup
./install.sh --choose    &lt;span class="c"&gt;# Linux / macOS&lt;/span&gt;
.\install.ps1 --choose   &lt;span class="c"&gt;# Windows PowerShell&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Full documentation, hook source code, and preset configs are on GitHub:&lt;br&gt;
&lt;strong&gt;&lt;a href="https://github.com/rizalkr/agy-setup" rel="noopener noreferrer"&gt;https://github.com/rizalkr/agy-setup&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>antigravity</category>
      <category>productivity</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
