360 Secure SkillHub
360 安全技能中心

OpenClaw Antigravity Sync Skill

通过 Node 脚本调用 Google Cloud Code Assist API 获取 Google Antigravity 可用模型与配额,更新 openclaw.json 中的模型列表和默认主模型,写入前自动备份配置,需预先完成 openclaw Google Antigravity 认证。

krnbwj
krnbwj
热度 85.01
最近更新 2026-05-11 17:26:07
分类:自动化依赖:代码执行 / 读写文件 / 第三方 API应用场景:工作流 / API 集成 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add openclaw-antigravity-sync
Metadata
name
antigravity-sync
description
Automatically discover and configure available Google Antigravity models and quotas.
metadata
{"openclaw":{"skillKey":"antigravity-sync","runtime":"node","requires":{"auth":["google-antigravity"]},"invocation":{"policy":"on-demand","triggers":[{"pattern":"sync antigravity"},{"pattern":"update models"},{"pattern":"fetch google models"}]}}}

Antigravity Sync

This skill queries the Antigravity API to discover available models and their quotas, then updates your openclaw.json configuration to match.

Usage

  1. Ensure you are authenticated: Run openclaw models auth login google-antigravity if you haven't already.

  2. Run the sync script:

    node skills/antigravity-sync/sync.cjs
    
  3. Verify Configuration: The script will output the primary model it selected. Check openclaw.json to see the full list of configured models.

Behavior

  • Fetches fetchAvailableModels from Google Cloud Code Assist API.
  • Updates models.providers["google-antigravity"].models with all non-exhausted models.
  • Sets agents.defaults.model.primary to the API's recommended default model (or preserves your manual selection if valid).
  • Preserves existing auth settings.
  • Safety: Backs up openclaw.json before writing.