agy-delegate
Delegate implementation work to agy — the antigravity multi-model coding agent CLI.
When to use
- A
.plan.mdor spec is finalized and ready for implementation - Work can be split into non-conflicting modules for parallel agents
- You want an autonomous agent that auto-approves tool calls and runs to completion
Core command
agy --dangerously-skip-permissions --prompt "<task>"
Key flags
| Flag | Purpose |
|---|---|
--dangerously-skip-permissions |
Auto-approve all tool calls (required for autonomous runs) |
--prompt "<task>" / -p "<task>" |
Run a single prompt non-interactively, print result, exit |
--prompt-interactive "<task>" / -i "<task>" |
Run initial prompt then continue the session interactively |
--model "<model>" |
Override model (see available models below) |
--add-dir <path> |
Add extra directory to workspace (repeatable) |
--sandbox |
Run in sandbox with terminal restrictions |
Available models
Gemini 3.5 Flash (Medium|High|Low)
Gemini 3.1 Pro (Low|High)
Claude Sonnet 4.6 (Thinking)
Claude Opus 4.6 (Thinking)
GPT-OSS 120B (Medium)
Default to Gemini 3.5 Flash (High) — fast, capable, and cost-effective for most implementation tasks. Only escalate to Claude Opus 4.6 (Thinking) for exceptionally complex architectural work.
Delegation patterns
Single agent — plan-to-implementation
agy --dangerously-skip-permissions --prompt "Read apps/my-app/docs/feature.plan.md and fully implement it. Do not stop until every item is complete. Run tests after each module."
Parallel agents — split by module
When work spans non-conflicting areas, spawn multiple agy processes via the Bash tool with run_in_background: true:
# Agent 1: backend
agy --dangerously-skip-permissions --prompt "Read docs/feature.plan.md and implement ONLY the backend changes in apps/service/. Run tests when done."
# Agent 2: mobile
agy --dangerously-skip-permissions --prompt "Read docs/feature.plan.md and implement ONLY the mobile changes in apps/mobile/. Do not touch apps/service/."
Split rules:
- Each agent works in a disjoint file set — no overlapping paths
- Each prompt explicitly scopes what to touch and what NOT to touch
- Write the plan so modules are independently implementable
With model override
# Default — recommended for most tasks
agy --dangerously-skip-permissions --model "Gemini 3.5 Flash (High)" --prompt "Read the plan at docs/auth-refactor.plan.md and implement it completely."
# Heavy lifting — complex architecture only
agy --dangerously-skip-permissions --model "Claude Opus 4.6 (Thinking)" --prompt "Read the plan at docs/auth-refactor.plan.md and implement it completely."
With extra workspace directories
agy --dangerously-skip-permissions --add-dir ../shared-types --prompt "Implement the API changes, referencing shared types in the added directory."
Prompt engineering for agy
Write prompts that are self-contained — agy starts with zero conversation context.
Effective prompt structure
- Point to the plan —
"Read <path>.plan.md" - Scope the work —
"implement ONLY the backend/mobile/frontend changes in <dir>" - Set completion criteria —
"Run tests after each module","Do not stop until every item is complete" - Forbid out-of-scope changes —
"Do not touch <other-dir>"
Example prompt template
Read <plan-path> and fully implement it.
Scope: ONLY files under <target-dir>/.
Do NOT modify files outside that directory.
After implementation, run the relevant test suite.
Do not stop until every item in the plan is complete.
Commit with a descriptive message when done.
Workflow integration (agy-strategy)
This skill is step 3 of the agy-strategy workflow from CLAUDE.md:
- Write
.plan.mdafter exploring the codebase - Review loop (acpx + gemini/codex review the plan)
- Delegate to agy (this skill) — spawn subagent(s) to implement
- Self-review + acpx review loop on the implementation
Running from Claude Code
Use the Bash tool with run_in_background: true and a generous timeout:
# Single agent
Bash({ command: 'agy --dangerously-skip-permissions --prompt "..."', run_in_background: true, timeout: 600000 })
# Parallel agents — send both in a single message
Bash({ command: 'agy --dangerously-skip-permissions --prompt "... backend ..."', run_in_background: true, timeout: 600000 })
Bash({ command: 'agy --dangerously-skip-permissions --prompt "... mobile ..."', run_in_background: true, timeout: 600000 })
Wait for background task notifications. Do not poll or sleep.