‹ 首页

agentic-workflow

@parcadei · 收录于 1 周前 · 上游提交 5 个月前

Agentic Workflow Pattern

适合你,如果需要设计并运行多步骤的自主工作流。

/ 下载安装
agentic-workflow.skill双击,或拖进 Claude 桌面版 / Cowork,即完成安装↓ .skill↓ .zip
用别的 agent?下载 .zip 解压,把文件夹放进它的技能目录
Claude Code~/.claude/skills/(项目级 .claude/skills/)
Codex CLI~/.codex/skills/
Cursor自动读取上面两处目录
其他工具见其文档的「skills」目录;两个下载是同一份文件,只是名字不同
/ 通过 npx 安装 校验哈希
npx oh-my-skill add parcadei/continuous-claude-v3/agentic-workflow
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- parcadei/continuous-claude-v3/agentic-workflow
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify parcadei/continuous-claude-v3/agentic-workflow
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
3859GitHub stars
~812上下文体积 · 单文件
镜像托管

怎么用

商店整理自技能原文 · 版本 d07ff4b · 表述以原文为准
它做什么

Claude 会按顺序启动研究、规划、验证、实现和审查五个子智能体,每个子智能体完成后将结果写入文件,供下一个子智能体读取。主对话只负责协调,不处理具体任务。

什么时候触发

当你要求 Claude 执行一个需要多步骤实现的复杂任务(如代码开发)时,它会自动触发这个工作流。

装好后可以这样说
Claude 会依次执行研究、规划、验证、实现和审查步骤。
Claude 会启动实现子智能体,采用测试驱动开发。
技能原文 SKILL.md作者撰写 · MIT · d07ff4b

Agentic Workflow Pattern

Standard multi-agent pipeline for implementation tasks.

Architecture Principles
  • Use run_in_background: true for all agents to keep main context minimal
  • Use Task tool (never TaskOutput) to avoid receiving full agent transcripts
  • Agents write outputs to .claude/cache/agents/<stage>/ for injection into subsequent agents
  • Main conversation is pure orchestration — no heavy lifting, only coordination
Workflow Stages
1. Research Agent
Task(subagent_type="oracle", run_in_background=true, prompt="""
Query NIA Oracle (via /nia-docs skill) to verify approach and gather best practices.

Output to: .claude/cache/agents/oracle/<task>-research.md
""")
  • Enforce NIA as the research layer
  • Output: Research findings
2. Planning Agent
Task(subagent_type="plan-agent", run_in_background=true, prompt="""
Read: .claude/cache/agents/oracle/<task>-research.md
Use RP-CLI to analyze the target codebase section.
Generate implementation plan informed by research.

Output to: .claude/cache/agents/plan-agent/<task>-plan.md
""")
  • Receives: Research agent output as context
  • Output: Implementation plan
3. Validation Agent
Task(subagent_type="validate-agent", run_in_background=true, prompt="""
Read: .claude/cache/agents/plan-agent/<task>-plan.md
Read: .claude/cache/agents/oracle/<task>-research.md
Review plan against research findings and best practices.

Output to: .claude/cache/agents/validate-agent/<task>-validated.md
""")
  • Reviews plan against research
  • Output: Validated plan with amendments
4. Implementation Agent
Task(subagent_type="agentica-agent", run_in_background=true, prompt="""
Read: .claude/cache/agents/validate-agent/<task>-validated.md
Read: .claude/cache/agents/oracle/<task>-research.md

TDD approach: Write failing tests FIRST, then implement.
Run tests to verify.

Output summary to: .claude/cache/agents/implement-agent/<task>-implementation.md
""")
  • Receives: Validated plan + research context
  • TDD: Failing tests first
  • Output: Implementation + tests
5. Review Agent
Task(subagent_type="review-agent", run_in_background=true, prompt="""
Read: .claude/cache/agents/implement-agent/<task>-implementation.md
Read: .claude/cache/agents/validate-agent/<task>-validated.md
Read: .claude/cache/agents/oracle/<task>-research.md

Cross-reference implementation against plan and research.
Run tests to confirm passing.

Output to: .claude/cache/agents/review-agent/<task>-review.md
""")
  • Cross-references all artifacts
  • Confirms tests pass
  • Output: Review summary
Agent Progress Monitoring
# Watch for system reminders:
# "Agent a42a16e progress: 6 new tools used, 88914 new tokens"

# Poll for output files:
find .claude/cache/agents -name "*.md" -mmin -5

# Check task file size growth:
wc -c /tmp/claude/.../tasks/<id>.output

Stuck detection:

  1. Progress reminders stop arriving
  2. Task output file size stops growing
  3. Expected output file not created after reasonable time
Directory Structure
.claude/cache/agents/
├── oracle/
│   └── <task>-research.md
├── plan-agent/
│   └── <task>-plan.md
├── validate-agent/
│   └── <task>-validated.md
├── implement-agent/
│   └── <task>-implementation.md
└── review-agent/
    └── <task>-review.md
Key Rules
  1. Never use TaskOutput - floods context with 70k+ token transcripts
  2. Always run_in_background=true - isolates agent context
  3. File-based handoff - each agent reads previous agent's output file
  4. Poll, don't block - check file system for outputs, don't wait
  5. TDD in implementation - failing tests first, then make them pass
Source
  • Session 2026-01-01: SDK Phase 3 implementation using this pattern
按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。