Command
SEO
Command
/workflow-automation
创建、管理和执行自定义工作流,支持多步骤任务编排、并行执行和条件触发
Install
$ npx -y skills add huifer/claude-code-seo --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/workflow-automation
Context preview
What this command does when you run it.
创建、管理和执行自定义工作流,支持多步骤任务编排、并行执行和条件触发
Command definition
workflow-automation.mddescription: 创建、管理和执行自定义工作流,支持多步骤任务编排、并行执行和条件触发
argument-hint: <action> [--workflow <workflow-name>] [--file <workflow-file>] [--trigger <trigger-type>]
options:
- action: 操作类型(create, execute, list, status, delete)
- workflow: 工作流名称
- file: 工作流定义文件(YAML/JSON)
- trigger: 触发方式(schedule, event, manual, api)
examples:
- /workflow-automation create --workflow comprehensive-geo --file workflow.yaml
- /workflow-automation execute --workflow weekly-audit
- /workflow-automation list --status active
- /workflow-automation status --workflow comprehensive-geo
完整实现
工作流定义
工作流是多个任务的有序编排,支持:
- **顺序执行** - 任务按定义顺序依次执行
- **并行执行** - 多个任务同时执行
- **条件分支** - 根据条件执行不同路径
- **错误处理** - 失败重试和回滚
- **数据传递** - 任务间传递数据
工作流结构
name: "comprehensive-geo-workflow"
description: "完整的 GEO 优化工作流"
version: "1.0.0"
author: "SEO Team"
created: "2024-02-15"
# 触发器配置
triggers:
- type: "schedule"
cron: "0 9 * * 1" # 每周一上午 9:00
enabled: true
- type: "event"
event: "competitor-surpassed"
enabled: true
- type: "manual"
enabled: true
# 全局变量
variables:
domain: "yoursite.com"
competitors: "comp1.com,comp2.com,comp3.com"
team_email: "seo-team@company.com"
slack_channel: "#seo-alerts"
# 全局配置
config:
timeout: 3600 # 总超时时间(秒)
retry_on_failure: true
max_retries: 3
parallel_tasks: 5
notify_on_complete: true
# 工作流步骤
steps:
# 第一步:内容审计
- id: audit
name: "GEO 内容审计"
description: "对网站进行全面的内容审计"
command: "/geo-content-audit"
params:
domain: "{{variables.domain}}"
detailed: true
timeout: 300
retry: 3
on_success: citation-monitor
on_failure: notify-error
continue_on_failure: false
# 第二步:引用监控
- id: citation-monitor
name: "AI 引用监控"
description: "监控 AI 搜索引擎的引用情况"
command: "/geo-citation-monitor"
params:
url: "https://{{variables.domain}}"
period: 7
timeout: 180
retry: 2
depends_on: audit
on_success: competitor-compare
on_failure: notify-error
# 第三步:竞争对手对比
- id: competitor-compare
name: "竞争对手对比"
description: "对比分析竞争对手表现"
command: "/geo-competitor-compare"
params:
you: "{{variables.domain}}"
competitors: "{{variables.competitors}}"
timeout: 240
retry: 2
depends_on: citation-monitor
on_success: generate-report
on_failure: notify-error
# 第四步:生成报告(并行)
- id: generate-report
name: "生成综合报告"
description: "生成多格式 GEO 综合报告"
parallel:
# 子步骤 4a:执行摘要
- id: exec-summary
name: "生成执行摘要"
command: "/generate-report"
params:
type: "executive-summary"
domain: "{{variables.domain}}"
period: 30
format: "pdf"
timeout: 120
on_complete: send-report
# 子步骤 4b:技术分析
- id: tech-analysis
name: "生成技术分析"
command: "/generate-report"
params:
type: "technical-analysis"
domain: "{{variables.domain}}"
format: "html"
include-charts: true
timeout: 180
on_complete: send-report
# 子步骤 4c:交互式报告
- id: interactive-report
name: "生成交互式报告"
command: "/generate-report"
params:
type: "geo-comprehensive"
domain: "{{variables.domain}}"
period: 30
format: "html"
interactive: true
timeout: 150
on_complete: send-report
# 第五步:发送报告
- id: send-report
name: "发送报告给团队"
description: "通过邮件发送生成的报告"
action: "send_email"
params:
to: "{{variables.team_email}}"
subject: "📊 GEO 综合报告 - {{date}}"
body: |
亲爱的团队,
附件是最新的 GEO 综合报告,包含以下内容:
1. 执行摘要(PDF)
2. 技术分析(HTML)
3. 交互式报告(HTML)
主要发现:
- 整体 GEO 评分:72/100
- AI 引用次数:677(+45%)
- 行业排名:Top 10%
请查看附件了解详情。
祝好,
SEO Assistant
attachments:
- "{{steps.exec-summary.output}}"
- "{{steps.tech-analysis.output}}"
- "{{steps.interactive-report.output}}"
timeout: 60
depends_on: generate-report
on_success: notify-success
on_failure: notify-error
# 错误处理
- id: notify-error
name: "发送错误通知"
description: "工作流执行失败时发送通知"
action: "send_slack"
params:
channel: "{{variables.slack_channel}}"
message: |
❌ 工作流执行失败
工作流:{{workflow.name}}
失败步骤:{{failed_step.name}}
错误信息:{{error.message}}
时间:{{timestamp}}
请立即检查!
priority: "high"
# 成功通知
- id: notify-success
name: "发送成功通知"
description: "工作流执行成功时发送通知"
action: "send_slack"
params:
channel: "{{variables.slack_channel}}"
message: |
✅ 工作流执行成功
工作流:{{workflow.name}}
执行时间:{{duration}}
生成报告:{{report_count}}
时间:{{timestamp}}
priority: "info"
# 工作流输出
output:
format: "json"
path: ".claude-flow/cache/workflows/{{workflow.name}}/{{timestamp}}.json"
include:
- execution_summary
- step_outputs
- alerts
- metrics工作流类型
1. 顺序工作流
任务按定义的顺序依次执行:
name: "sequential-content-audit"
steps:
- id: step1
name: "第一步"
command: "/command1"
on_success: step2
- id: step2
name: "第二步"
command: "/command2"
depends_on: step1
on_success: step3
- id: step3
name: "第三步"
command: "/command3"
depends_on: step22. 并行工作流
多个任务同时执行:
name: "parallel-content-audit"
steps:
- id: parallel-audit
parallel:
- id: blog-audit
name: "审计博客文章"
command: "/geo-content-audit"
params:
path: "/blog"
- id: product-audit
name: "审计产品页面"
command: "/geo-content-audit"
params:
path: "/products"
- id: case-audit
name: "审计案例研究"
command: "/geo-content-audit"
params:
path: "/case-studies"
# 所有并行任务完成后继续
on_complete: aggregate-results3. 条件工作流
根据条件执行不同路径:
name: "conditional-workflow"
s
Read more
description: 创建、管理和执行自定义工作流,支持多步骤任务编排、并行执行和条件触发 argument-hint: <action> [--workflow <workflow-name>] [--file <workflow-file>] [--trigger <trigger-type>] options: - action: 操作类型(create, execute, list, status, delete) - workflow: 工作流名称 - file: 工作流定义文件(YAML/JSON) - trigger: 触发方式(schedule, event, manual, api) examples: - /workflow-automation create --workflow comprehensive-geo --file workflow.yaml - /workflow-automation execute --workflow weekly-audit - /workflow-automation list --status active - /workflow-automation status --workflow comprehensive-geo
完整实现
工作流定义
工作流是多个任务的有序编排,支持:
- **顺序执行** - 任务按定义顺序依次执行
- **并行执行** - 多个任务同时执行
- **条件分支** - 根据条件执行不同路径
- **错误处理** - 失败重试和回滚
- **数据传递** - 任务间传递数据
工作流结构
name: "comprehensive-geo-workflow"
description: "完整的 GEO 优化工作流"
version: "1.0.0"
author: "SEO Team"
created: "2024-02-15"
# 触发器配置
triggers:
- type: "schedule"
cron: "0 9 * * 1" # 每周一上午 9:00
enabled: true
- type: "event"
event: "competitor-surpassed"
enabled: true
- type: "manual"
enabled: true
# 全局变量
variables:
domain: "yoursite.com"
competitors: "comp1.com,comp2.com,comp3.com"
team_email: "seo-team@company.com"
slack_channel: "#seo-alerts"
# 全局配置
config:
timeout: 3600 # 总超时时间(秒)
retry_on_failure: true
max_retries: 3
parallel_tasks: 5
notify_on_complete: true
# 工作流步骤
steps:
# 第一步:内容审计
- id: audit
name: "GEO 内容审计"
description: "对网站进行全面的内容审计"
command: "/geo-content-audit"
params:
domain: "{{variables.domain}}"
detailed: true
timeout: 300
retry: 3
on_success: citation-monitor
on_failure: notify-error
continue_on_failure: false
# 第二步:引用监控
- id: citation-monitor
name: "AI 引用监控"
description: "监控 AI 搜索引擎的引用情况"
command: "/geo-citation-monitor"
params:
url: "https://{{variables.domain}}"
period: 7
timeout: 180
retry: 2
depends_on: audit
on_success: competitor-compare
on_failure: notify-error
# 第三步:竞争对手对比
- id: competitor-compare
name: "竞争对手对比"
description: "对比分析竞争对手表现"
command: "/geo-competitor-compare"
params:
you: "{{variables.domain}}"
competitors: "{{variables.competitors}}"
timeout: 240
retry: 2
depends_on: citation-monitor
on_success: generate-report
on_failure: notify-error
# 第四步:生成报告(并行)
- id: generate-report
name: "生成综合报告"
description: "生成多格式 GEO 综合报告"
parallel:
# 子步骤 4a:执行摘要
- id: exec-summary
name: "生成执行摘要"
command: "/generate-report"
params:
type: "executive-summary"
domain: "{{variables.domain}}"
period: 30
format: "pdf"
timeout: 120
on_complete: send-report
# 子步骤 4b:技术分析
- id: tech-analysis
name: "生成技术分析"
command: "/generate-report"
params:
type: "technical-analysis"
domain: "{{variables.domain}}"
format: "html"
include-charts: true
timeout: 180
on_complete: send-report
# 子步骤 4c:交互式报告
- id: interactive-report
name: "生成交互式报告"
command: "/generate-report"
params:
type: "geo-comprehensive"
domain: "{{variables.domain}}"
period: 30
format: "html"
interactive: true
timeout: 150
on_complete: send-report
# 第五步:发送报告
- id: send-report
name: "发送报告给团队"
description: "通过邮件发送生成的报告"
action: "send_email"
params:
to: "{{variables.team_email}}"
subject: "📊 GEO 综合报告 - {{date}}"
body: |
亲爱的团队,
附件是最新的 GEO 综合报告,包含以下内容:
1. 执行摘要(PDF)
2. 技术分析(HTML)
3. 交互式报告(HTML)
主要发现:
- 整体 GEO 评分:72/100
- AI 引用次数:677(+45%)
- 行业排名:Top 10%
请查看附件了解详情。
祝好,
SEO Assistant
attachments:
- "{{steps.exec-summary.output}}"
- "{{steps.tech-analysis.output}}"
- "{{steps.interactive-report.output}}"
timeout: 60
depends_on: generate-report
on_success: notify-success
on_failure: notify-error
# 错误处理
- id: notify-error
name: "发送错误通知"
description: "工作流执行失败时发送通知"
action: "send_slack"
params:
channel: "{{variables.slack_channel}}"
message: |
❌ 工作流执行失败
工作流:{{workflow.name}}
失败步骤:{{failed_step.name}}
错误信息:{{error.message}}
时间:{{timestamp}}
请立即检查!
priority: "high"
# 成功通知
- id: notify-success
name: "发送成功通知"
description: "工作流执行成功时发送通知"
action: "send_slack"
params:
channel: "{{variables.slack_channel}}"
message: |
✅ 工作流执行成功
工作流:{{workflow.name}}
执行时间:{{duration}}
生成报告:{{report_count}}
时间:{{timestamp}}
priority: "info"
# 工作流输出
output:
format: "json"
path: ".claude-flow/cache/workflows/{{workflow.name}}/{{timestamp}}.json"
include:
- execution_summary
- step_outputs
- alerts
- metrics工作流类型
1. 顺序工作流
任务按定义的顺序依次执行:
name: "sequential-content-audit"
steps:
- id: step1
name: "第一步"
command: "/command1"
on_success: step2
- id: step2
name: "第二步"
command: "/command2"
depends_on: step1
on_success: step3
- id: step3
name: "第三步"
command: "/command3"
depends_on: step22. 并行工作流
多个任务同时执行:
name: "parallel-content-audit"
steps:
- id: parallel-audit
parallel:
- id: blog-audit
name: "审计博客文章"
command: "/geo-content-audit"
params:
path: "/blog"
- id: product-audit
name: "审计产品页面"
command: "/geo-content-audit"
params:
path: "/products"
- id: case-audit
name: "审计案例研究"
command: "/geo-content-audit"
params:
path: "/case-studies"
# 所有并行任务完成后继续
on_complete: aggregate-results3. 条件工作流
根据条件执行不同路径:
name: "conditional-workflow" s
Stats
111
Stars
5
Forks
Quiet
Maintenance
HTML
Language
MIT
License
9mo ago
Last commit
9mo ago
Created
5h ago
Added
Other commands on claude-seo-assistant.
Command
Command
Command
Command
Command

