跳到正文
Skillpedia
安全48k · #6247

agy-auto

它能做什么

agy-auto 是 Antigravity CLI(agy)的一个安全系统,让 agy 可以自动运行任务,不必每次都手动授权。它会在执行任务前检查其是否安全。

适用场景

  • ✓当你希望 agy 在后台无人值守地运行任务时。
  • ✓当你需要控制 agy 可以执行哪些命令,比如访问文件或网络时。
  • ✓当你想搭建一个安全的 agy 结对编程环境时。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/skills/agy-auto/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/skills/agy-auto/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我该如何设置 agy-auto,让它安全地无人值守运行任务?”

每周 5 个新技能,1 分钟读完。

工作原理

它的工作方式是检查 agy 尝试执行的每一条命令。首先,它会拦截已知的危险命令。然后,它会放行简单、安全的命令。如果它无法确定,就会交给 AI 模型来判断,或者用一个特殊的授权码请你确认。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

agy-auto — Antigravity Auto-Permission & Security Gate

Overview

agy-auto is a PreToolUse hook and security harness for Google Antigravity CLI (agy) that supports a reviewed unattended-execution policy without relying on --dangerously-skip-permissions. It passes every pending tool call through a multi-layered policy gate: deterministic hard-deny rules, deterministic fast-allow for workspace-scoped and read-only operations, an LLM classifier fallback (Gemini Flash Lite or local llama.cpp), and single-use scoped token approvals with Zero Ambient Authority.

When to Use This Skill

  • Use when running Antigravity CLI (agy) unattended or in background agent loops and you want automated tool permissions without exposing system files or credentials.
  • Use when you need granular, auditable controls over shell commands, file modifications, and network egress during agy workflows.
  • Use when setting up a secure pair-programming environment with Antigravity that reduces tool-call exposure within a verified workspace boundary.

How It Works

Step 1: Review, Pin, and Install agy-auto

[!IMPORTANT] Because agy-auto installs as an active PreToolUse hook on the permission evaluation path, never clone a mutable branch directly into your live plugin directory. Always clone to a temporary staging folder, pin an immutable release tag or commit SHA, and inspect the codebase before making the hook executable.

Option A: Native Antigravity Plugin (Recommended)

# 1. Clone into a temporary review directory and checkout an immutable release tag
git clone https://github.com/onkarbadve/agy-auto.git /tmp/agy-auto-review
cd /tmp/agy-auto-review
git checkout <verified-full-commit-sha>

# 2. Inspect hook.sh and engine/ files before deployment
less hook.sh
python3 -m unittest -v tests/test_engine.py

# 3. Once reviewed and verified, copy to the Antigravity plugin directory and set permissions
# Host activation requires explicit user approval, an existing-config backup,
# and a reviewed non-overwriting installation into the confirmed host path.

Only if the exact CLI/hook combination has been verified to fail closed on missing, failed and tampered hooks, and the user explicitly approves this host permission change, configure toolPermission: "always-proceed" in ~/.gemini/antigravity-cli/settings.json so hooks can gate tool calls:

{
  "toolPermission": "always-proceed"
}

Option B: Global Hook via Installer

# 1. Clone to an isolated location and pin release
git clone https://github.com/onkarbadve/agy-auto.git ~/.local/share/agy-auto
cd ~/.local/share/agy-auto
git checkout <verified-full-commit-sha>

# 2. Review and run the installer
chmod +x hook.sh
./install.sh                  # registers hook in hooks.json, sets always-proceed, runs smoke tests

Step 2: Policy Evaluation Layers

agy-auto evaluates each tool invocation through sequential layers (first match wins):

  1. Hard Deny: Immediately blocks recursive deletes outside workspace, credential reads (~/.ssh, .env, cloud tokens), git history rewrites (push --force, rebase), package publishing, system file writes (/etc, shell rc), and gate tampering.
  2. Fast Allow: Immediately permits parsed read-only commands (cat, grep, git status) and workspace-confined writes without invoking an LLM.
  3. Classifier: Ambiguous or grey-area commands fall through to an LLM classifier (a configured currently available provider model (verify pricing and private-context transmission), or a local llama.cpp / Ollama endpoint) that reviews the pending call against conversation context and fail-closes on timeout.
  4. Scoped Action Approval: If a command is denied or needs human judgment, the engine issues a single-use 6-character action token bound strictly to (tool, normalized_cmd, cwd). You approve it by replying > agy-approve <token> in chat. Conversational phrases like "yes" or "proceed" are ignored to prevent ambient authority leakage.

Before activation, test allowed and denied operations in disposable fixtures, including symlink/path escapes, shell expansions, network requests, missing hook, classifier timeout and token replay. A unit-test pass is not proof all host access is intercepted. Preserve a verified disable/rollback path. No model classifier is merge or policy authority.

Examples

Example 1: Approving a Blocked Command

…

常见问题

什么是 `--dangerously-skip-permissions`?

它是 Antigravity CLI 中的一个选项,会完全关闭安全检查。agy-auto 是一个更安全的替代方案,会保留这些检查。

如何批准 agy-auto 拦截的命令?

如果 agy-auto 无法确定某条命令是否安全,它会要求你提供授权码(例如:“> agy-approve a1b2c3”)。你需要在对话中原样回复这个授权码,才能让该条命令运行一次。

我可以离线使用 agy-auto 吗?

可以。你可以编辑 `policy.toml` 配置文件,让 agy-auto 使用本地 AI 模型(比如 llama.cpp 或 Ollama),而不是在线服务。

详情

作者的原始描述

Configure agy-auto PreToolUse security gate to run Antigravity CLI (agy) unattended with layered policy controls instead of --dangerously-skip-permissions.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#6247
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能