Skip to content

ShadowKingYT444/motion-debugger / plugin/motion-debugger/skills/motion

motion

Verified

Create and verify polished website motion from a normal website or app prompt. Use when the user tags Motion Debugger or asks for expressive animations, spatial scenes, scroll choreography or refined microinteractions. Includes runnable spring, scroll chapter, articulated colony, task handoff, elapsed task sequence, kinetic identity field and modal drawer recipes, then actual browser evidence.

recipes/scroll-chapters.mjs

View on GitHub
import {animateSpring} from './spring.mjs';

export const clamp = value => Math.min(1, Math.max(0, value));
export function chapterState(progress, count) {
  if (!Number.isInteger(count) || count < 1) throw new TypeError('At least one chapter required');
  const phase = clamp(progress) * count;
  return Array.from({length: count}, (_, i) => ({index: i, progress: clamp(phase - i), weight: clamp(1 - Math.abs(phase - (i + .5)))}));
}

/** A sticky scene advances from an actual scroll range, with chapter-specific callbacks. */
export function createScrollChapters({root, chapters, render, scene, viewport = globalThis}) {
  if (!root || !chapters?.length || typeof render !== 'function') throw new TypeError('root, chapters and render required');
  let disposed = false;
  const media = viewport.matchMedia('(prefers-reduced-motion: reduce)');
  const paint = ({value}) => {
    const states = chapterState(value, chapters.length);
    const active = Math.min(chapters.length - 1, Math.floor(clamp(value) * chapters.length));
    root.dataset.chapter = String(active); root.dataset.progress = value.toFixed(4);
    chapters.forEach((element, i) => {element.dataset.active = String(i === active);});
    render({progress: value, chapters: states, active, reducedMotion: media.matches});
  };
  const animation = animateSpring(paint, {frequency: 2.2, media, requestFrame: viewport.requestAnimationFrame.bind(viewport), cancelFrame: viewport.cancelAnimationFrame.bind(viewport)});
  const measure = () => {
    if (disposed) return;
    const rect = root.getBoundingClientRect(), range = Math.max(1, rect.height - viewport.innerHeight);
    animation.retarget(clamp(-rect.top / range));
  };
  viewport.addEventListener('scroll', measure, {passive: true}); viewport.addEventListener('resize', measure);
  const observer = typeof ResizeObserver !== 'undefined' ? new ResizeObserver(measure) : null;
  observer?.observe(root); measure();
  return {measure, dispose() {disposed = true; animation.dispose(); observer?.disconnect(); viewport.removeEventListener('scroll', measure); viewport.removeEventListener('resize', measure); scene?.dispose?.();}};
}
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 470kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall