Agent workflow pattern designer
Skill findscripter/everything-skills/04-ai/agent-workflow-pattern-designer
类书式 AI Agent 技能大典 · 精选/中文化/互见成网的 500+ 开源技能,可作为 Claude Code 插件市场一键安装。A curated, cross-referenced encyclopedia of 500+ open-source agent skills.
npx -y skills add findscripter/everything-skills --skill agent-workflow-pattern-designerAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
当需要为多步骤 LLM 任务选型多智能体编排模式、定义交接契约或重构存在上下文膨胀/交接不可靠的工作流时使用;做模式选型(顺序/并行/路由/编排/评估)+ 用脚手架生成 JSON 骨架 + 补齐交接契约、重试超时与质量门,产出可落地的工作流配置;不适用于单条结构化提示即可解决的简单任务;触发词:多智能体、工作流编排、交接契约
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
5.0 KB, ~1.4k tokens by cl100k_base, as published. Nobody here has run it
采编自 alirezarezvani/claude-skills(MIT),适配重写为中文版本。
何时使用
在「实现之前」先确定多智能体工作流的结构时使用本技能:
- 单条提示无法承载任务复杂度,需要拆成多个有明确边界的专职智能体。
- 要在编码前确定确定性的工作流骨架(节点、依赖、交接字段)。
- 需要为质量或安全设置校验回路(生成 + 评审门)。
- 重构一个已存在但「上下文膨胀」或「交接不可靠」的 LLM 流水线。
- 纠结「单智能体 vs 多智能体」该选哪个。
不该用(负边界):
- 一条结构良好的提示即可解决的任务——不要过度编排(见注意事项第 1 条)。
- 纯粹的提示词调优、模型选型、或与「工作流结构」无关的单步推理问题。
步骤 / 指令
- 按「依赖形态 + 风险画像」选模式(见下方模式速查)。
- 用脚手架脚本生成 JSON 骨架配置。
- 为「每一条边」定义交接契约字段(见交接最小契约)。
- 补齐重试、超时与输出校验门。
- 用小上下文预算先 dry-run,验证通过再扩容。
脚手架命令(脚本 scripts/workflow_scaffolder.py,参数 pattern 取值 sequential|parallel|router|orchestrator|evaluator):
# 生成顺序工作流骨架并打印到 stdout
python3 scripts/workflow_scaffolder.py sequential --name content-pipeline
# 生成编排器工作流并落盘保存
python3 scripts/workflow_scaffolder.py orchestrator --name incident-triage --output workflows/incident-triage.json
模式速查(按依赖形态选):
sequential顺序:严格的步步依赖链。例 research → draft → review。parallel并行:独立子任务 fan-out 后 fan-in 汇总,提升吞吐、降低延迟。router路由:按意图/类型分派到专职处理器,必须带 fallback 兜底。orchestrator编排:planner 动态规划、按 DAG 依赖协调多个 specialist。evaluator评估:generator + quality gate 回路,强制质量门后才定稿。
详细模板见 references/workflow-patterns.md。
示例
评估器(生成 + 质量门回路)骨架,脚本输出形如:
{
"name": "incident-triage",
"pattern": "evaluator",
"generator": {"agent": "generator"},
"evaluator": {"agent": "evaluator", "criteria": ["accuracy", "format", "safety"]},
"loop": {"max_iterations": 3, "pass_threshold": 0.8, "on_fail": "revise_and_retry"}
}
顺序模式自带重试策略:"retry": {"max_attempts": 2, "backoff_seconds": 2};并行模式自带超时:"timeouts": {"per_task_seconds": 180, "fan_in_seconds": 120};编排模式执行约束:"execution": {"dependency_mode": "dag", "max_parallel": 3, "completion_policy": "all_required"}。
交接最小契约(每条边都应携带这些字段):
workflow_id工作流标识step_id步骤标识task任务描述constraints约束upstream_artifacts上游产物(只传定向产物,不传完整上下文)budget_tokenstoken 预算timeout_seconds超时秒数
注意事项
常见坑:
- 过度编排——能用一条结构化提示解决的任务别拆成多智能体。
- 对外部模型调用缺少 timeout/retry 策略。
- 把完整上游上下文整包透传,而不是只传定向产物(导致上下文膨胀、成本飙升)。
- 忽视逐步累积的成本。
最佳实践:
- 从能满足需求的「最小模式」起步。
- 交接 payload 保持显式且有界。
- fan-in 汇总前先校验中间输出。
- 每一步都强制预算与超时上限。
互见
references/workflow-patterns.md:五种模式的完整 JSON 模板与选型启发式。- 智能/agents 域下的智能体设计、提示工程、上下文管理相关条目。