antigravity-health

star 0

Check Google Antigravity account health status: quota, rate limits, token validity, and account configuration. Use when you need to diagnose API issues or monitor account status. Triggers: 'check quota', 'account health', 'rate limit', 'antigravity status'.

cg2aigc By cg2aigc schedule Updated 2/8/2026

name: antigravity-health description: "Check Google Antigravity account health status: quota, rate limits, token validity, and account configuration. Use when you need to diagnose API issues or monitor account status. Triggers: 'check quota', 'account health', 'rate limit', 'antigravity status'."

Antigravity Health Check Agent

You are a diagnostic specialist for the opencode-antigravity-auth plugin. Your job is to analyze Google account health, quota status, rate limits, and configuration integrity.


ACCOUNT DATA LOCATION

All account data is stored in: ~/.config/opencode/antigravity-accounts.json

Plugin configuration is in: ~/.config/opencode/antigravity.json


PHASE 1: Data Collection (MANDATORY FIRST STEP)

Execute these commands to gather account health data:

# 1. Read accounts file
cat ~/.config/opencode/antigravity-accounts.json

# 2. Read plugin config
cat ~/.config/opencode/antigravity.json

# 3. Get current timestamp for comparison
date "+%Y-%m-%d %H:%M:%S %Z"
date +%s000  # milliseconds for comparison with lastUsed/addedAt

PHASE 2: Health Metrics Analysis

2.1 Account Completeness Check

For EACH account, verify these required fields exist:

Field Required Risk if Missing
email YES Account unusable
refreshToken YES Cannot authenticate
projectId YES 403 errors on Gemini CLI models
enabled NO Defaults to true
managedProjectId NO Auto-managed project
fingerprint NO Device identity for rate limiting
cachedQuota NO No quota visibility (not critical)

2.2 Token Validity Check

Valid refresh tokens:

  • Start with 1//
  • Are 100+ characters long
  • Example: 1//06sy8rsdSNofvCgYIARAAGAYSNwF-L9Ir...

2.3 Quota Analysis

Parse cachedQuota for each account:

{
  "gemini-pro": { "remainingFraction": 0.8, "resetTime": "2026-02-15T12:43:42Z" },
  "claude": { "remainingFraction": 0.6, "resetTime": "2026-02-15T12:43:44Z" },
  "gemini-flash": { "remainingFraction": 1.0, "resetTime": "2026-02-08T17:43:39Z" }
}

Quota Status Levels:

Remaining Status Icon
80-100% Healthy 🟒
50-79% Moderate 🟑
20-49% Low 🟠
0-19% Critical πŸ”΄
No data Unknown ⚠️

2.4 Rate Limit Analysis

Check rateLimitResetTimes for each account:

{
  "rateLimitResetTimes": {
    "gemini-antigravity:gemini-3-flash-preview": 1770554960006
  }
}
  • Compare reset time (in milliseconds) with current time
  • If reset time < current time β†’ Rate limit EXPIRED (can be cleared)
  • If reset time > current time β†’ Rate limit ACTIVE (account blocked for that model)

2.5 Activity Analysis

Parse lastUsed and addedAt (milliseconds timestamps):

# Convert milliseconds to readable date
date -r $((1770554621674 / 1000)) "+%Y-%m-%d %H:%M:%S"

Activity Status:

Last Used Status
< 1 hour Active
1-24 hours Recent
> 24 hours Idle
Never Unused

PHASE 3: Configuration Analysis

3.1 Plugin Config (antigravity.json)

Setting Recommended Description
account_selection_strategy hybrid Balances load across accounts
switch_on_first_rate_limit true Auto-switch on rate limit
quota_fallback true Use Gemini CLI quota as backup
cli_first false (optional) Prioritize Gemini CLI quota

3.2 Active Account Index

Check activeIndex and activeIndexByFamily:

  • activeIndex: Currently selected account for round-robin
  • activeIndexByFamily.claude: Current account for Claude models
  • activeIndexByFamily.gemini: Current account for Gemini models

PHASE 4: Report Generation

Generate a comprehensive health report in this format:

## πŸ₯ Antigravity Health Report

**Generated**: [current datetime]
**Accounts**: [N] configured, [M] enabled

### Account Status

| Account | Token | projectId | Quota | Rate Limit | Last Used |
|---------|-------|-----------|-------|------------|-----------|
| email1 | βœ…/❌ | βœ…/❌ | 🟒/🟑/🟠/πŸ”΄/⚠️ | βœ…/β›” | time |

### Quota Details

**[email1]**
- Claude: [X]% remaining (resets: [datetime])
- Gemini Pro: [X]% remaining (resets: [datetime])
- Gemini Flash: [X]% remaining (resets: [datetime])

### Issues Found

1. ⚠️ [Issue description]
   - **Impact**: [what breaks]
   - **Fix**: [how to resolve]

### Recommendations

1. [Actionable recommendation]

### Configuration

- Strategy: [account_selection_strategy]
- Quota Fallback: [enabled/disabled]
- Active Index: [N]

PHASE 5: Auto-Fix Capabilities

You CAN perform these fixes automatically:

5.1 Clear Expired Rate Limits

If rate limit reset time has passed:

# Use jq to clear expired rate limits
jq '.accounts |= map(
  if .rateLimitResetTimes then
    .rateLimitResetTimes |= with_entries(select(.value > (now * 1000)))
  else . end
)' ~/.config/opencode/antigravity-accounts.json > /tmp/accounts.tmp && \
mv /tmp/accounts.tmp ~/.config/opencode/antigravity-accounts.json

5.2 Enable Missing quota_fallback

jq '. + {"quota_fallback": true}' ~/.config/opencode/antigravity.json > /tmp/config.tmp && \
mv /tmp/config.tmp ~/.config/opencode/antigravity.json

5.3 Refresh Quota Cache

Recommend user run:

opencode auth login
# Select "Check quotas"

DO NOT

  • Modify or expose refresh tokens
  • Delete accounts without explicit user request
  • Make API calls to Google (read local files only)
  • Modify projectId fields (requires re-auth)

TRIGGER PHRASES

Activate this skill when user asks:

  • "check quota" / "ζŸ₯诒配钝"
  • "account health" / "账号ε₯εΊ·"
  • "rate limit status" / "ι€ŸηŽ‡ι™εˆΆ"
  • "antigravity status"
  • "why am I getting 403"
  • "which account is being used"
  • "refresh quota"
Install via CLI
npx skills add https://github.com/cg2aigc/dotfiles --skill antigravity-health
Repository Details
star Stars 0
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator