Multi Agent
Overview
Use this skill to turn a user goal into a bounded agent brief. The brief must make permissions, ownership, forbidden actions, expected output, and stop conditions explicit before any delegated or role-scoped work begins.
Do not spawn child agents just because this skill is active. Follow the active system/developer rules for whether delegation is allowed. If delegation is not allowed, use the same brief structure for your own plan, handoff, or review notes.
Runtime Fit
This skill is Markdown-only and has no OS-specific runtime dependency. A normal coding model can draft simple briefs. Use a stronger reasoning model for security review, architecture exploration, long-horizon implementation, or multi-agent coordination.
Author-known-good profile for heavier workflows: Codex-style agent mode, GPT-5.5-class reasoning model, and high or xhigh reasoning when available. Multimodal input is only needed when the delegated task itself involves images, screenshots, or visual artifacts.
Workflow
- Identify the task class: exploration, implementation, security review, verification, or handoff.
- Choose one role only unless the user explicitly asks for multiple roles.
- Fill every required brief field with concrete paths, commands, boundaries, and stop conditions.
- Make ownership disjoint for implementation work.
- Set forbidden actions conservatively.
- Require findings and evidence before summaries.
- Stop if permissions, ownership, or data access are unclear enough that proceeding would risk unrelated changes.
Role Selection
- read-only explorer: Use for codebase questions, architecture tracing, bug localization, auth flow reading, data-flow mapping, or risk discovery. Allow reading and non-mutating commands only.
- scoped implementation worker: Use for a bounded patch with clear file ownership. Allow writes only inside the listed files or directories.
- security reviewer: Use for auth, permissions, secrets, injection, SSRF, XSS, unsafe file access, data exposure, or trust-boundary review. Default to read-only unless explicitly assigned a fix.
- verification worker: Use for tests, lint, repro scripts, screenshots, logs, or confirming a behavior after implementation. Allow command execution; allow writes only for temporary artifacts if needed.
- handoff writer: Use to summarize state for a future agent. Do not modify production files unless explicitly requested.
Required Brief Template
Use this exact structure when drafting a brief:
Role:
<one concrete role, e.g. read-only auth explorer / scoped implementation worker / security reviewer>
Goal:
<what to answer or complete, and the boundary of done>
Context:
<repo path, relevant files, current error/output, user goal, prior findings, assumptions>
Allowed actions:
<read/write/network/test permissions; exact commands or command classes if useful>
Ownership:
<for write tasks, exact files/directories/modules the agent owns; for read-only tasks, say "read-only, no write ownership">
Forbidden actions:
<files/dirs not to touch, destructive commands, unrelated refactors, broad rewrites, asking user, spawning children, external services, etc.>
Output format:
findings:
patch summary:
test result:
confidence:
open questions:
Stop condition:
<what counts as done; what conditions require stopping and reporting a blocker>
Field Guidance
Role
- Name the role as behavior, not a title. Prefer
read-only auth explorer over expert.
- Include read/write posture in the role when it matters.
Goal
- State the user-visible outcome.
- Include what is out of scope.
- For review tasks, say whether to find issues only or also propose patches.
Context
- Include absolute repo path when known.
- List relevant files and commands already run.
- Include exact error text, route, test name, screenshot path, or data file when available.
- Mark assumptions explicitly.
Allowed actions
- For read-only roles: allow
rg, sed, ls, git diff, git show, test/log reads, and local screenshots only if relevant.
- For implementation roles: allow writes only to owned files plus necessary tests.
- For network access: state whether it is allowed, disallowed, or only allowed for official docs / local services.
- For commands: distinguish read-only commands from mutating commands.
Ownership
- Assign exact files, directories, or modules.
- For parallel workers, keep write sets disjoint.
- Tell implementation workers they are not alone in the codebase and must not revert others' edits.
Forbidden actions
- Always include
do not run destructive git commands, unless the user explicitly requested them.
- Always include
do not revert unrelated changes.
- Default to
do not spawn child agents.
- Default to
do not ask the user; stop and report blockers instead.
- Add domain-specific exclusions such as auth secrets, migrations, generated data, or public UI files when not owned.
Output format
- For reviews, put findings first and order by severity with file/line evidence.
- For implementation, include patch summary and tests.
- For exploration, include findings, evidence, confidence, and next recommended step.
- Use
open questions only for unresolved blockers or real ambiguity.
Stop condition
- Define both success and blocker exits.
- Stop on missing files, impossible permissions, unclear ownership, failing required setup, or evidence that the task would require out-of-scope changes.
Ready-Made Briefs
Read-Only Auth Explorer
Role:
read-only auth explorer
Goal:
Trace the auth flow and identify where <issue> can originate. Do not modify code.
Context:
Repo: <absolute path>
Relevant files/routes: <list>
Error/user symptom: <exact text>
Existing judgment: <known assumptions or prior findings>
Allowed actions:
Read files and run read-only commands such as rg, sed, ls, git diff, git show, and tests in dry/read-only mode if they do not write artifacts.
Ownership:
read-only, no write ownership.
Forbidden actions:
Do not edit files. Do not run migrations or destructive commands. Do not change auth config or secrets. Do not ask the user. Do not spawn child agents.
Output format:
findings: ordered by likelihood/severity with file and line references
patch summary: none
test result: commands run or not run
confidence: high/medium/low with reason
open questions: only blockers
Stop condition:
Complete when the likely root cause and evidence are identified. Stop and report if required files or logs are unavailable.
Scoped Implementation Worker
Role:
scoped implementation worker
Goal:
Implement <bounded behavior> without changing unrelated behavior.
Context:
Repo: <absolute path>
Relevant files: <list>
User goal: <goal>
Existing constraints: <constraints>
Allowed actions:
Edit only owned files. Run focused tests/lint/typecheck related to the touched files. Read adjacent files as needed.
Ownership:
Owns writes to: <exact files/directories>
This worker is not alone in the codebase; accommodate others' changes and do not revert edits you did not make.
Forbidden actions:
Do not edit outside ownership. Do not refactor unrelated code. Do not run destructive git commands. Do not change generated data unless listed. Do not ask the user. Do not spawn child agents.
Output format:
findings: any blockers or risks found before/during implementation
patch summary: files changed and behavior changed
test result: commands run and outcomes
confidence: high/medium/low with reason
open questions: only unresolved blockers
Stop condition:
Complete when the patch is applied and focused validation has run. Stop if the fix requires files outside ownership or a product decision not in context.
Security Reviewer
Role:
security reviewer
Goal:
Review <scope> for auth, authorization, secret handling, injection, SSRF, XSS, file access, and data exposure risks. Do not implement fixes unless explicitly allowed.
Context:
Repo: <absolute path>
Scope: <files/routes/modules>
Threat model: <user/admin/public/internal, trust boundaries, sensitive data>
Recent changes or concern: <summary>
Allowed actions:
Read scoped files and adjacent security-relevant code. Run read-only searches. Run tests only if they are non-mutating or clearly scoped.
Ownership:
read-only, no write ownership unless a separate implementation scope is provided.
Forbidden actions:
Do not edit files. Do not change auth, secrets, environment, migrations, or policy files. Do not run destructive commands. Do not ask the user. Do not spawn child agents.
Output format:
findings: severity, exploit path, evidence, affected files/lines, recommended fix
patch summary: none unless explicitly assigned
test result: commands run or not run
confidence: high/medium/low with reason
open questions: only blockers
Stop condition:
Complete when scoped risks are reviewed and findings are prioritized. Stop if the threat model or required files are missing.
Brief Quality Checklist
Before using or sending the brief, verify:
- The role matches the allowed actions.
- The goal has a clear boundary.
- Context includes exact paths or artifacts.
- Write ownership is explicit and narrow.
- Forbidden actions include no unrelated reverts and no destructive commands.
- Output format asks for evidence, not just conclusions.
- Stop condition prevents scope creep.
1---2name: multi-agent3description: Create tight, auditable task briefs for multi-agent or sub-agent work. Use when Codex needs to plan, delegate, scope, or review work across roles such as read-only explorer, scoped implementation worker, auth/security reviewer, verification agent, or handoff agent; especially when the user provides or asks for a Role/Goal/Context/Allowed actions/Ownership/Forbidden actions/Output format/Stop condition template.4---56# Multi Agent78## Overview910Use this skill to turn a user goal into a bounded agent brief. The brief must make permissions, ownership, forbidden actions, expected output, and stop conditions explicit before any delegated or role-scoped work begins.1112Do not spawn child agents just because this skill is active. Follow the active system/developer rules for whether delegation is allowed. If delegation is not allowed, use the same brief structure for your own plan, handoff, or review notes.1314## Runtime Fit1516This skill is Markdown-only and has no OS-specific runtime dependency. A normal coding model can draft simple briefs. Use a stronger reasoning model for security review, architecture exploration, long-horizon implementation, or multi-agent coordination.1718Author-known-good profile for heavier workflows: Codex-style agent mode, GPT-5.5-class reasoning model, and `high` or `xhigh` reasoning when available. Multimodal input is only needed when the delegated task itself involves images, screenshots, or visual artifacts.1920## Workflow21221. Identify the task class: exploration, implementation, security review, verification, or handoff.232. Choose one role only unless the user explicitly asks for multiple roles.243. Fill every required brief field with concrete paths, commands, boundaries, and stop conditions.254. Make ownership disjoint for implementation work.265. Set forbidden actions conservatively.276. Require findings and evidence before summaries.287. Stop if permissions, ownership, or data access are unclear enough that proceeding would risk unrelated changes.2930## Role Selection3132- **read-only explorer**: Use for codebase questions, architecture tracing, bug localization, auth flow reading, data-flow mapping, or risk discovery. Allow reading and non-mutating commands only.33- **scoped implementation worker**: Use for a bounded patch with clear file ownership. Allow writes only inside the listed files or directories.34- **security reviewer**: Use for auth, permissions, secrets, injection, SSRF, XSS, unsafe file access, data exposure, or trust-boundary review. Default to read-only unless explicitly assigned a fix.35- **verification worker**: Use for tests, lint, repro scripts, screenshots, logs, or confirming a behavior after implementation. Allow command execution; allow writes only for temporary artifacts if needed.36- **handoff writer**: Use to summarize state for a future agent. Do not modify production files unless explicitly requested.3738## Required Brief Template3940Use this exact structure when drafting a brief:4142```markdown43Role:44 <one concrete role, e.g. read-only auth explorer / scoped implementation worker / security reviewer>4546Goal:47 <what to answer or complete, and the boundary of done>4849Context:50 <repo path, relevant files, current error/output, user goal, prior findings, assumptions>5152Allowed actions:53 <read/write/network/test permissions; exact commands or command classes if useful>5455Ownership:56 <for write tasks, exact files/directories/modules the agent owns; for read-only tasks, say "read-only, no write ownership">5758Forbidden actions:59 <files/dirs not to touch, destructive commands, unrelated refactors, broad rewrites, asking user, spawning children, external services, etc.>6061Output format:62 findings:63 patch summary:64 test result:65 confidence:66 open questions:6768Stop condition:69 <what counts as done; what conditions require stopping and reporting a blocker>70```7172## Field Guidance7374**Role**75- Name the role as behavior, not a title. Prefer `read-only auth explorer` over `expert`.76- Include read/write posture in the role when it matters.7778**Goal**79- State the user-visible outcome.80- Include what is out of scope.81- For review tasks, say whether to find issues only or also propose patches.8283**Context**84- Include absolute repo path when known.85- List relevant files and commands already run.86- Include exact error text, route, test name, screenshot path, or data file when available.87- Mark assumptions explicitly.8889**Allowed actions**90- For read-only roles: allow `rg`, `sed`, `ls`, `git diff`, `git show`, test/log reads, and local screenshots only if relevant.91- For implementation roles: allow writes only to owned files plus necessary tests.92- For network access: state whether it is allowed, disallowed, or only allowed for official docs / local services.93- For commands: distinguish read-only commands from mutating commands.9495**Ownership**96- Assign exact files, directories, or modules.97- For parallel workers, keep write sets disjoint.98- Tell implementation workers they are not alone in the codebase and must not revert others' edits.99100**Forbidden actions**101- Always include `do not run destructive git commands`, unless the user explicitly requested them.102- Always include `do not revert unrelated changes`.103- Default to `do not spawn child agents`.104- Default to `do not ask the user`; stop and report blockers instead.105- Add domain-specific exclusions such as auth secrets, migrations, generated data, or public UI files when not owned.106107**Output format**108- For reviews, put findings first and order by severity with file/line evidence.109- For implementation, include patch summary and tests.110- For exploration, include findings, evidence, confidence, and next recommended step.111- Use `open questions` only for unresolved blockers or real ambiguity.112113**Stop condition**114- Define both success and blocker exits.115- Stop on missing files, impossible permissions, unclear ownership, failing required setup, or evidence that the task would require out-of-scope changes.116117## Ready-Made Briefs118119### Read-Only Auth Explorer120121```markdown122Role:123 read-only auth explorer124125Goal:126 Trace the auth flow and identify where <issue> can originate. Do not modify code.127128Context:129 Repo: <absolute path>130 Relevant files/routes: <list>131 Error/user symptom: <exact text>132 Existing judgment: <known assumptions or prior findings>133134Allowed actions:135 Read files and run read-only commands such as rg, sed, ls, git diff, git show, and tests in dry/read-only mode if they do not write artifacts.136137Ownership:138 read-only, no write ownership.139140Forbidden actions:141 Do not edit files. Do not run migrations or destructive commands. Do not change auth config or secrets. Do not ask the user. Do not spawn child agents.142143Output format:144 findings: ordered by likelihood/severity with file and line references145 patch summary: none146 test result: commands run or not run147 confidence: high/medium/low with reason148 open questions: only blockers149150Stop condition:151 Complete when the likely root cause and evidence are identified. Stop and report if required files or logs are unavailable.152```153154### Scoped Implementation Worker155156```markdown157Role:158 scoped implementation worker159160Goal:161 Implement <bounded behavior> without changing unrelated behavior.162163Context:164 Repo: <absolute path>165 Relevant files: <list>166 User goal: <goal>167 Existing constraints: <constraints>168169Allowed actions:170 Edit only owned files. Run focused tests/lint/typecheck related to the touched files. Read adjacent files as needed.171172Ownership:173 Owns writes to: <exact files/directories>174 This worker is not alone in the codebase; accommodate others' changes and do not revert edits you did not make.175176Forbidden actions:177 Do not edit outside ownership. Do not refactor unrelated code. Do not run destructive git commands. Do not change generated data unless listed. Do not ask the user. Do not spawn child agents.178179Output format:180 findings: any blockers or risks found before/during implementation181 patch summary: files changed and behavior changed182 test result: commands run and outcomes183 confidence: high/medium/low with reason184 open questions: only unresolved blockers185186Stop condition:187 Complete when the patch is applied and focused validation has run. Stop if the fix requires files outside ownership or a product decision not in context.188```189190### Security Reviewer191192```markdown193Role:194 security reviewer195196Goal:197 Review <scope> for auth, authorization, secret handling, injection, SSRF, XSS, file access, and data exposure risks. Do not implement fixes unless explicitly allowed.198199Context:200 Repo: <absolute path>201 Scope: <files/routes/modules>202 Threat model: <user/admin/public/internal, trust boundaries, sensitive data>203 Recent changes or concern: <summary>204205Allowed actions:206 Read scoped files and adjacent security-relevant code. Run read-only searches. Run tests only if they are non-mutating or clearly scoped.207208Ownership:209 read-only, no write ownership unless a separate implementation scope is provided.210211Forbidden actions:212 Do not edit files. Do not change auth, secrets, environment, migrations, or policy files. Do not run destructive commands. Do not ask the user. Do not spawn child agents.213214Output format:215 findings: severity, exploit path, evidence, affected files/lines, recommended fix216 patch summary: none unless explicitly assigned217 test result: commands run or not run218 confidence: high/medium/low with reason219 open questions: only blockers220221Stop condition:222 Complete when scoped risks are reviewed and findings are prioritized. Stop if the threat model or required files are missing.223```224225## Brief Quality Checklist226227Before using or sending the brief, verify:228229- The role matches the allowed actions.230- The goal has a clear boundary.231- Context includes exact paths or artifacts.232- Write ownership is explicit and narrow.233- Forbidden actions include no unrelated reverts and no destructive commands.234- Output format asks for evidence, not just conclusions.235- Stop condition prevents scope creep.