AgentSkillsCN

agentic-workflow-guide

创建、审核并更新 Prompt、智能体及工作流。涵盖 5 种工作流模式:子智能体委托、交接机制、上下文工程。适用于任何 .agent.md 文件的编写工作,或用于多智能体系统的设计。

SKILL.md
--- frontmatter
name: agentic-workflow-guide
description: "Create, review, and update Prompt and agents and workflows. Covers 5 workflow patterns, runSubagent delegation, Handoffs, Context Engineering. Use for any .agent.md file work or multi-agent system design."
license: Complete terms in LICENSE.txt
metadata:
  author: yamapan (https://github.com/aktsmm)

Agentic Workflow Guide

Design, review, and improve agent workflows based on proven principles.

When to Use

ActionTriggers
CreateNew .agent.md, workflow architecture, scaffolding
ReviewOrchestrator not delegating, design principle check, context overflow
UpdateAdding Handoffs, improving delegation, tool configuration

Core Principles

references/design-principles.md

TierPrinciples
EssentialSSOT, SRP, Simplicity First, Fail Fast, Feedback Loop
QualityTransparency, Gate/Checkpoint, DRY, Observability
ScaleHuman-in-the-Loop, Loose Coupling, Graceful Degradation

"Start with simple prompts, optimize them with comprehensive evaluation, and add multi-step agentic systems only when simpler solutions fall short." — Anthropic

Workflow Patterns

references/workflow-patterns.md

PatternWhen to Use
Prompt ChainingSequential tasks with validation
RoutingProcessing varies by input type
ParallelizationIndependent tasks run together
Orchestrator-WorkersDynamic task decomposition
Evaluator-OptimizerRepeat until quality criteria met

Stop Conditions (MANDATORY): Define success/failure criteria and exit conditions for every loop.

Design Workflow

  1. Requirements - Goal, subtasks, dependencies, quality criteria
  2. Pattern Selection - [!] Ask user to confirm pattern before proceeding
  3. Design Diagram - Visualize with Mermaid
  4. Principle Check - Validate against review checklist
  5. Implement & Iterate - Build small → verify → improve

When to Escalate

references/splitting-criteria.md

LevelConfigurationEscalation Triggers
L0Single PromptRetry 3+, unstable output
L1Prompt + InstructionsSteps > 5, "missed/overlooked" errors
L2Single AgentMultiple responsibilities, context > 70%
L3Multi-AgentIndependent subtasks needed

Quick Check: Prompt > 50 lines? Steps > 5? SRP violation? Context > 70%? → Consider splitting.

Review Checklist

references/review-checklist.md

  • Single responsibility per agent? (SRP)
  • Errors detected immediately? (Fail Fast)
  • Small iterative steps? (Iterative)
  • Results verifiable at each step? (Feedback Loop)

Key References

runSubagent Quick Fix

Problem: Orchestrator says "I'll delegate" but does work directly.

Solution: Use MUST/MANDATORY language. See runSubagent-guide.md.

yaml
## MANDATORY: Sub-agent Delegation
You MUST use runSubagent for each file. Do NOT read files directly.

Tools Reference

references/agent-template.md

PurposeVS Code CopilotClaude Code
ShellrunInTerminalBash
ReadreadFileRead
EditeditFilesWrite
SubagentrunSubagentTask

External References

Official Documentation

Design Principles

Instructions & Context

Community Resources

Prompt Engineering