.gemini/skills/qa-visual-ios/SKILL.md
Visual QA for iOS apps using swift-snapshot-testing. Validates UIKit/SwiftUI views render correctly across devices and traits.
npx skillsauth add astro44/Autonom8-Agents qa-visual-iosInstall 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.
Visual regression testing for iOS applications using swift-snapshot-testing.
{
"project_dir": "/path/to/ios_project",
"ticket_id": "TICKET-XXX",
"test_target": "MyAppTests",
"devices": ["iPhone14", "iPadPro"],
"traits": ["light", "dark", "accessibility"],
"record_mode": false
}
// Package.swift or SPM
dependencies: [
.package(url: "https://github.com/pointfreeco/swift-snapshot-testing", from: "1.12.0")
]
cd $project_dir
xcodebuild test \
-scheme MyApp \
-destination 'platform=iOS Simulator,name=iPhone 14' \
-only-testing:MyAppTests/SnapshotTests
// MyViewSnapshotTests.swift
import XCTest
import SnapshotTesting
@testable import MyApp
class MyViewSnapshotTests: XCTestCase {
func testMyView_iPhone14() {
let view = MyView()
assertSnapshot(matching: view, as: .image(on: .iPhone14))
}
func testMyView_darkMode() {
let view = MyView()
assertSnapshot(matching: view, as: .image(on: .iPhone14, traits: .init(userInterfaceStyle: .dark)))
}
func testMyView_accessibility() {
let view = MyView()
assertSnapshot(matching: view, as: .image(on: .iPhone14, traits: .init(preferredContentSizeCategory: .accessibilityLarge)))
}
}
func testSwiftUIView() {
let view = ContentView()
let hostingController = UIHostingController(rootView: view)
hostingController.view.frame = UIScreen.main.bounds
assertSnapshot(matching: hostingController, as: .image(on: .iPhone14))
}
func testMyView_allDevices() {
let view = MyView()
assertSnapshot(matching: view, as: .image(on: .iPhoneSe))
assertSnapshot(matching: view, as: .image(on: .iPhone14))
assertSnapshot(matching: view, as: .image(on: .iPhone14ProMax))
assertSnapshot(matching: view, as: .image(on: .iPadPro12_9))
}
{
"skill": "qa-visual-ios",
"status": "pass|fail",
"tests": {
"total": 12,
"passed": 10,
"failed": 2
},
"failures": [
{
"test": "testMyView_darkMode",
"expected": "__Snapshots__/MyViewTests/testMyView_darkMode.png",
"actual": "__Snapshots__/MyViewTests/testMyView_darkMode.actual.png",
"diff_percent": 3.1,
"category": "color_diff"
}
],
"devices_tested": ["iPhoneSe", "iPhone14", "iPadPro12_9"],
"traits_tested": ["light", "dark", "accessibilityLarge"],
"next_action": "proceed|fix|record"
}
| Category | Description | Common Cause |
|----------|-------------|--------------|
| layout_diff | View frame/bounds changed | Auto Layout changes |
| color_diff | Colors don't match | Theme/asset changes |
| text_diff | Text rendering different | Font/localization |
| missing_subview | Subview not rendered | Visibility logic bug |
| safe_area | Safe area insets wrong | Device-specific issue |
Any test failed?
YES → Check diff_percent
> 5% → status: "fail", next_action: "fix"
1-5% → status: "warning", manual review
< 1% → likely rendering variance, pass
Record mode requested?
YES → Update reference snapshots
Basic snapshot test:
{
"project_dir": "/projects/MyiOSApp",
"ticket_id": "TICKET-IOS-001"
}
Record new baselines:
{
"project_dir": "/projects/MyiOSApp",
"ticket_id": "TICKET-IOS-001",
"record_mode": true
}
development
Scores proposal complexity against codebase surface. Uses proposal text analysis and readiness stats to determine decomposition tier and agent count.
testing
Fast filesystem readiness scan — counts docs, source files, manifests, platform signals. Produces initial ReadinessReport for agent spawning decisions.
testing
Merges bookend agent reports into revised readiness, complexity, and decomposition plan. Produces the final evidence-backed assessment consumed by sprint-architect-agent.
development
Rigorously reasons about definitions, proofs, and computations in algebra, analysis, discrete math, probability, linear algebra, and applied math. Verifies derivations, spots invalid steps, and states assumptions clearly. Use when solving or proving math problems, reviewing mathematical arguments, modeling with equations, interpreting statistics, or when the user mentions proofs, lemmas, theorems, integrals, series, matrices, optimization, or numerical methods.