.claude/skills/graflow-workflow/SKILL.md
Create Python workflow pipelines using Graflow with a structured plan-implement-review process. Use when building task graphs, parallel pipelines, LLM workflows, or any Graflow-based automation. Triggers on requests for "workflow", "pipeline", "task graph", "Graflow", or when user wants to build an automated data/AI pipeline.
npx skillsauth add graflowai/graflow graflow-workflowInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Build executable task graphs in Python using a structured 3-phase approach.
Goal: Clarify requirements, create a design document, and get user approval through iterative feedback.
Steps:
Ask the user clarifying questions about the workflow:
Create a design document (workflow_design.md) with:
Design Document Template:
# Workflow Design: {workflow_name}
## Overview
{Brief description of what this workflow accomplishes}
## Tasks
| Task ID | Responsibility | Inputs | Outputs |
|---------|---------------|--------|---------|
| task_a | ... | ... | ... |
## Task Graph
source >> (transform_a | transform_b) >> sink
## Channel Data Flow
- `config`: Set by setup, used by all tasks
- `results`: Accumulated by each task
## Error Handling
- {Strategy: fail-fast, best-effort, retry, etc.}
Present the design document to the user with a clear summary:
If the user provides feedback:
workflow_design.md with the requested changesBefore proceeding to implementation:
Goal: Write the workflow code based on the approved design.
Steps:
Implementation Checklist:
@task decoratorworkflow() context manager>> and | operatorsif __name__ == "__main__")Goal: Validate the implementation against the design and create documentation.
Review Checklist:
Common Issues to Check:
inject_context=True when accessing channelsset_group_name() for parallel groupsAfter implementation is complete, create a README.md in the workflow directory with:
README Template:
# {Workflow Name}
## Overview
{Brief description of what this workflow does and its use cases}
## Requirements
- Python 3.11+
- Graflow
- {Additional dependencies}
## Usage
### Basic Execution
```bash
PYTHONPATH=. uv run python {workflow_file}.py
from {workflow_module} import run_workflow
result = run_workflow(param1="value1", param2="value2")
{ASCII representation of task graph}
| Task | Description | |------|-------------| | task_a | {What this task does} | | task_b | {What this task does} |
| Channel Key | Producer | Consumer | Description | |-------------|----------|----------|-------------| | config | setup | all | Configuration settings | | results | processors | aggregator | Accumulated results |
{Description of configurable parameters and environment variables}
{Usage examples with expected output}
#### Step 3: Final Presentation
Present the completed workflow to the user:
- Summarize what was implemented
- Show the README.md content
- Confirm the workflow is ready for use
## Quick Reference
### Core Imports
```python
from graflow.core.decorators import task
from graflow.core.workflow import workflow
from graflow.core.context import TaskExecutionContext
from graflow.core.task import parallel
# Simple task
@task
def process() -> str:
return "done"
# Task with context injection
@task(inject_context=True)
def with_channel(ctx: TaskExecutionContext):
ctx.get_channel().set("key", "value")
# Task with LLM client
@task(inject_llm_client=True)
def with_llm(llm_client: LLMClient):
return llm_client.completion_text(messages=[...])
# Task instance with bound parameters
task1 = process(task_id="task1", value=10)
a >> b # Sequential: a then b
a | b # Parallel: a and b concurrently
(a | b) >> c # Fan-in: c waits for both a and b
a >> (b | c) # Fan-out: b and c start after a
tools
Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting state, revision-checked mutations, and user-facing emergence.
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------
tools
A CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.