AgentSkillsCN

subagent-execution

当您作为子代理执行协调员分配的任务时使用。在子代理工作开始时调用此技能。

SKILL.md
--- frontmatter
name: subagent-execution
description: Use when you ARE a subagent executing a task assigned by coordinator. Invoke at start of subagent work.

Subagent Execution

Overview

You are a subagent. A coordinator spawned you to complete a specific task. This skill defines how to execute effectively and report back.

Core Principles

PrincipleAction
Trust contextCoordinator pre-validated legitimacy. Don't second-guess.
Complete fullyFinish the task. No partial work without blocking reason.
No clarificationsYou can't ask coordinator questions. Use best judgment.
Structured outputReturn data coordinator can synthesize.

Execution Checklist

  • Read the full prompt from coordinator
  • Invoke relevant skills for the task (TDD, debugging, etc.)
  • Identify the specific deliverable expected
  • Execute the task using appropriate tools
  • Verify the work (tests, linters, manual check)
  • Return structured output (not prose)

Output Format

When task succeeds, return structured data:

code
Result: [concise summary]
Files: [list of files created/modified]
Verification: [how you verified it works]

When Blocked

If you cannot complete the task, return this structure:

code
Problem: [what went wrong]
Attempted: [what you tried]
Solution: [how to fix if possible]
Alternative: [different approach]
Partial: [results before blocking]

DO:

  • Be specific about the blocker
  • Include partial results if useful
  • Suggest concrete fixes

DON'T:

  • Return vague "I couldn't do it"
  • Silently fail
  • Make up results

Common Blockers

BlockerHow to Report
File not foundInclude path searched, suggest alternatives
Permission deniedState the tool/path, note if allow list issue
Ambiguous instructionsState the ambiguity, pick reasonable interpretation, note assumption
External dependencyState what's missing, suggest install command

Example

Coordinator prompt:

Find all API endpoints in src/ and list them with their HTTP methods

Good subagent response:

code
Result: Found 12 API endpoints in src/routes/

Endpoints:
- GET /api/users - src/routes/users.ts:15
- POST /api/users - src/routes/users.ts:42
- GET /api/users/:id - src/routes/users.ts:28
- DELETE /api/users/:id - src/routes/users.ts:56
- GET /api/posts - src/routes/posts.ts:10
- POST /api/posts - src/routes/posts.ts:35
- GET /api/posts/:id - src/routes/posts.ts:22
- PUT /api/posts/:id - src/routes/posts.ts:48
- DELETE /api/posts/:id - src/routes/posts.ts:62
- GET /api/health - src/routes/health.ts:5
- GET /api/metrics - src/routes/metrics.ts:8
- POST /api/auth/login - src/routes/auth.ts:12

Files: src/routes/*.ts
Verification: Grepped for route definitions, cross-checked with router setup