gui-workflow
State graph navigation, workflow recording and replay with tiered verification.
Best use case
gui-workflow is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
State graph navigation, workflow recording and replay with tiered verification.
Teams using gui-workflow should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/gui-workflow/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How gui-workflow Compares
| Feature / Agent | gui-workflow | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
State graph navigation, workflow recording and replay with tiered verification.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
ChatGPT vs Claude for Agent Skills
Compare ChatGPT and Claude for AI agent skills across coding, writing, research, and reusable workflow execution.
Cursor vs Codex for AI Workflows
Compare Cursor and Codex for AI coding workflows, repository assistance, debugging, refactoring, and reusable developer skills.
SKILL.md Source
# Workflow — Target State Verification Mode
## Core Concept
Workflows navigate to a **target state** using the app's state graph.
Verification uses **tiered cost escalation**: cheapest check first, only escalate if needed.
```
Level 0: Template Match (~0.3s, 0 tokens)
→ Check target state's defining_components on screen
→ matched_ratio > 0.7 → confirmed ✅
Level 1: detect_all (~2s, 0 tokens)
→ Full component detection + identify_current_state
→ matches expected → continue
→ different known state → re-route via find_path
→ unknown state → escalate to Level 2
Level 2: LLM Fallback
→ Return ("fallback", state, step, reason) for LLM to decide
```
## Workflow Lifecycle
### 1. Exploring (First Time)
The agent doesn't know the path. Every click is trial and error:
```python
# Each click records a PENDING transition
click_and_record(app, "Scan", x, y) # pending: unknown → click:Scan
click_and_record(app, "Run", x, y) # pending: click:Scan → click:Run
# Workflow succeeded! Commit all transitions
confirm_transitions(app) # → saved to transitions.json
# OR workflow failed — discard everything
discard_transitions(app) # → nothing saved, graph stays clean
```
### 2. Save Workflow
After full end-to-end success:
```python
save_workflow(app, "smart_cleanup", target_state="s_c8e5f3",
description="Navigate to cleanup complete page")
```
### 3. Auto Mode (Known Path)
```python
# By name
run_workflow(app, "smart_cleanup")
# By target state directly
execute_workflow(app, "s_c8e5f3")
```
`execute_workflow` flow:
1. **Level 1** detect_all → identify current state
2. `find_path(current, target)` → BFS shortest path
3. For each step:
- Click component
- **Level 0**: quick_template_check target defining_components
- ratio > 0.7 → done ✅
- **Level 1**: detect_all + identify_current_state
- matches expected → continue
- different known state → re-route
- **Level 2**: return fallback for LLM
## Storage Format
Workflows are stored in `workflows.json` per app (same directory as meta.json):
```json
{
"check_baggage_fee": {
"target_state": "s_c8e5f3",
"description": "Navigate to baggage fee calculator",
"created_at": "2026-03-23 15:30:00",
"last_run": "2026-03-23 16:00:00",
"run_count": 3,
"success_count": 2,
"notes": []
}
}
```
## State Identification
States are matched using **Jaccard similarity** against `defining_components`.
- `identify_current_state()` — pure identification, never creates new states
- `identify_or_create_state()` — identifies OR creates (for exploration mode)
- Filters to **stable components** (seen_count >= 2) to avoid noise
```python
from app_memory import identify_current_state, load_states, load_components
states = load_states(app_dir)
components = load_components(app_dir)
state_id, jaccard = identify_current_state(states, detected_set, components)
```
## Quick Template Check
Fast verification without full detection:
```python
from app_memory import quick_template_check
matched, total, ratio = quick_template_check(app_dir, ["btn_submit", "nav_bar", "logo"], img=screenshot)
if ratio > 0.7:
print("Target state confirmed")
```
## CLI Commands
```bash
# Run a workflow
python3 scripts/agent.py run_workflow --app "CleanMyMac X" --workflow smart_cleanup
# View workflows
python3 scripts/agent.py workflows --app "CleanMyMac X"
# View all workflows across all apps
python3 scripts/agent.py all_workflows
# View committed transitions (state graph)
python3 scripts/app_memory.py transitions --app "CleanMyMac X"
# View pending (uncommitted) transitions
python3 scripts/app_memory.py pending --app "CleanMyMac X"
# Commit after success
python3 scripts/app_memory.py commit --app "CleanMyMac X"
# Discard after failure
python3 scripts/app_memory.py discard --app "CleanMyMac X"
# Find path between states
python3 scripts/app_memory.py path --app "CleanMyMac X" --component from_state --contact to_state
```
## Return Values
`execute_workflow()` returns one of:
| Result | Meaning |
|---|---|
| `("success", state_id)` | Reached target state |
| `("fallback", state_id, step_idx, reason)` | Need LLM intervention |
| `("error", message)` | Cannot execute (no path, missing state, etc.) |
## Rules
1. **Never save transitions from failed/aborted workflows** — use `discard_transitions()`
2. **Only `confirm_transitions()` after full end-to-end success**
3. **Workflow = target state** — the path is computed at runtime from the graph
4. **Tiered verification** — Level 0 first, only escalate when needed
5. **Re-routing** — if Level 1 finds a different known state, BFS finds a new pathRelated Skills
n8n Workflow Mastery — Complete Automation Engineering System
You are an expert n8n workflow architect. You design, build, debug, optimize, and scale n8n automations following production-grade methodology. Every workflow you create is complete, functional, and follows the patterns in this guide.
n8n-workflow-automation
Designs and outputs n8n workflow JSON with robust triggers, idempotency, error handling, logging, retries, and human-in-the-loop review queues. Use when you need an auditable automation that won’t silently fail.
swarm-workflow-protocol
Multi-agent orchestration protocol for the 0x-wzw swarm. Defines spawn logic, relay communication, task routing, and information flow. Agents drive decisions; humans spar.
agentic-workflow-automation
Generate reusable multi-step agent workflow blueprints. Use for trigger/action orchestration, deterministic workflow definitions, and automation handoff artifacts.
workflow-agent
选择并改写 ComfyUI 工作流模板,输出可直接提交到 ComfyUI API 的完整 JSON。当需要准备渲染任务、选择模型、调整参数时触发。
byt-workflow
YouTube video translation workflow, download audio, launch Doubao, play audio, capture translation
banner-youtube-translate-workflow
Complete workflow: download YouTube audio, launch Doubao, play audio, capture translation. Activates when user needs full video translation.
ayao-workflow-agent
Multi-agent workflow orchestrator for coding, writing, analysis, and image tasks via tmux-driven Claude Code and Codex agents. Use when: (1) user requests a feature/fix that should be delegated to coding agents, (2) managing parallel coding tasks across front-end and back-end, (3) monitoring active agent sessions and coordinating review, (4) user says 'start task', 'assign to agents', 'swarm mode', or references the ayao-workflow-agent playbook. NOT for: simple one-liner edits (just edit directly), reading code (use read tool), or single quick questions about code.
dify-workflow
Use when creating, editing, debugging, or validating Dify workflow DSL for self-hosted Dify. Start from an exported workflow of the target instance, edit minimally, and verify by re-importing.
muapi-workflow
Build, run, and visualize multi-step AI generation workflows. The AI architect translates natural language descriptions into connected node graphs — chain image generation, video creation, enhancement, and editing into automated pipelines.
task-review-workflow
Standard PR review and merge workflow for task-driven development. Use when reviewing a programmer agent PR linked to a task, deciding merge vs change request, handling post-merge actions (Trello + branch cleanup), and sending a clear outcome handoff.
task-development-workflow
TDD-first development workflow with structured planning, task tracking, and PR-based code review. Use when building software projects that require clarification phases, planning approval gates, Trello task management, test-driven development, Git branching policies, and PR feedback loops with reviewers.