Agent skill
play-test
Visual play-testing via Automation MCP screenshots and numpad input
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/play-test
SKILL.md
Play Test GridRacer
Launch the game and test it visually using Automation MCP with numpad keyboard input.
Prerequisites
- Build must succeed first
- Automation MCP needs Accessibility + Screen Recording permissions
Numpad Control Mapping
The game uses numpad keys (1-9) to select acceleration:
7 8 9 ↖ ↑ ↗ (-1,+1) (0,+1) (+1,+1)
4 5 6 = ← · → = (-1, 0) (0, 0) (+1, 0)
1 2 3 ↙ ↓ ↘ (-1,-1) (0,-1) (+1,-1)
- 5 = coast (no acceleration, maintain velocity)
- 6 = accelerate right
- 4 = accelerate left
- 8 = accelerate up
- 2 = accelerate down
- Corners (1,3,7,9) = diagonal acceleration
- r = reset game
Steps
1. Build and Install
xcodebuild -scheme GridRacer -configuration Debug -destination 'generic/platform=iOS Simulator' build 2>&1 | grep -E "(error:|BUILD|FAILED|SUCCEEDED)" | tail -10
APP_PATH=$(find ~/Library/Developer/Xcode/DerivedData -name "GridRacer.app" -path "*/Build/Products/Debug-iphonesimulator/*" -not -path "*Index.noindex*" -type d 2>/dev/null | head -1)
2. Boot and Launch
SIMULATOR=$(xcrun simctl list devices available | grep -E "iPhone (16|15|14)" | head -1 | sed -E 's/.*iPhone ([0-9]+).*/iPhone \1/')
xcrun simctl boot "$SIMULATOR" 2>/dev/null || true
xcrun simctl install booted "$APP_PATH"
xcrun simctl launch booted trouarat.GridRacer
3. Send Keyboard Input via AppleScript
IMPORTANT: The iOS Simulator requires AppleScript to receive keyboard input. Use this bash command pattern:
# Send a single key to the Simulator
osascript -e 'tell application "Simulator" to activate' && sleep 0.3 && osascript -e 'tell application "System Events" to keystroke "KEY"'
Replace KEY with the desired key (1-9 for moves, r for reset).
4. Play Test Loop
For each turn:
- Screenshot the game state via
mcp__automation__screenshot(mode: "window", windowName: "iPhone 16 Pro") - Analyze: Look at HUD for current player, velocity, and position
- Observe markers: Green=safe, red=crash
- Send numpad key via AppleScript bash command
- Wait for animation:
mcp__automation__sleep(ms: 700) - Screenshot result and verify:
- Position changed correctly
- Velocity updated (old + acceleration)
- Crash detection works (life lost, respawn)
- Lap counting works (finish line crossing)
5. Reset Game (if needed)
osascript -e 'tell application "Simulator" to activate' && sleep 0.3 && osascript -e 'tell application "System Events" to keystroke "r"'
6. Close App
xcrun simctl terminate booted trouarat.GridRacer
Example Play Test Sequence
# Screenshot initial state
mcp__automation__screenshot(mode: "window", windowName: "iPhone 16 Pro")
# Player 1: accelerate right (key 6)
osascript -e 'tell application "Simulator" to activate' && sleep 0.3 && osascript -e 'tell application "System Events" to keystroke "6"'
mcp__automation__sleep(ms: 700)
mcp__automation__screenshot(...)
# Player 2: accelerate right (key 6)
osascript -e 'tell application "Simulator" to activate' && sleep 0.3 && osascript -e 'tell application "System Events" to keystroke "6"'
mcp__automation__sleep(ms: 700)
mcp__automation__screenshot(...)
# Continue alternating...
Test Scenarios
Basic Movement
- Screenshot initial state (both players at start, vel=(0,0))
- P1: Press
6(accelerate right) → vel should become (1,0) - P2: Press
6→ P2 vel should become (1,0) - P1: Press
5(coast) → P1 should move by current velocity
Velocity Accumulation
- P1: Press
6three times (interspersed with P2 turns) - P1's velocity should grow: (1,0) → (2,0) → (3,0)
Collision Test
- Steer a player toward the wall (red markers)
- Press numpad key for crash trajectory
- Verify: life lost, respawn, velocity reset to (0,0)
Lap Completion
- Navigate around track crossing finish line
- Verify lap counter increments
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?