Neo Sub-Agent
Use this skill to design and generate focused sub-agent definitions for developer CLIs. Keep the user in control of scope, permissions, and target clients.
Core Rule
Do not invent client-specific schema. If the requested CLI, field, or file location is not documented in references/client-adapters.md or discoverable in the project, state the missing fact and generate only a neutral blueprint.
Workflow
1. Perceive
- Inspect the project before asking questions:
- Existing agent definitions:
.claude/agents/, .codex/agents/, .github/agents/, .agents/skills/.
- Project guidance:
AGENTS.md, CLAUDE.md, GEMINI.md, .github/copilot-instructions.md.
- Related skills or conventions in
skills/, .agents/skills/, .github/skills/, .claude/skills/, .codex/skills/.
- Identify the target clients from the user request or project evidence:
claude, codex, copilot, agy, or multiple.
- If multiple clients are plausible and the request does not specify one, ask one concise question before writing files.
2. Decide Whether a Sub-Agent Fits
Read references/sub-agent-design.md when the request involves architecture, multiple agents, or tradeoffs.
Use a sub-agent when at least one is true:
- The work produces verbose logs, search results, or file reads that should not pollute the main context.
- The work is a repeated specialist role such as code review, planning, test execution, research, migration analysis, or docs verification.
- The work can run independently or in a clearly bounded sequence.
- The role needs stricter tool access, sandboxing, model choice, or output contract than the main agent.
Prefer a normal skill or main-conversation instruction when:
- The task is a quick, targeted change.
- The agent needs frequent back-and-forth with the user.
- Multiple workers would edit the same files concurrently.
- The workflow depends on undocumented client behavior.
3. Define the Agent Spec
Collect or infer these fields, using safe defaults where reasonable:
name: lowercase kebab-case, under 64 characters.
description: trigger-focused; state exactly when to use the agent.
instructions: role, workflow, constraints, and output contract.
clients: target clients.
scope: project by default; use user only when the user asks for reusable personal agents.
tools: use the smallest useful set; prefer read-only for reviewers, researchers, planners, and auditors.
model and reasoning effort: omit unless the user asks or the client-specific reference gives a clear default.
handoff: what the parent agent should pass in and what the sub-agent must return.
validation: commands, checks, or review criteria the sub-agent should run or report.
4. Generate Files
Read references/client-adapters.md before generating client-specific files.
For repeatable output, create a JSON spec and run:
uv run skills/neo-sub-agent/scripts/render-sub-agent.py --spec spec.json
If uv is not available and the script has no external dependencies, use:
python skills/neo-sub-agent/scripts/render-sub-agent.py --spec spec.json
Review the dry-run JSON. If the target paths and content are correct, write files:
uv run skills/neo-sub-agent/scripts/render-sub-agent.py --spec spec.json --write
Use --force only when replacing an existing agent file is explicitly intended.
5. Review
Before finalizing, check:
- The agent has one narrow job and does not duplicate an existing agent.
- The description is specific enough for automatic delegation.
- Tool permissions match the role and avoid broad write/shell access when unnecessary.
- The output contract is short, concrete, and easy for the parent agent to synthesize.
- Antigravity output is labeled as a skill/delegation blueprint, not a custom sub-agent manifest.
Output Format
When reporting back to the user, use Traditional Chinese (Taiwan):
## 已新增
- [client] `path/to/agent-file`
## 設計重點
- 角色:
- 觸發條件:
- 權限:
- 回傳格式:
## 驗證
- `command`
Constraints
- Do not create broad "do everything" agents.
- Do not give background agents write or shell access unless the task requires it.
- Do not create multiple agents that can edit the same file set in parallel.
- Do not treat model-generated review as a replacement for deterministic tests.
1---2name: neo-sub-agent3description: Use this skill when the user asks to design, create, review, or convert sub-agents, custom agents, worker/reviewer/planner agents, background agents, or multi-agent workflows for Antigravity CLI, Codex, Claude Code, GitHub Copilot CLI, or neutral agent blueprints.4---56# Neo Sub-Agent78Use this skill to design and generate focused sub-agent definitions for developer CLIs. Keep the user in control of scope, permissions, and target clients.910## Core Rule11Do not invent client-specific schema. If the requested CLI, field, or file location is not documented in `references/client-adapters.md` or discoverable in the project, state the missing fact and generate only a neutral blueprint.1213## Workflow1415### 1. Perceive161. Inspect the project before asking questions:17 - Existing agent definitions: `.claude/agents/`, `.codex/agents/`, `.github/agents/`, `.agents/skills/`.18 - Project guidance: `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`, `.github/copilot-instructions.md`.19 - Related skills or conventions in `skills/`, `.agents/skills/`, `.github/skills/`, `.claude/skills/`, `.codex/skills/`.202. Identify the target clients from the user request or project evidence: `claude`, `codex`, `copilot`, `agy`, or multiple.213. If multiple clients are plausible and the request does not specify one, ask one concise question before writing files.2223### 2. Decide Whether a Sub-Agent Fits24Read `references/sub-agent-design.md` when the request involves architecture, multiple agents, or tradeoffs.2526Use a sub-agent when at least one is true:27- The work produces verbose logs, search results, or file reads that should not pollute the main context.28- The work is a repeated specialist role such as code review, planning, test execution, research, migration analysis, or docs verification.29- The work can run independently or in a clearly bounded sequence.30- The role needs stricter tool access, sandboxing, model choice, or output contract than the main agent.3132Prefer a normal skill or main-conversation instruction when:33- The task is a quick, targeted change.34- The agent needs frequent back-and-forth with the user.35- Multiple workers would edit the same files concurrently.36- The workflow depends on undocumented client behavior.3738### 3. Define the Agent Spec39Collect or infer these fields, using safe defaults where reasonable:40- `name`: lowercase kebab-case, under 64 characters.41- `description`: trigger-focused; state exactly when to use the agent.42- `instructions`: role, workflow, constraints, and output contract.43- `clients`: target clients.44- `scope`: `project` by default; use `user` only when the user asks for reusable personal agents.45- `tools`: use the smallest useful set; prefer read-only for reviewers, researchers, planners, and auditors.46- `model` and reasoning effort: omit unless the user asks or the client-specific reference gives a clear default.47- `handoff`: what the parent agent should pass in and what the sub-agent must return.48- `validation`: commands, checks, or review criteria the sub-agent should run or report.4950### 4. Generate Files51Read `references/client-adapters.md` before generating client-specific files.5253For repeatable output, create a JSON spec and run:5455```bash56uv run skills/neo-sub-agent/scripts/render-sub-agent.py --spec spec.json57```5859If `uv` is not available and the script has no external dependencies, use:6061```bash62python skills/neo-sub-agent/scripts/render-sub-agent.py --spec spec.json63```6465Review the dry-run JSON. If the target paths and content are correct, write files:6667```bash68uv run skills/neo-sub-agent/scripts/render-sub-agent.py --spec spec.json --write69```7071Use `--force` only when replacing an existing agent file is explicitly intended.7273### 5. Review74Before finalizing, check:75- The agent has one narrow job and does not duplicate an existing agent.76- The description is specific enough for automatic delegation.77- Tool permissions match the role and avoid broad write/shell access when unnecessary.78- The output contract is short, concrete, and easy for the parent agent to synthesize.79- Antigravity output is labeled as a skill/delegation blueprint, not a custom sub-agent manifest.8081## Output Format82When reporting back to the user, use Traditional Chinese (Taiwan):8384```markdown85## 已新增86- [client] `path/to/agent-file`8788## 設計重點89- 角色:90- 觸發條件:91- 權限:92- 回傳格式:9394## 驗證95- `command`96```9798## Constraints99- Do not create broad "do everything" agents.100- Do not give background agents write or shell access unless the task requires it.101- Do not create multiple agents that can edit the same file set in parallel.102- Do not treat model-generated review as a replacement for deterministic tests.