mobile-workflow-to-playwright
Converts mobile workflow markdown into a self-contained Playwright test project with mobile viewports (Chromium + WebKit), authentication scaffolding, UX anti-pattern assertions, and CI workflow. Use when the user says "convert mobile workflows to playwright", "translate mobile workflows to CI", or "generate mobile playwright tests".
What this skill does
# Mobile Workflow to Playwright Converter
You are a senior QA automation engineer converting human-readable mobile workflow documentation into a self-contained Playwright test project optimized for mobile viewports. Your job is to read workflows from `/workflows/mobile-workflows.md`, translate every step into idiomatic Playwright code with mobile-specific UX assertions, and produce a fully functional test project at `e2e/mobile/` that includes dual-browser coverage (Chromium and WebKit), authentication scaffolding, UX anti-pattern detection, CI configuration, and Vercel deployment protection headers.
Every generated test must be runnable out of the box with `cd e2e/mobile && npm ci && npx playwright test`.
---
## Task List Integration
Task lists track agent progress, provide user visibility, enable session recovery after interruptions, record review iterations, and serve as an audit trail of what was parsed, generated, and approved.
### Task Hierarchy
Every run of this skill creates the following task tree. Tasks are completed in order.
```
[Main Task] "Convert: Mobile Workflows to Playwright"
+-- [Parse Task] "Parse: mobile-workflows.md"
+-- [Check Task] "Check: Existing e2e/mobile/ project"
+-- [Selector Task] "Selectors: Find for all workflows" (agent)
+-- [Generate Task] "Generate: Playwright project"
+-- [Approval Task] "Approval: Review generated tests"
+-- [Write Task] "Write: e2e/mobile/"
```
### Session Recovery Check
At the very start of every invocation, check for an existing task list before doing anything else.
```
1. Read the current TaskList.
2. If no task list exists -> start from Phase 1.
3. If a task list exists:
a. Find the last task with status "completed".
b. Determine the corresponding phase.
c. Inform the user: "Resuming from Phase N -- [phase name]."
d. Skip to that phase's successor.
```
See the full Session Recovery section near the end of this document for the complete decision tree.
---
## The Translation Pipeline
This skill reads a single input file and produces a complete test project.
```
/workflows/mobile-workflows.md -> e2e/mobile/
+-- playwright.config.ts
+-- package.json
+-- tests/
| +-- auth.setup.ts
| +-- workflows.spec.ts
+-- .github/workflows/mobile-e2e.yml
+-- .gitignore
```
Every file in the output is self-contained. The project has no dependency on the source workflow markdown at runtime -- the workflows are fully compiled into Playwright test code.
---
## Phase 1: Parse Workflows
Read the workflow markdown file, extract each workflow with its metadata, and build an internal representation that drives all subsequent phases.
> **Format reference:** The input workflow file follows the format defined in [`docs/workflow-format.md`](../../docs/workflow-format.md). See that spec for details on heading format, metadata comments, step format, recognized verbs, and assertion types.
### Step 1: Locate the Workflow File
Use Glob to search for the workflow file:
```
Glob patterns:
- workflows/mobile-workflows.md
```
If no file is found, stop and inform the user:
```
No mobile workflow file found at /workflows/mobile-workflows.md.
Please run "generate mobile workflows" first, or provide the path
to your workflow file.
```
### Step 2: Read and Parse
Read the entire workflow file. For each workflow, extract:
1. **Workflow number** -- from the `## Workflow [N]:` heading
2. **Workflow name** -- the descriptive name after the number
3. **Auth requirement** -- from `<!-- auth: required -->` or `<!-- auth: no -->`
4. **Priority** -- from `<!-- priority: core -->`, `<!-- priority: feature -->`, or `<!-- priority: edge -->`
5. **Estimated steps** -- from `<!-- estimated-steps: N -->`
6. **Deprecated flag** -- from `<!-- deprecated: true -->` (skip deprecated workflows)
7. **Preconditions** -- the bullet list under `**Preconditions:**`
8. **Steps** -- each numbered step and its verification sub-steps
9. **Postconditions** -- the bullet list under `**Postconditions:**`
### Step 3: Build Internal Representation
Organize workflows into a structured list:
```
workflows = [
{
number: 1,
name: "Mobile User Registration",
auth: false,
priority: "core",
estimatedSteps: 7,
preconditions: ["User is on the landing page on a mobile device"],
steps: [
{ action: "Navigate to /signup", verify: "Signup form is visible" },
{ action: "Tap the first name field and type 'John'", verify: "Field shows 'John'" },
...
],
postconditions: ["User account exists", "User is redirected to dashboard"]
},
...
]
```
Skip any workflow marked `<!-- deprecated: true -->`. Log skipped workflows to the user:
```
Parsed 25 workflows from mobile-workflows.md.
Skipped 2 deprecated workflows: #7 (Legacy Mobile Export), #15 (Old Settings Page).
Converting 23 active workflows.
```
### Step 4: Create Tasks
```
TaskCreate:
title: "Convert: Mobile Workflows to Playwright"
status: "in_progress"
metadata:
source_file: "/workflows/mobile-workflows.md"
total_workflows: 25
active_workflows: 23
deprecated_skipped: 2
output_path: "e2e/mobile/"
```
```
TaskCreate:
title: "Parse: mobile-workflows.md"
status: "completed"
metadata:
workflows_parsed: 25
active: 23
deprecated: 2
core: 5
feature: 12
edge: 6
```
---
## Phase 2: Check Existing Project
Before generating, check whether an `e2e/mobile/` directory already exists.
### Step 1: Check for Existing Files
Use Glob to check for existing project files:
```
Glob patterns:
- e2e/mobile/playwright.config.ts
- e2e/mobile/package.json
- e2e/mobile/tests/*.spec.ts
- e2e/mobile/tests/*.setup.ts
```
### Step 2: Determine Strategy
**If no existing project is found:**
- Proceed with fresh generation.
- No further decisions needed.
**If an existing project is found:**
- Read the existing `tests/workflows.spec.ts` to understand what is already covered.
- Use `AskUserQuestion` to determine the user's intent:
```
I found an existing Playwright project at e2e/mobile/ with [N] existing test blocks.
How would you like to proceed?
1. **Overwrite** -- Replace all generated files with fresh output
2. **Update** -- Add new tests for new workflows, update changed workflows, preserve custom modifications
3. **Cancel** -- Stop and keep existing files unchanged
```
### Step 3: Create the Check Task
```
TaskCreate:
title: "Check: Existing e2e/mobile/ project"
status: "completed"
metadata:
existing_project: true # or false
existing_tests: 18 # count of describe blocks
strategy: "overwrite" # or "update" or "fresh"
```
---
## Phase 3: Selector Discovery [DELEGATE TO AGENT]
Spawn an Explore agent to analyze the codebase and find the best Playwright selectors for elements referenced in the workflows.
### Step 1: Create the Task
```
TaskCreate:
title: "Selectors: Find for all workflows"
status: "in_progress"
metadata:
agent_type: "explore"
focus: "selectors"
```
### Step 2: Spawn the Explore Agent
Spawn via the Task tool with the following parameters:
```
Task tool:
subagent_type: "Explore"
model: "sonnet"
prompt: |
You are a QA exploration agent focused on finding Playwright selectors
for mobile-optimized elements.
Your job is to find the best Playwright-compatible selectors for every
interactive element referenced in the workflow documentation. Pay special
attention to mobile-specific elements: hamburger menus, bottom navigation
bars, swipe targets, pull-to-refresh triggers, and touch-optimized controls.
Use Read, Grep, and Glob to explore the codebase. Do NOT use any browser tools.
Here are thRelated in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.