一键导入
run-flow
Run a single named flow by name. Faster than /swift-assist:test when you're debugging one broken screen and don't want to wait for the full suite.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Run a single named flow by name. Faster than /swift-assist:test when you're debugging one broken screen and don't want to wait for the full suite.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Apply accessibility identifier fixes from a doctor report to Swift source files. Adds .accessibilityIdentifier() modifiers to interactive elements. Use after /swift-assist:doctor.
Report test coverage across the app - how many screens have flows, how many elements have accessibility identifiers, and what to tackle next. Use for a quick health check on your testing setup.
Walk the running app using computer use, inspect the view hierarchy with Grantiva, and report elements missing accessibility identifiers. Use for accessibility audits or test preparation.
Walk the app using computer use and generate Grantiva screen definitions and flow YAML files for every discovered user flow. Use after /swift-assist:doctor for reliable tests.
Generate a GitHub Actions workflow that runs Grantiva VRT in CI on every pull request. Use to add cloud visual regression testing with GitHub Check integration to your project.
Run generated test flows against the app in the simulator using Grantiva. Use after /swift-assist:make-tests to execute and validate your user flows.
| name | run-flow |
| description | Run a single named flow by name. Faster than /swift-assist:test when you're debugging one broken screen and don't want to wait for the full suite. |
| argument-hint | <flow-name> [--approve] [--json] |
Run a single named flow from grantiva.yml by name - capture its screenshot, compare against the baseline, and report pass or fail. Use this when you're iterating on one screen and don't want to run the entire test suite.
/swift-assist:run-flow login
/swift-assist:run-flow landmark-detail
/swift-assist:run-flow checkout --approve
/swift-assist:run-flow settings --json
<flow-name>: Name of the screen to test (required). Must match a name: entry in grantiva.yml--approve: Immediately approve the captured screenshot as the new baseline if the run succeeds--json: Output result as JSON/swift-assist:test runs all flows sequentially - useful for a full suite check, but slow when you're fixing one thing. /swift-assist:run-flow runs exactly one screen and reports immediately, making it fast to iterate on a failing screen without waiting for the other 11 to finish.
grantiva runner start)grantiva.yml must have a screens: section with at least one entry--approve to set one)Read grantiva.yml to find all defined screens:
cat grantiva.yml
Match the provided <flow-name> against the name: fields in the screens: section. Matching is case-insensitive and tolerates hyphens vs. spaces (e.g., landmark-detail matches Landmark Detail).
If no match is found, list available screen names and stop:
No screen named "landmrk-detail" found in grantiva.yml.
Available screens:
landmarks
landmark-detail
favorites
settings
edit-landmark
caching-demo
Did you mean: landmark-detail?
If the input is ambiguous (partial match on multiple names), list the candidates and ask the user to be more specific.
Run Grantiva's capture pipeline targeting only the matched screen. Use the screen's name field as reported in grantiva.yml:
grantiva diff capture --screen "<SCREEN_NAME>" --scheme=<SCHEME> --simulator="<SIMULATOR>" --no-build
The --no-build flag assumes the app is already running. Grantiva will navigate the path defined for that screen (the path: steps in grantiva.yml) and take a screenshot at the end.
While the capture runs, use computer use to watch the simulator and verify the navigation succeeds.
If the capture fails (navigation error, element not found, app crash), report the failure immediately with the full error and stop:
Capture failed: element "login-button-continue" not found
The navigator could not complete the path for screen "login":
tap: login-textfield-email -> OK
type: "test@example.com" -> OK
tap: login-button-continue -> FAILED (element not found)
Check that:
1. The app is on the expected starting screen (try relaunching)
2. The accessibility identifier "login-button-continue" is applied to the button
3. Run /swift-assist:doctor to audit current identifiers
If --approve was NOT specified, run the comparison:
grantiva diff compare --screen "<SCREEN_NAME>"
This compares the newly captured screenshot against the stored baseline in .grantiva/baselines/.
If no baseline exists for this screen, stop and prompt:
No baseline found for "login".
Run with --approve to capture and set a baseline:
/swift-assist:run-flow login --approve
Or run /swift-assist:vrt --baseline to set baselines for all screens.
If a diff was detected, use computer use to view both images side by side and describe what changed:
.grantiva/baselines/<screen-name>.png.grantiva/captures/<screen-name>.pngPass:
Flow: login
Result: PASS
Diff: 0.3% (threshold: 2%)
Screenshot: .grantiva/captures/login.png
Duration: 8s
Fail:
Flow: login
Result: FAIL
Diff: 12.4% (threshold: 2%)
Screenshot: .grantiva/captures/login.png
Baseline: .grantiva/baselines/login.png
Duration: 9s
Visual differences detected:
- "Sign in" button moved down 18px
- Email field placeholder text changed from "Email" to "Email address"
To approve this as the new baseline:
/swift-assist:run-flow login --approve
To investigate what changed in source:
git diff HEAD -- <path-to-login-view-file>
If --approve was specified and the capture succeeded, approve immediately:
grantiva diff approve --screen "<SCREEN_NAME>"
Confirm:
Flow: login
Result: APPROVED
New baseline saved to .grantiva/baselines/login.png
Commit this file to update the CI baseline:
git add .grantiva/baselines/login.png
git commit -m "Approve login baseline"
--approve flag - always require explicit intent--no-build unless the user explicitly requests a rebuild (which is slow)/swift-assist:init or /swift-assist:build/swift-assist:test in your output suggestions when the user needs to run the full suite