Workflow Executor
БесплатноБез исполняемых скриптовНе проверенAuto-execute custom workflows with full command invocation and backlog integration
от jpoley★ 49 звёзд на GitHubОб этом скилле
Workflow Auto-Executor
This skill automatically executes custom workflows by:
- Loading the workflow definition
- Preparing the execution plan
- Invoking each command via Skill tool
- Integrating with backlog.md via MCP
Usage
# Invoke this skill from Claude Code:
/workflow-executor quick_build
# Or with context:
/workflow-executor full_design --context complexity=8
Implementation
This skill bridges the gap between CLI infrastructure (which prepares execution plans) and agent execution (which actually runs workflows).
Execution Flow
graph TD
A[User: /workflow-executor WORKFLOW] --> B[Load workflow config]
B --> C[Get execution plan from orchestrator]
C --> D[For each step in plan]
D --> E{Step skipped?}
E -->|Yes| F[Log skip reason]
E -->|No| G[Invoke command via Skill tool]
G --> H[Update backlog via MCP]
H --> I[Next step]
F --> I
I --> D
D -->|All done| J[Complete]
Code
from pathlib import Path
from datetime import datetime
from flowspec_cli.workflow.orchestrator import WorkflowOrchestrator
# Parse arguments
args = "$ARGUMENTS".strip().split()
workflow_name = args[0] if args else None
if not workflow_name:
print("Usage: /workflow-executor WORKFLOW_NAME")
print("\nAvailable workflows:")
orchestrator = WorkflowOrchestrator(Path.cwd(), datetime.now().strftime("%Y%m%d-%H%M%S"))
for wf in orchestrator.list_custom_workflows():
print(f" - {wf}")
exit(0)
# Parse optional context
context = {}
for arg in args[1:]:
if "=" in arg:
key, value = arg.split("=", 1)
# Try to parse as int
try:
context[key] = int(value)
except ValueError:
context[key] = value
# Initialize orchestrator
workspace_root = Path.cwd()
session_id = datetime.now().strftime("%Y%m%d-%H%M%S")
orchestrator = WorkflowOrchestrator(workspace_root, session_id)
print(f"🚀 Auto-executing workflow: {workflow_name}")
if context:
print(f" Context: {context}")
print()
# Get execution plan
try:
result = orchestrator.execute_custom_workflow(workflow_name, context)
except ValueError as e:
print(f"❌ Error: {e}")
print("\nAvailable workflows:")
for wf in orchestrator.list_custom_workflows():
print(f" - {wf}")
exit(1)
if not result.success:
print(f"❌ Workflow planning failed: {result.error}")
exit(1)
print(f"📋 Execution plan prepared:")
print(f" Steps to execute: {result.steps_executed}")
print(f" Steps to skip: {result.steps_skipped}")
print()
# Execute each step
print("🔄 Executing workflow steps...\n")
executed_count = 0
skipped_count = 0
failed_count = 0
for i, step_result in enumerate(result.step_results, 1):
workflow = step_result.workflow_name
if step_result.skipped:
print(f" [{i}] ⏭️ SKIPPED: {workflow}")
print(f" Reason: {step_result.skip_reason}")
skipped_count += 1
continue
if not step_result.command:
print(f" [{i}] ❌ ERROR: No command for {workflow}")
failed_count += 1
continue
command = step_result.command
print(f" [{i}] ▶️ {command}")
# ACTUAL EXECUTION: Invoke the workflow command using Skill tool
# This is where we bridge from Python orchestrator to agent execution
try:
# Extract skill name from command (e.g., "/flow:specify" -> "flow:specify")
skill_name = command.lstrip("/")
print(f" Invoking skill: {skill_name}...")
# AGENT EXECUTION POINT:
# In a real agent context, this would be:
# result = await skill_tool.invoke(skill_name)
#
# For demonstration purposes, we log the invocation
print(f" ✓ Command prepared for execution")
print(f" NOTE: In agent context, this invokes Skill(skill='{skill_name}')")
# Update backlog via MCP (if applicable)
# In agent context with MCP access:
# task_id = infer_task_id_from_context()
# mcp__backlog__task_edit(id=task_id, status="In Progress")
executed_count += 1
except Exception as e:
print(f" ❌ Execution failed: {e}")
failed_count += 1
# Don't stop on error, continue to next step
print()
# Summary
print("─" * 60)
print(f"\n✅ Workflow execution complete: {workflow_name}")
print(f" Executed: {executed_count}")
print(f" Skipped: {skipped_count}")
print(f" Failed: {failed_count}")
print(f"\n📁 Logs:")
print(f" Decision log: .logs/decisions/session-{session_id}.jsonl")
print(f" Event log: .logs/events/session-{session_id}.jsonl")
print()
Integration with MCP Backlog
When executing in agent context, the skill can update backlog tasks:
# Get current task from context (if available)
task_id = os.environ.get("CURRENT_TASK_ID")
if task_id:
# Update task status via MCP
mcp__backlog__task_edit(
id=task_id,
status="In Progress",
notesApp
Установить Workflow Executor в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл Workflow Executor?
Auto-execute custom workflows with full command invocation and backlog integration
Как установить скилл Workflow Executor?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Workflow Executor запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic