setup-antigravity-devcontainer
Install Antigravity into an existing shared devcontainer generated by the setup-devcontainer skill — its own install step, optional YOLO alias, optional link making the shared skills directory visible to agy, and optional automatic skill sync, added idempotently without touching anything else in the container. Use when the user wants to add Antigravity to a devcontainer, or re-run this after the container definition already exists.
- License 许可
- MIT
- 所属仓库
- ken-guru/skills
- 最近更新
- 2026-11-01
- Stars
- ★ 1
- Forks
- 1
01 前言 Front Matter
- name
- setup-antigravity-devcontainer
- description
- Install Antigravity into an existing shared devcontainer generated by the setup-devcontainer skill — its own install step, optional YOLO alias, optional link making the shared skills directory visible to agy, and optional automatic skill sync, added idempotently without touching anything else in the container. Use when the user wants to add Antigravity to a devcontainer, or re-run this after the container definition already exists.
02 资源文件 6
- 脚本templates/install-block.sh982 B
- 参考文档templates/network-manifest-entries.json980 B
- 脚本templates/post-start-block.sh818 B
- 参考文档templates/readme-bullet.md14 B
- 脚本templates/skills-link-block.sh2.1 KB
- 脚本templates/yolo-alias-block.sh860 B
03 SKILL.md 正文
Setup Antigravity Devcontainer
Adds Antigravity to a devcontainer already generated by the
setup-devcontainer skill. This skill never
touches devcontainer.json or the Dockerfile — it appends its own
marker-keyed content to post-create.sh, post-start.sh (if the skills link
or skill sync is opted into), and README.md, and idempotently ensures its
own Network Manifest entry exists in .devcontainer/network-manifest.json.
0. Security & Trust
This skill's generated automation touches three areas an external audit may flag. Each is opt-in, scoped to this container, and exists for a specific reason — none of it runs on the host, only inside the generated devcontainer.
- Installer Provenance: installs Antigravity CLI via Google's own official installer
(
https://antigravity.google/cli/install.sh). Runs once, at container creation (postCreateCommand), not on every start — and only if~/.local/bin/agydoesn't already exist. - Agent Authority: the optional
agy-yoloalias usesagy --mode accept-edits, deliberately not--dangerously-skip-permissions --sandbox— a filed upstream bug (antigravity-cli#36) makes that combination a no-op sandbox, so it would grant no real containment while looking like it did. Stated plainly:accept-editsalone isn't a strong safety boundary either — this skill's own reported next steps also walk through setting up a curatedpermissions.allowlist (~/.gemini/antigravity-cli/settings.json, starting fromgit/gh/ls/cat, neverrm/curl/rawbash -c/a wildcard) as a manual, once-per-machine step, since that's the mechanism actually doing the restricting. Off by default; only added if accepted during setup. - Skill Source Trust: if skill sync is accepted, the source(s) you name are re-synced into
the Shared Skills Directory (
~/.agents/skills) on every container start. Nothing is wiped — a skill removed upstream stays until deleted by hand. The real trust decision is the source itself: naming one means trusting its skills unattended, with no per-skill review step, every time the container starts. Off by default. The optional skills link (~/.gemini/skills→~/.agents/skills) adds no download and no wipe; it only letsagysee the same shared directory that Codex and Copilot already read natively. It never removes a non-empty directory or overrides a link that points elsewhere.
See ADR-0007 for the full reasoning and the alternatives rejected.
1. Detect the base devcontainer
test -f .devcontainer/devcontainer.json && test -f .devcontainer/post-create.sh && echo ok
If either file is missing, refuse — tell the user to run
setup-devcontainer first, and stop. Do not generate or patch anything.
2. Ask this tool's options
- YOLO alias: add
agy-yolofor fast, unattended iteration? Does not use--dangerously-skip-permissions --sandbox— a filed upstream bug (antigravity-cli#36) makes that combination a no-op sandbox. If accepted, this skill's reported next steps still include the curatedpermissions.allow-list guidance as a manual, once-per-machine step. - Skills link (default yes, asked whether or not skill sync is
accepted): make
agysee the Shared Skills Directory (~/.agents/skills, where theskillsCLI writes every global install for this CLI) by linking~/.gemini/skillsto it on every container start? Without the linkagydoes not list those skills. It also makes skills you install by hand later withnpx skills add -gvisible immediately. No download, no wipe. - Automatic skill sync: sync AI-agent skills into the Shared Skills
Directory (
~/.agents/skills) automatically on every container start? Same mechanism as the other CLI skills — two ready-made suites (mattpocock/skills,ken-guru/skills) plus any individually named skill, validated live vianpx -y skills add <source> --listbefore rendering anything.
3. Patch post-create.sh
Append templates/install-block.sh verbatim:
scripts/patch-if-absent.sh append .devcontainer/post-create.sh "# --- Antigravity ---" templates/install-block.sh
If YOLO alias was accepted, also append templates/yolo-alias-block.sh, under its own independent marker:
scripts/patch-if-absent.sh append .devcontainer/post-create.sh "# --- Antigravity yolo-alias ---" templates/yolo-alias-block.sh
4. Patch the Network Manifest — unconditional, every run
Ensure Antigravity's own .antigravity.networkAllowlist entry exists in
.devcontainer/network-manifest.json, regardless of any answer above — this
is what lets an opted-in network firewall (a separate, base-owned layer)
allow the hosts Antigravity itself needs:
scripts/patch-json-array-if-absent.sh .devcontainer/network-manifest.json .antigravity.networkAllowlist templates/network-manifest-entries.json
5. Patch post-start.sh (skills link and/or skill sync)
Each part is independent, under its own marker, and only applied if its option in step 2 was accepted.
Skills link. Append templates/skills-link-block.sh verbatim:
scripts/patch-if-absent.sh append .devcontainer/post-start.sh "# --- Antigravity skills-link ---" templates/skills-link-block.sh
agy does not read ~/.agents/skills, but does read ~/.gemini/skills, which
this link points there. That location is not documented by Google for the
CLI (its skills page lists ~/.gemini/antigravity-cli/skills); it has worked
reliably, but if /skills in agy ever stops listing synced skills, look
here first. Fallbacks, in order: the same link at
~/.gemini/antigravity-cli/skills, then a copy into
~/.gemini/config/skills (measured to load with no permission prompt).
Skill sync. Render templates/post-start-block.sh with
{{SKILLS_SOURCES_COMMANDS}} substituted to one npx -y skills add <source> --skill '*' -a antigravity-cli -y --copy -g line per whole-suite source (or
--skill '<name>' per individual pick), then append it:
scripts/patch-if-absent.sh append .devcontainer/post-start.sh "# --- Antigravity skill-sync ---" <rendered-block>
A container that already has an older # --- Antigravity skill-sync ---
block keeps it unchanged (the marker check skips it) — that is fine. Its
rm -rf /home/vscode/.gemini/antigravity/skills/* line acts on a directory
nothing writes to and is now dead; see step 8.
6. Patch README.md
scripts/patch-if-absent.sh append .devcontainer/README.md "- Antigravity" templates/readme-bullet.md
7. Verify
Re-run every patch-if-absent.sh/patch-json-array-if-absent.sh command
from steps 3–6 a second time — each should produce zero diff. No dedicated
verify script exists for this skill; this re-run is the verification.
8. Report next steps
Tell the user: rebuild or reopen the container, run agy and log in. If the
skills link was accepted, run /skills in agy to confirm the synced skills
are listed. If .devcontainer/post-start.sh still contains the line
rm -rf /home/vscode/.gemini/antigravity/skills/* (from an older version of
this skill), tell them it is now dead and safe to delete by hand — this skill
never rewrites a block it already wrote. If YOLO was accepted, agy-yolo is
available in every new terminal — and
walk them through setting up a curated permissions.allow list in
~/.gemini/antigravity-cli/settings.json (starting from git, gh,
ls, cat, never rm/curl/raw bash -c/a wildcard) as a manual,
once-per-machine step, since --dangerously-skip-permissions --sandbox
doesn't actually sandbox anything for this CLI.
04 同仓库更多 Skills
unslop
Load when the user asks to edit prose for a more natural voice while preserving meaning, tone, technical precision, and structured output.
setup-devcontainer
Generate a shared devcontainer (Ubuntu base image, Node, GitHub CLI, one persistent config volume) in the current repo — one container every AI CLI installs into, added independently via its four companion setup-<tool>-devcontainer skills — optionally layering on SSH deploy-key/signing-key automation for agent-driven git push and signed commits, and/or an opt-in default-deny network egress firewall (iptables+ipset, allowlist derived from a Network Manifest). Use when the user wants to add a devcontainer to a repo, add SSH key automation to an existing devcontainer, restrict a devcontainer's outbound network, or connect a Local Checkout to a real GitHub repo. Not for adding an AI CLI itself — run the matching setup-<tool>-devcontainer skill for that, after this one.
setup-copilot-devcontainer
Install GitHub Copilot CLI into an existing shared devcontainer generated by the setup-devcontainer skill — its own install step, optional YOLO guidance, and optional automatic skill sync, added idempotently without touching anything else in the container. Use when the user wants to add Copilot CLI to a devcontainer, or re-run this after the container definition already exists.
setup-codex-devcontainer
Install Codex into an existing shared devcontainer generated by the setup-devcontainer skill — its own install step, sandbox capability grant, optional YOLO alias, and optional automatic skill sync, added idempotently without touching anything else in the container. Use when the user wants to add Codex to a devcontainer, or re-run this after the container definition already exists.
setup-claude-devcontainer
Install Claude Code into an existing shared devcontainer generated by the setup-devcontainer skill — its own install step, optional YOLO alias, and optional automatic skill sync, added idempotently without touching anything else in the container. Use when the user wants to add Claude Code to a devcontainer, or re-run this after the container definition already exists.
researching-sources
Finds, vets, and organises credible sources for a question into a Source Set, judging each source's credibility and turning conflicting claims into explicit questions for the person. Use when someone needs sources, evidence, citations, or fact-checking for a talk, report, article, or decision, with or without sources in hand.