MotionEyes is an agent-first SwiftUI motion observability system.
MotionEyes combines:
package/: runtime tracing primitives that emit motion data over time (.motionTrace,Trace.value,Trace.geometry,Trace.scrollGeometry)skill/motioneyes-animation-debug: installs or integrates the package, adds focused traces, captures logs, and validates behavior against intentskill/motioneyes-visual-analysis: analyzes frame sequences with computer vision and produces annotated images plus JSON summaries
The goal is to let agents read real motion, geometry, and scroll values from logs instead of guessing from code.
Skill demo:
motioneyes-visual-analysis can generate keyframe sprites, grid overlays, and pixel diffs for motion analysis. The recommended interpretation flow is:
- Start with a clean keyframe sprite to understand overall motion progression.
- Use the matching grid sequence when you need coordinate-aware position checks.
- Use adjacent-frame diffs for precise pixel-change confirmation.
Example artifacts below were generated from a focused demo sequence:
Keyframe sprite (clean motion progression, 5 selected frames)
Grid sequence (same 5 frames with coordinate labels)
Adjacent diff sprite (4 selected-frame deltas)
Grid overlays require the GridGPT submodule at third_party/GridGPT.
git submodule update --init --recursive
test -f third_party/GridGPT/arial.ttf && echo "GridGPT font OK" || echo "GridGPT font missing"
pip3 install -r skill/motioneyes-visual-analysis/requirements.txtGenerate analysis artifacts like the examples above:
python3 skill/motioneyes-visual-analysis/scripts/analyze_sequence.py \
--video /path/to/capture.mp4 \
--fps 15 \
--duration 1.0 \
--trim \
--diff-grid \
--output /path/to/reportBy default, diff outputs are rendered for keyframe-related pairs only. Add --all-pairs when you need diff/ and diff_grid/ for every consecutive frame pair.
- Define expected behavior in measurable terms.
- Locate the views and state values that drive the behavior.
- Ensure MotionEyes is available or integrate it if missing.
- Add temporary, focused traces to values, geometry, or scroll state.
- Reproduce the issue and capture MotionEyes logs.
- Compare observed traces against expected motion relationships and timing.
- Apply fixes, re-run validation, then remove only the temporary instrumentation added for that run.
Trace.geometry separates coordinate target from frame source:
- Layout-relative debugging:
space: .swiftUI(.global), source: .layout - Window-relative debugging:
space: .window, source: .layout - True on-screen movement:
space: .screen, source: .presentation
MotionEyes works best alongside XcodeBuildMCP for simulator control and log capture, but it is not strictly required.
If MCP is unavailable, agents can still capture and read simulator logs directly:
xcrun simctl spawn booted log stream \
--style compact \
--level debug \
--predicate 'subsystem == "MotionEyes"'.transitionvisual behavior is not directly observable when no measurable underlying value is exposed.
See skill/SKILLS.md for guidance on when to use each skill.
package/: MotionEyes Swift packageskill/motioneyes-animation-debug/: MotionEyes agent skillskill/motioneyes-visual-analysis/: Frame-based visual analysis skillskill/motioneyes-animation-debug/SKILL.md: Skill workflow definition
From repo root:
swift build --package-path package
swift test --package-path package- Detect unintended movement in UI that should remain still.
- Confirm expected motion actually happens when a state change should animate.
- Verify movement direction on each axis (for example, up vs down, left vs right).
- Confirm two animations are truly staggered instead of firing together.
- Check that relative positioning between two moving elements stays correct.
- Detect timing drift, including late starts, early stops, or incorrect duration.
- Catch easing or path issues such as overshoot or reversal when smooth one-way motion is expected.
- Diagnose scroll jumps, failed restoration, and content-offset desynchronization.
The MotionEyes skill lives at skill/motioneyes-animation-debug/SKILL.md.
Invoke it with:
$motioneyes-animation-debug
This repo includes .claude-plugin/plugin.json and .claude-plugin/marketplace.json for Claude Code marketplace distribution.
Personal usage:
- Add the marketplace.
/plugin marketplace add edwardsanchez/MotionEyes
- Install the skill.
/plugin install motioneyes@motioneyes
Project configuration:
{
"enabledPlugins": {
"motioneyes@motioneyes": true
},
"extraKnownMarketplaces": {
"motioneyes": {
"source": {
"source": "github",
"repo": "edwardsanchez/MotionEyes"
}
}
}
}Contributions are welcome. Please read CONTRIBUTING.md for the workflow, quality standards, and scope guidance.

