Workflow designer

From eddiebelaval/squire · View interactive version

Workflow designer is an AI agent skill from the GitHub repository eddiebelaval/squire. Design and optimize AI-powered workflows for complex tasks

How to use this skill

Skill file

Workflow Designer

The Workflow Designer skill helps you design, document, and optimize multi-step AI-powered workflows. It applies process design principles to break down complex tasks into clear, executable sequences that leverage Claude Code's capabilities, external tools, and multi-agent coordination.

This skill guides you through workflow analysis, identifying optimal task decomposition, determining when to use automation versus human input, and documenting workflows in a format that's both human-readable and AI-executable. It helps you think through error handling, branching logic, validation steps, and integration points.

Use this skill when you're tackling complex, multi-step processes that could benefit from AI assistance, or when you need to transform ad-hoc procedures into repeatable, documented workflows.

Core Workflows

Workflow 1: Design New Workflow from Requirements

  1. Clarify the goal:
  1. Identify inputs and outputs:
  1. Map the process:
  1. Design error handling:
  1. Assign responsibilities:
  1. Document the workflow:
  1. Test with sample scenario
  2. Refine based on results

Workflow 2: Optimize Existing Workflow

  1. Analyze current workflow:
  1. Identify optimization opportunities:
  1. Redesign with improvements:
  1. Compare before/after:
  1. Document changes and rationale
  2. Plan migration from old to new
  3. Test new workflow thoroughly

Workflow 3: Break Down Complex Task

  1. Understand the complex task:
  1. Decompose into subtasks:
  1. Define interfaces:
  1. Assign to appropriate executors:
  1. Add coordination layer:
  1. Document the decomposition
  2. Validate completeness

Workflow 4: Add Error Handling & Resilience

  1. Map potential failure points:
  1. Design error handling strategy:
  1. Add validation checkpoints:
  1. Implement recovery mechanisms:
  1. Document error scenarios:
  1. Test failure scenarios

Quick Reference

| Action | Command/Trigger |

|--------|-----------------|

| Design new workflow | "Design a workflow for [task]" |

| Optimize existing workflow | "Optimize this workflow: [description]" |

| Break down complex task | "Break down this task: [task]" |

| Add error handling | "Add error handling to this workflow: [workflow]" |

| Document workflow | "Document this process: [process]" |

| Visualize workflow | "Create a flowchart for [workflow]" |

| Validate workflow design | "Review this workflow design: [design]" |

Best Practices

Workflow Design Patterns

Sequential Pipeline

Input → Step 1 → Step 2 → Step 3 → Output

Use when: Each step depends on previous step's output

Example: Data ingestion → Validation → Transformation → Storage

Parallel Execution

Input → [Step 1, Step 2, Step 3] → Merge → Output

Use when: Independent operations can run concurrently

Example: Lint, Test, Type-check → Aggregate results → Report

Conditional Branching

Input → Decision → [Path A | Path B] → Merge → Output

Use when: Different paths based on conditions

Example: File type detection → [JSON parser | CSV parser] → Normalize

Iterative Refinement

Input → Process → Validate → [Done? → Output | Refine → Process]

Use when: Output quality improves through iterations

Example: Generate code → Review → [Acceptable? → Deploy | Fix issues → Generate]

Multi-Agent Orchestration

Input → Coordinator → [Agent A, Agent B, Agent C] → Synthesizer → Output

Use when: Complex task needs specialized sub-agents

Example: Feature request → Planner → [Designer, Developer, Tester] → Integrator → PR

Event-Driven Workflow

Trigger → [Handler 1, Handler 2, Handler N] → Aggregate → Output

Use when: Workflow responds to events/webhooks

Example: Git push → [Build, Test, Deploy, Notify] → Status update

Workflow Documentation Template

## Workflow: [Name]

### Purpose
[What this workflow accomplishes]

### Triggers
- [What initiates this workflow]

### Inputs
- [Required inputs]
- [Optional inputs]

### Steps
1. **[Step Name]**
   - Action: [What happens]
   - Owner: [AI | Human | Tool]
   - Input: [What this step receives]
   - Output: [What this step produces]
   - Validation: [How to verify success]
   - On failure: [What to do if this fails]

2. **[Step Name]**
   [...]

### Decision Points
- **[Decision Name]**
  - Condition: [What determines the path]
  - If true: [Path A]
  - If false: [Path B]

### Outputs
- [What the workflow produces]
- [Where outputs are stored/sent]

### Success Criteria
- [How to know the workflow succeeded]

### Error Handling
- [Common failures and responses]

### Estimated Duration
- [How long this typically takes]

### Dependencies
- [External tools/services required]
- [Other workflows this depends on]

Workflow Metrics to Track

When designing workflows, consider measuring:

Common Pitfalls

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.