AgentSkillsCN

agent-orchestration

何时选用哪种专业代理或工作流:规划、代码评审、安全评审、重构、文档编写。适用于复杂功能开发、实施后的复盘,或涉及多步骤的任务。

SKILL.md
--- frontmatter
name: agent-orchestration
description: When to use which specialized agent or workflow: planning, code review, security review, refactor, docs. Use for complex features, post-implementation review, or multi-step tasks.

Agent Orchestration

Guidance on when to apply specialized agents and how to run tasks in parallel.

When to Use This Skill

  • User asks for a plan, review, security check, or refactor
  • After implementing a non-trivial feature (suggest code review)
  • Before committing sensitive or high-risk code (suggest security review)
  • When a task clearly benefits from planning or multiple perspectives

Agent Roles (Conceptual)

RoleUse for
PlannerComplex features, refactors, multi-step work
ArchitectSystem design, API shape, tech choices
Code reviewerAfter writing or changing code
Security reviewerAuth, payments, secrets, new APIs
TDD guideNew feature or bug fix (tests first)
Refactor/cleanerDead code, duplication, clarity
Doc updaterUpdating docs to match code

When to Invoke (No Explicit Prompt)

  • Complex feature or refactor → Propose a short plan (or “planner” flow) first
  • Code just written or modified → Suggest a quick self-review or “code reviewer” pass
  • Bug fix or new feature → Suggest TDD-style tests where relevant
  • Architecture or API design → Suggest an “architect” perspective or design doc

Parallel Work

For independent subtasks, do them in parallel instead of strictly one-by-one:

  • Example: “Security pass on auth module, performance pass on list API, type-check on shared utils” can be three parallel analyses, then merge findings.

Multi-Perspective Review

For critical or ambiguous work, consider:

  • Factual correctness (does it match requirements?)
  • Code quality and consistency
  • Security and data handling
  • Redundancy and dead code

You can run these as separate passes or a single structured review.