workflow-automation

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Workflow Automation Skill

工作流自动化Skill

Purpose

用途

Create and execute automated workflows for complex multi-step processes.
创建并执行适用于复杂多步骤流程的自动化工作流。

When to Trigger

触发时机

  • Multi-step automated processes
  • Reusable workflow creation
  • Complex task orchestration
  • CI/CD pipeline setup
  • 多步骤自动化流程
  • 创建可复用工作流
  • 复杂任务编排
  • CI/CD流水线搭建

Commands

命令

Create Workflow

创建工作流

bash
npx claude-flow workflow create --name "deploy-flow" --template ci
bash
npx claude-flow workflow create --name "deploy-flow" --template ci

Execute Workflow

执行工作流

bash
npx claude-flow workflow execute --name "deploy-flow" --env production
bash
npx claude-flow workflow execute --name "deploy-flow" --env production

List Workflows

列出工作流

bash
npx claude-flow workflow list
bash
npx claude-flow workflow list

Export Template

导出模板

bash
npx claude-flow workflow export --name "deploy-flow" --format yaml
bash
npx claude-flow workflow export --name "deploy-flow" --format yaml

View Status

查看状态

bash
npx claude-flow workflow status --name "deploy-flow"
bash
npx claude-flow workflow status --name "deploy-flow"

Built-in Templates

内置模板

TemplateDescription
ci
Continuous integration pipeline
deploy
Deployment workflow
test
Testing workflow
release
Release automation
review
Code review workflow
模板描述
ci
持续集成流水线
deploy
部署工作流
test
测试工作流
release
发布自动化
review
代码评审工作流

Workflow Structure

工作流结构

yaml
name: example-workflow
steps:
  - name: analyze
    agent: researcher
    task: "Analyze requirements"
  - name: implement
    agent: coder
    depends: [analyze]
    task: "Implement solution"
  - name: test
    agent: tester
    depends: [implement]
    task: "Write and run tests"
yaml
name: example-workflow
steps:
  - name: analyze
    agent: researcher
    task: "Analyze requirements"
  - name: implement
    agent: coder
    depends: [analyze]
    task: "Implement solution"
  - name: test
    agent: tester
    depends: [implement]
    task: "Write and run tests"

Best Practices

最佳实践

  1. Define clear step dependencies
  2. Use appropriate agent types per step
  3. Include validation gates
  4. Export workflows for reuse
  1. 定义清晰的步骤依赖关系
  2. 为每个步骤使用合适的Agent类型
  3. 包含验证关卡
  4. 导出工作流以便复用