AGENT SKILL

subagent-orchestration

Coordinates complex tasks via task-isolated subagents. Use when one objective is too large for a single agent or when independent work streams should run concurrently with minimal context bleed. One objective per subagent; summarize before returning to keep the main context window clean.

License 许可
MIT
最近更新
2026-05-27
Stars
★ 0
Forks
0

01 前言 Front Matter

name
subagent-orchestration
description
Coordinates complex tasks via task-isolated subagents. Use when one objective is too large for a single agent or when independent work streams should run concurrently with minimal context bleed. One objective per subagent; summarize before returning to keep the main context window clean.

03 SKILL.md 正文

Skill: Subagent Orchestration

Policy Capsule

  • Dispatch one objective per subagent; never bundle unrelated goals into a single delegation.
  • Hand each subagent only the minimum context (files, docs, goal) required — no broad context dumps.
  • Specify the expected return format explicitly (JSON summary, diff, bullet list) in every handoff.
  • Verify the subagent's output before incorporating it; treat returned artifacts as untrusted until checked.
  • Run non-dependent subagents in parallel; serialize only when one subagent's output is required input for another.
  • Require a concise summary back from each subagent to keep the main context window clean.
  • Investigate subagent failures rather than retrying blindly with the same prompt.

Internal protocol for managing complex tasks through the creation and coordination of subagents.

1. Core Principles

  • Task Isolation: One objective per subagent. Do not overload a subagent with multiple unrelated tasks.
  • Minimal Context: Provide only the necessary context (files, docs, specific goal) to keep the subagent focused and token-efficient.
  • Verification: The main agent must always verify the subagent's output before incorporating it into the final solution.

2. Operation Standards

  • Handoffs: When delegating, clearly state the expected return format (e.g., "Return a JSON summary", "Provide a diff for file X").
  • Error Handling: If a subagent fails or returns an ambiguous result, investigate the failure rather than retrying blindly.
  • Parallelism: Use subagents to perform non-dependent tasks concurrently (e.g., auditing three different modules simultaneously).

3. Best Practices

  • State Sync: Ensure the main agent's mental model remains the source of truth if multiple subagents modify the codebase.
  • Summarization: Require subagents to provide a concise summary of their findings to prevent the main context window from being flooded.

04 同仓库更多 Skills

chrisbarrantes
chrisbarrantes/mandrel

no-capsule-skill

Fixture without a Policy Capsule section.

★ 0
chrisbarrantes
chrisbarrantes/mandrel

backend-security-patterns

Combined backend protocols for authentication (Clerk JWT verification) and PII-safe observability. Use when handling auth on the server, verifying Clerk webhooks via `svix`, scoping metadata via `publicMetadata`/ `privateMetadata`, or sanitizing logs to keep emails, tokens, and request bodies out of telemetry.

★ 0
chrisbarrantes
chrisbarrantes/mandrel

vitest

Writes fast, isolated unit and integration tests with Vitest. Use when each test must run on file-save without shared state — `vi.mock()` for external deps, `vi.spyOn()` for call monitoring, AAA structure, and edge-case coverage for null/undefined/boundary inputs.

★ 0
chrisbarrantes
chrisbarrantes/mandrel

playwright

Robust E2E browser testing with Playwright. Use when writing browser-driven tests — leverage auto-waiting (no `waitForTimeout`), prefer user-visible locators (`getByRole`, `getByText`, `getByLabel`) over CSS/XPath, reuse `storageState` for auth, and enable trace-on-first-retry for CI debugging.

★ 0
chrisbarrantes
chrisbarrantes/mandrel

playwright-bdd

Wires Gherkin `.feature` files to Playwright via the `playwright-bdd` library. Use when running BDD scenarios on a Playwright runtime — pairs with the `gherkin-authoring` skill (scenario prose) and the `playwright` skill (browser conventions). Drives execution by tag expression with trace-first debugging and Playwright-native sharding.

★ 0
chrisbarrantes
chrisbarrantes/mandrel

lighthouse-baseline

Codifies the capture-and-check baseline pattern for long-running quality signals (Lighthouse scores, bundle size, p95 latency, runtime memory). Use when wiring a new metric that needs a baseline file, paired :capture / :check npm scripts, a tolerance-bounded gate, and a weekly refresh cadence — the goal is a hard CI signal that ratchets only with intent.

★ 0