claudecode-omc 5.6.4 → 5.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.local/commands/code-review.md +416 -0
- package/.local/commands/pr.md +250 -0
- package/.local/commands/prp-pr.md +244 -0
- package/.local/guidelines/CLAUDE.md +47 -0
- package/.local/skills/prompt-optimizer/SKILL.md +23 -4
- package/bundled/manifest.json +4 -4
- package/bundled/upstream/anthropic-skills/skills/algorithmic-art/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/brand-guidelines/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/canvas-design/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/claude-api/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/claude-api/SKILL.md +120 -58
- package/bundled/upstream/anthropic-skills/skills/claude-api/curl/examples.md +9 -9
- package/bundled/upstream/anthropic-skills/skills/claude-api/curl/managed-agents.md +336 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/go/managed-agents/README.md +561 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/java/claude-api.md +2 -2
- package/bundled/upstream/anthropic-skills/skills/claude-api/java/managed-agents/README.md +442 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/php/claude-api.md +10 -10
- package/bundled/upstream/anthropic-skills/skills/claude-api/php/managed-agents/README.md +435 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/README.md +16 -16
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/batches.md +3 -3
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/files-api.md +3 -3
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/streaming.md +7 -7
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/tool-use.md +19 -19
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/managed-agents/README.md +332 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/ruby/claude-api.md +4 -4
- package/bundled/upstream/anthropic-skills/skills/claude-api/ruby/managed-agents/README.md +389 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/agent-design.md +101 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/error-codes.md +11 -4
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/live-sources.md +60 -48
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-api-reference.md +372 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-client-patterns.md +209 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-core.md +220 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-environments.md +211 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-events.md +195 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-memory.md +197 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-multiagent.md +99 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-onboarding.md +114 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-outcomes.md +106 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-overview.md +67 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-tools.md +315 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-webhooks.md +110 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/model-migration.md +779 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/models.md +16 -14
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/prompt-caching.md +45 -2
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/tool-use-concepts.md +28 -6
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/README.md +15 -15
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/batches.md +2 -2
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/files-api.md +1 -1
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/streaming.md +5 -5
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/tool-use.md +15 -15
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/managed-agents/README.md +359 -0
- package/bundled/upstream/anthropic-skills/skills/internal-comms/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/mcp-builder/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/skill-creator/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/slack-gif-creator/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/theme-factory/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/web-artifacts-builder/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/webapp-testing/LICENSE.txt +1 -1
- package/bundled/upstream/ecc/.omc-source/bundle.json +2 -3
- package/bundled/upstream/ecc/.omc-source/manifests/.claude-plugin/marketplace.json +4 -4
- package/bundled/upstream/ecc/agents/a11y-architect.md +10 -2
- package/bundled/upstream/ecc/agents/architect.md +9 -0
- package/bundled/upstream/ecc/agents/build-error-resolver.md +9 -0
- package/bundled/upstream/ecc/agents/chief-of-staff.md +9 -0
- package/bundled/upstream/ecc/agents/code-architect.md +9 -0
- package/bundled/upstream/ecc/agents/code-explorer.md +10 -1
- package/bundled/upstream/ecc/agents/code-reviewer.md +87 -1
- package/bundled/upstream/ecc/agents/code-simplifier.md +9 -0
- package/bundled/upstream/ecc/agents/comment-analyzer.md +10 -1
- package/bundled/upstream/ecc/agents/conversation-analyzer.md +9 -0
- package/bundled/upstream/ecc/agents/cpp-build-resolver.md +9 -0
- package/bundled/upstream/ecc/agents/cpp-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/csharp-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/dart-build-resolver.md +9 -0
- package/bundled/upstream/ecc/agents/database-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/django-build-resolver.md +252 -0
- package/bundled/upstream/ecc/agents/django-reviewer.md +169 -0
- package/bundled/upstream/ecc/agents/doc-updater.md +9 -0
- package/bundled/upstream/ecc/agents/docs-lookup.md +9 -0
- package/bundled/upstream/ecc/agents/e2e-runner.md +9 -0
- package/bundled/upstream/ecc/agents/fastapi-reviewer.md +79 -0
- package/bundled/upstream/ecc/agents/flutter-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/fsharp-reviewer.md +109 -0
- package/bundled/upstream/ecc/agents/gan-evaluator.md +9 -0
- package/bundled/upstream/ecc/agents/gan-generator.md +9 -0
- package/bundled/upstream/ecc/agents/gan-planner.md +9 -0
- package/bundled/upstream/ecc/agents/go-build-resolver.md +9 -0
- package/bundled/upstream/ecc/agents/go-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/harmonyos-app-resolver.md +182 -0
- package/bundled/upstream/ecc/agents/harness-optimizer.md +9 -0
- package/bundled/upstream/ecc/agents/healthcare-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/homelab-architect.md +107 -0
- package/bundled/upstream/ecc/agents/java-build-resolver.md +133 -11
- package/bundled/upstream/ecc/agents/java-reviewer.md +130 -32
- package/bundled/upstream/ecc/agents/kotlin-build-resolver.md +9 -0
- package/bundled/upstream/ecc/agents/kotlin-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/loop-operator.md +9 -0
- package/bundled/upstream/ecc/agents/mle-reviewer.md +162 -0
- package/bundled/upstream/ecc/agents/network-architect.md +106 -0
- package/bundled/upstream/ecc/agents/network-config-reviewer.md +106 -0
- package/bundled/upstream/ecc/agents/network-troubleshooter.md +128 -0
- package/bundled/upstream/ecc/agents/opensource-forker.md +9 -0
- package/bundled/upstream/ecc/agents/opensource-packager.md +9 -0
- package/bundled/upstream/ecc/agents/opensource-sanitizer.md +9 -0
- package/bundled/upstream/ecc/agents/performance-optimizer.md +9 -0
- package/bundled/upstream/ecc/agents/planner.md +9 -0
- package/bundled/upstream/ecc/agents/pr-test-analyzer.md +9 -0
- package/bundled/upstream/ecc/agents/python-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/pytorch-build-resolver.md +12 -3
- package/bundled/upstream/ecc/agents/refactor-cleaner.md +9 -0
- package/bundled/upstream/ecc/agents/rust-build-resolver.md +9 -0
- package/bundled/upstream/ecc/agents/rust-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/security-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/seo-specialist.md +10 -1
- package/bundled/upstream/ecc/agents/silent-failure-hunter.md +9 -0
- package/bundled/upstream/ecc/agents/swift-build-resolver.md +170 -0
- package/bundled/upstream/ecc/agents/swift-reviewer.md +116 -0
- package/bundled/upstream/ecc/agents/tdd-guide.md +9 -0
- package/bundled/upstream/ecc/agents/type-design-analyzer.md +10 -1
- package/bundled/upstream/ecc/agents/typescript-reviewer.md +9 -0
- package/bundled/upstream/ecc/commands/auto-update.md +28 -0
- package/bundled/upstream/ecc/commands/build-fix.md +4 -0
- package/bundled/upstream/ecc/commands/checkpoint.md +4 -0
- package/bundled/upstream/ecc/commands/code-review.md +3 -3
- package/bundled/upstream/ecc/commands/cost-report.md +107 -0
- package/bundled/upstream/ecc/commands/cpp-build.md +1 -1
- package/bundled/upstream/ecc/commands/cpp-test.md +1 -1
- package/bundled/upstream/ecc/commands/ecc-guide.md +93 -0
- package/bundled/upstream/ecc/commands/fastapi-review.md +39 -0
- package/bundled/upstream/ecc/commands/flutter-build.md +1 -1
- package/bundled/upstream/ecc/commands/flutter-test.md +1 -1
- package/bundled/upstream/ecc/commands/gan-build.md +4 -0
- package/bundled/upstream/ecc/commands/gan-design.md +4 -0
- package/bundled/upstream/ecc/commands/go-build.md +1 -1
- package/bundled/upstream/ecc/commands/go-test.md +1 -1
- package/bundled/upstream/ecc/commands/harness-audit.md +4 -0
- package/bundled/upstream/ecc/commands/jira.md +2 -2
- package/bundled/upstream/ecc/commands/kotlin-build.md +1 -1
- package/bundled/upstream/ecc/commands/kotlin-test.md +1 -1
- package/bundled/upstream/ecc/commands/learn.md +4 -0
- package/bundled/upstream/ecc/commands/loop-start.md +4 -0
- package/bundled/upstream/ecc/commands/loop-status.md +54 -1
- package/bundled/upstream/ecc/commands/model-route.md +4 -0
- package/bundled/upstream/ecc/commands/multi-backend.md +4 -0
- package/bundled/upstream/ecc/commands/multi-execute.md +4 -0
- package/bundled/upstream/ecc/commands/multi-frontend.md +4 -0
- package/bundled/upstream/ecc/commands/multi-plan.md +4 -0
- package/bundled/upstream/ecc/commands/multi-workflow.md +4 -0
- package/bundled/upstream/ecc/commands/plan-prd.md +160 -0
- package/bundled/upstream/ecc/commands/plan.md +96 -13
- package/bundled/upstream/ecc/commands/pm2.md +4 -0
- package/bundled/upstream/ecc/commands/pr.md +184 -0
- package/bundled/upstream/ecc/commands/project-init.md +86 -0
- package/bundled/upstream/ecc/commands/python-review.md +1 -1
- package/bundled/upstream/ecc/commands/quality-gate.md +4 -0
- package/bundled/upstream/ecc/commands/refactor-clean.md +4 -0
- package/bundled/upstream/ecc/commands/rust-build.md +1 -1
- package/bundled/upstream/ecc/commands/rust-test.md +1 -1
- package/bundled/upstream/ecc/commands/security-scan.md +92 -0
- package/bundled/upstream/ecc/commands/sessions.md +6 -6
- package/bundled/upstream/ecc/commands/skill-health.md +3 -3
- package/bundled/upstream/ecc/commands/test-coverage.md +4 -0
- package/bundled/upstream/ecc/commands/update-codemaps.md +4 -0
- package/bundled/upstream/ecc/commands/update-docs.md +4 -0
- package/bundled/upstream/ecc/skills/accessibility/SKILL.md +1 -1
- package/bundled/upstream/ecc/skills/agent-architecture-audit/SKILL.md +256 -0
- package/bundled/upstream/ecc/skills/agent-payment-x402/SKILL.md +49 -3
- package/bundled/upstream/ecc/skills/agentic-os/SKILL.md +387 -0
- package/bundled/upstream/ecc/skills/angular-developer/SKILL.md +154 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/angular-animations.md +160 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/angular-aria.md +410 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/cli.md +86 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/component-harnesses.md +59 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/component-styling.md +91 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/components.md +117 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/creating-services.md +97 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/data-resolvers.md +69 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/define-routes.md +67 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/defining-providers.md +72 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/di-fundamentals.md +120 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/e2e-testing.md +56 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/effects.md +83 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/hierarchical-injectors.md +43 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/host-elements.md +80 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/injection-context.md +63 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/inputs.md +101 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/linked-signal.md +59 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/loading-strategies.md +61 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/mcp.md +108 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/navigate-to-routes.md +69 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/outputs.md +86 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/reactive-forms.md +122 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/rendering-strategies.md +44 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/resource.md +77 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/route-animations.md +56 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/route-guards.md +52 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/router-lifecycle.md +45 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/router-testing.md +87 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/show-routes-with-outlets.md +68 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/signal-forms.md +795 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/signals-overview.md +94 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/tailwind-css.md +69 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/template-driven-forms.md +114 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/testing-fundamentals.md +65 -0
- package/bundled/upstream/ecc/skills/autonomous-agent-harness/SKILL.md +6 -0
- package/bundled/upstream/ecc/skills/backend-patterns/SKILL.md +8 -45
- package/bundled/upstream/ecc/skills/cisco-ios-patterns/SKILL.md +163 -0
- package/bundled/upstream/ecc/skills/configure-ecc/SKILL.md +31 -14
- package/bundled/upstream/ecc/skills/continuous-learning/SKILL.md +10 -2
- package/bundled/upstream/ecc/skills/continuous-learning-v2/SKILL.md +19 -5
- package/bundled/upstream/ecc/skills/continuous-learning-v2/agents/observer-loop.sh +44 -4
- package/bundled/upstream/ecc/skills/continuous-learning-v2/agents/observer.md +4 -4
- package/bundled/upstream/ecc/skills/continuous-learning-v2/agents/start-observer.sh +5 -1
- package/bundled/upstream/ecc/skills/continuous-learning-v2/hooks/observe.sh +21 -5
- package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/detect-project.sh +58 -13
- package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/instinct-cli.py +97 -4
- package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/lib/homunculus-dir.sh +31 -0
- package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/migrate-homunculus.sh +62 -0
- package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/test_parse_instinct.py +34 -0
- package/bundled/upstream/ecc/skills/cost-tracking/SKILL.md +147 -0
- package/bundled/upstream/ecc/skills/deep-research/SKILL.md +4 -0
- package/bundled/upstream/ecc/skills/defi-amm-security/SKILL.md +6 -0
- package/bundled/upstream/ecc/skills/django-celery/SKILL.md +457 -0
- package/bundled/upstream/ecc/skills/ecc-guide/SKILL.md +189 -0
- package/bundled/upstream/ecc/skills/error-handling/SKILL.md +376 -0
- package/bundled/upstream/ecc/skills/exa-search/SKILL.md +4 -0
- package/bundled/upstream/ecc/skills/fal-ai-media/SKILL.md +4 -0
- package/bundled/upstream/ecc/skills/fastapi-patterns/SKILL.md +327 -0
- package/bundled/upstream/ecc/skills/flox-environments/SKILL.md +496 -0
- package/bundled/upstream/ecc/skills/frontend-design-direction/SKILL.md +92 -0
- package/bundled/upstream/ecc/skills/frontend-slides/animation-patterns.md +122 -0
- package/bundled/upstream/ecc/skills/frontend-slides/html-template.md +419 -0
- package/bundled/upstream/ecc/skills/frontend-slides/scripts/export-pdf.sh +418 -0
- package/bundled/upstream/ecc/skills/frontend-slides/scripts/extract-pptx.py +96 -0
- package/bundled/upstream/ecc/skills/frontend-slides/viewport-base.css +153 -0
- package/bundled/upstream/ecc/skills/fsharp-testing/SKILL.md +280 -0
- package/bundled/upstream/ecc/skills/gateguard/SKILL.md +4 -0
- package/bundled/upstream/ecc/skills/hermes-imports/SKILL.md +88 -0
- package/bundled/upstream/ecc/skills/homelab-network-readiness/SKILL.md +169 -0
- package/bundled/upstream/ecc/skills/homelab-network-setup/SKILL.md +129 -0
- package/bundled/upstream/ecc/skills/homelab-pihole-dns/SKILL.md +274 -0
- package/bundled/upstream/ecc/skills/homelab-vlan-segmentation/SKILL.md +311 -0
- package/bundled/upstream/ecc/skills/homelab-wireguard-vpn/SKILL.md +305 -0
- package/bundled/upstream/ecc/skills/ios-icon-gen/SKILL.md +157 -0
- package/bundled/upstream/ecc/skills/ios-icon-gen/scripts/generate_icons.swift +258 -0
- package/bundled/upstream/ecc/skills/ios-icon-gen/scripts/iconify_gen.sh +235 -0
- package/bundled/upstream/ecc/skills/java-coding-standards/SKILL.md +241 -5
- package/bundled/upstream/ecc/skills/make-interfaces-feel-better/SKILL.md +151 -0
- package/bundled/upstream/ecc/skills/mle-workflow/SKILL.md +346 -0
- package/bundled/upstream/ecc/skills/motion-advanced/SKILL.md +596 -0
- package/bundled/upstream/ecc/skills/motion-foundations/SKILL.md +299 -0
- package/bundled/upstream/ecc/skills/motion-patterns/SKILL.md +435 -0
- package/bundled/upstream/ecc/skills/motion-ui/SKILL.md +575 -0
- package/bundled/upstream/ecc/skills/mysql-patterns/SKILL.md +412 -0
- package/bundled/upstream/ecc/skills/netmiko-ssh-automation/SKILL.md +173 -0
- package/bundled/upstream/ecc/skills/network-bgp-diagnostics/SKILL.md +167 -0
- package/bundled/upstream/ecc/skills/network-config-validation/SKILL.md +210 -0
- package/bundled/upstream/ecc/skills/network-interface-health/SKILL.md +152 -0
- package/bundled/upstream/ecc/skills/openclaw-persona-forge/SKILL.md +1 -9
- package/bundled/upstream/ecc/skills/plan-orchestrate/SKILL.md +262 -0
- package/bundled/upstream/ecc/skills/prisma-patterns/SKILL.md +371 -0
- package/bundled/upstream/ecc/skills/production-audit/SKILL.md +206 -0
- package/bundled/upstream/ecc/skills/prompt-optimizer/SKILL.md +24 -400
- package/bundled/upstream/ecc/skills/quarkus-patterns/SKILL.md +722 -0
- package/bundled/upstream/ecc/skills/quarkus-security/SKILL.md +467 -0
- package/bundled/upstream/ecc/skills/quarkus-tdd/SKILL.md +811 -0
- package/bundled/upstream/ecc/skills/quarkus-verification/SKILL.md +479 -0
- package/bundled/upstream/ecc/skills/redis-patterns/SKILL.md +403 -0
- package/bundled/upstream/ecc/skills/scientific-db-pubmed-database/SKILL.md +175 -0
- package/bundled/upstream/ecc/skills/scientific-db-uspto-database/SKILL.md +177 -0
- package/bundled/upstream/ecc/skills/scientific-pkg-gget/SKILL.md +166 -0
- package/bundled/upstream/ecc/skills/scientific-thinking-literature-review/SKILL.md +192 -0
- package/bundled/upstream/ecc/skills/scientific-thinking-scholar-evaluation/SKILL.md +160 -0
- package/bundled/upstream/ecc/skills/search-first/SKILL.md +23 -2
- package/bundled/upstream/ecc/skills/security-review/SKILL.md +10 -2
- package/bundled/upstream/ecc/skills/skill-comply/scripts/runner.py +28 -3
- package/bundled/upstream/ecc/skills/skill-comply/tests/test_runner.py +172 -0
- package/bundled/upstream/ecc/skills/skill-scout/SKILL.md +140 -0
- package/bundled/upstream/ecc/skills/skill-stocktake/SKILL.md +1 -0
- package/bundled/upstream/ecc/skills/strategic-compact/SKILL.md +2 -2
- package/bundled/upstream/ecc/skills/tinystruct-patterns/SKILL.md +203 -0
- package/bundled/upstream/ecc/skills/tinystruct-patterns/references/architecture.md +90 -0
- package/bundled/upstream/ecc/skills/tinystruct-patterns/references/data-handling.md +60 -0
- package/bundled/upstream/ecc/skills/tinystruct-patterns/references/database.md +99 -0
- package/bundled/upstream/ecc/skills/tinystruct-patterns/references/routing.md +64 -0
- package/bundled/upstream/ecc/skills/tinystruct-patterns/references/system-usage.md +97 -0
- package/bundled/upstream/ecc/skills/tinystruct-patterns/references/testing.md +72 -0
- package/bundled/upstream/ecc/skills/ui-to-vue/SKILL.md +134 -0
- package/bundled/upstream/ecc/skills/vite-patterns/SKILL.md +449 -0
- package/bundled/upstream/ecc/skills/windows-desktop-e2e/SKILL.md +788 -0
- package/bundled/upstream/ecc/skills/x-api/SKILL.md +4 -0
- package/bundled/upstream/oh-my-claudecode/.omc-source/bundle.json +20 -0
- package/bundled/upstream/oh-my-claudecode/agents/analyst.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/architect.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/code-reviewer.md +26 -7
- package/bundled/upstream/oh-my-claudecode/agents/critic.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/debugger.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/designer.md +14 -1
- package/bundled/upstream/oh-my-claudecode/agents/document-specialist.md +1 -1
- package/bundled/upstream/oh-my-claudecode/agents/executor.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/explore.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/git-master.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/planner.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/qa-tester.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/scientist.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/security-reviewer.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/test-engineer.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/tracer.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/verifier.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/writer.md +2 -1
- package/bundled/upstream/oh-my-claudecode/skills/AGENTS.md +4 -3
- package/bundled/upstream/oh-my-claudecode/skills/ai-slop-cleaner/SKILL.md +12 -0
- package/bundled/upstream/oh-my-claudecode/skills/deep-dive/SKILL.md +69 -13
- package/bundled/upstream/oh-my-claudecode/skills/deep-interview/SKILL.md +176 -63
- package/bundled/upstream/oh-my-claudecode/skills/learner/SKILL.md +3 -1
- package/bundled/upstream/oh-my-claudecode/skills/omc-doctor/SKILL.md +22 -3
- package/bundled/upstream/oh-my-claudecode/skills/omc-reference/SKILL.md +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/01-install-claude-md.md +2 -2
- package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/02-configure.md +45 -2
- package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/03-integrations.md +46 -5
- package/bundled/upstream/oh-my-claudecode/skills/plan/SKILL.md +19 -17
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/config.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/parse.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/azure-devops.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/bitbucket.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/gitea.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/github.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/gitlab.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/interface.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/jira.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/session.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/tmux.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/worktree.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/psm.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/tests/test-psm-prompt-injection.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/ralph/SKILL.md +8 -8
- package/bundled/upstream/oh-my-claudecode/skills/ralplan/SKILL.md +9 -5
- package/bundled/upstream/oh-my-claudecode/skills/skill/SKILL.md +6 -6
- package/bundled/upstream/oh-my-claudecode/skills/skillify/SKILL.md +19 -3
- package/bundled/upstream/oh-my-claudecode/skills/trace/SKILL.md +3 -1
- package/bundled/upstream/oh-my-claudecode/skills/ultrawork/SKILL.md +20 -7
- package/bundled/upstream/superpowers/.omc-source/bundle.json +21 -0
- package/bundled/upstream/superpowers/hooks/hooks-cursor.json +1 -1
- package/bundled/upstream/superpowers/skills/executing-plans/SKILL.md +1 -1
- package/bundled/upstream/superpowers/skills/finishing-a-development-branch/SKILL.md +93 -42
- package/bundled/upstream/superpowers/skills/requesting-code-review/SKILL.md +7 -9
- package/bundled/upstream/superpowers/skills/requesting-code-review/code-reviewer.md +107 -85
- package/bundled/upstream/superpowers/skills/subagent-driven-development/SKILL.md +3 -1
- package/bundled/upstream/superpowers/skills/subagent-driven-development/code-quality-reviewer-prompt.md +2 -3
- package/bundled/upstream/superpowers/skills/systematic-debugging/CREATION-LOG.md +1 -1
- package/bundled/upstream/superpowers/skills/systematic-debugging/root-cause-tracing.md +1 -1
- package/bundled/upstream/superpowers/skills/using-git-worktrees/SKILL.md +95 -98
- package/bundled/upstream/superpowers/skills/using-superpowers/references/codex-tools.md +7 -48
- package/bundled/upstream/superpowers/skills/using-superpowers/references/copilot-tools.md +1 -11
- package/bundled/upstream/superpowers/skills/using-superpowers/references/gemini-tools.md +21 -3
- package/bundled/upstream/superpowers/skills/writing-plans/SKILL.md +1 -1
- package/package.json +1 -1
- package/src/cli/index.js +1 -0
- package/src/cli/setup.js +9 -0
- package/src/cli/skill-index.js +209 -0
- package/src/cli/skill.js +4 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/agent-sdk/README.md +0 -355
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/agent-sdk/patterns.md +0 -359
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/agent-sdk/README.md +0 -297
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/agent-sdk/patterns.md +0 -209
- package/bundled/upstream/ecc/commands/agent-sort.md +0 -23
- package/bundled/upstream/ecc/commands/claw.md +0 -23
- package/bundled/upstream/ecc/commands/context-budget.md +0 -23
- package/bundled/upstream/ecc/commands/devfleet.md +0 -23
- package/bundled/upstream/ecc/commands/docs.md +0 -23
- package/bundled/upstream/ecc/commands/e2e.md +0 -268
- package/bundled/upstream/ecc/commands/eval.md +0 -23
- package/bundled/upstream/ecc/commands/orchestrate.md +0 -135
- package/bundled/upstream/ecc/commands/prompt-optimize.md +0 -23
- package/bundled/upstream/ecc/commands/rules-distill.md +0 -20
- package/bundled/upstream/ecc/commands/tdd.md +0 -231
- package/bundled/upstream/ecc/commands/verify.md +0 -23
- package/bundled/upstream/ecc/skills/claude-api/SKILL.md +0 -337
- package/bundled/upstream/ecc/skills/frontend-design/SKILL.md +0 -145
- package/bundled/upstream/superpowers/agents/code-reviewer.md +0 -48
- package/bundled/upstream/superpowers/commands/brainstorm.md +0 -5
- package/bundled/upstream/superpowers/commands/execute-plan.md +0 -5
- package/bundled/upstream/superpowers/commands/write-plan.md +0 -5
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: motion-patterns
|
|
3
|
+
description: Production-ready animation patterns for React / Next.js — button, modal, toast, stagger, page transitions, exit animations, scroll, and layout — built on motion-foundations tokens and springs.
|
|
4
|
+
version: 1.0
|
|
5
|
+
tags: [motion, animation, ui-patterns]
|
|
6
|
+
category: frontend
|
|
7
|
+
author: jeff
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Motion Patterns
|
|
11
|
+
|
|
12
|
+
Copy-paste patterns for the most common UI animation needs.
|
|
13
|
+
Every pattern here is built on `motion-foundations` tokens and springs.
|
|
14
|
+
Do not define new duration or easing values here — import them.
|
|
15
|
+
|
|
16
|
+
## When to Activate
|
|
17
|
+
|
|
18
|
+
- Animating a button, card, modal, or toast notification
|
|
19
|
+
- Building list entrances with stagger
|
|
20
|
+
- Setting up page transitions in Next.js App Router
|
|
21
|
+
- Adding entrance or exit animations to conditional content
|
|
22
|
+
- Implementing scroll-reveal, scroll-linked progress, or sticky story sections
|
|
23
|
+
- Building expanding cards, accordions, or shared-element transitions
|
|
24
|
+
|
|
25
|
+
## Outputs
|
|
26
|
+
|
|
27
|
+
This skill produces:
|
|
28
|
+
|
|
29
|
+
- Accessible, SSR-safe animation for all standard UI components
|
|
30
|
+
- `AnimatePresence`-wrapped conditional renders with correct exit behavior
|
|
31
|
+
- Page transition wrapper component for Next.js App Router
|
|
32
|
+
- Scroll-reveal and scroll-linked patterns using `useScroll` + `useTransform`
|
|
33
|
+
- Layout animation patterns (`layout`, `layoutId`) for expanding and crossfading elements
|
|
34
|
+
|
|
35
|
+
## Principles
|
|
36
|
+
|
|
37
|
+
- Every pattern imports from `motion-foundations`. No raw numbers.
|
|
38
|
+
- Every conditional render is wrapped in `AnimatePresence` with a `key`.
|
|
39
|
+
- Exit animations are always defined alongside enter animations — never as an afterthought.
|
|
40
|
+
- `layout` is used only for small, isolated shifts. Large subtrees get explicit transforms.
|
|
41
|
+
|
|
42
|
+
## Rules
|
|
43
|
+
|
|
44
|
+
1. **Always wrap conditional renders in `AnimatePresence` with a `key`** on the direct child. Without a key, exit animations never fire.
|
|
45
|
+
2. **Always define `exit` when defining `initial` + `animate`.** An animation without an exit is incomplete.
|
|
46
|
+
3. **Use `mode="wait"` on page transitions.** Enter must not start until exit completes.
|
|
47
|
+
4. **Never use `layout` on subtrees with more than ~5 children or deeply nested DOM.** Use explicit `x`/`y` transforms instead.
|
|
48
|
+
5. **Stagger interval must stay between `0.05s` and `0.10s`.** Below feels mechanical; above feels sluggish.
|
|
49
|
+
6. **Modals must always include:** focus trap, Escape-key close, scroll lock, `role="dialog"`, `aria-modal="true"`.
|
|
50
|
+
7. **Scroll reveals use `viewport={{ once: true }}`.** Repeating on scroll-out is distracting, not informative.
|
|
51
|
+
8. **All token values are imported from `motion-foundations`.** No inline numbers.
|
|
52
|
+
|
|
53
|
+
## Decision Guidance
|
|
54
|
+
|
|
55
|
+
### Choosing the right pattern
|
|
56
|
+
|
|
57
|
+
| Situation | Pattern |
|
|
58
|
+
| ---------------------------------------- | ---------------------- |
|
|
59
|
+
| Element appears / disappears | `AnimatePresence` |
|
|
60
|
+
| List of items loading in sequence | Stagger variants |
|
|
61
|
+
| Navigating between routes | Page transition wrapper|
|
|
62
|
+
| Element changes size in place | `layout` prop |
|
|
63
|
+
| Same element moves across page contexts | `layoutId` |
|
|
64
|
+
| Element enters when scrolled into view | `whileInView` |
|
|
65
|
+
| Value tied to scroll position | `useScroll` + `useTransform` |
|
|
66
|
+
|
|
67
|
+
### When to use `mode="wait"` vs `mode="sync"`
|
|
68
|
+
|
|
69
|
+
| Mode | Use when |
|
|
70
|
+
| ------- | --------------------------------------- |
|
|
71
|
+
| `wait` | Page transitions, content swaps (one at a time) |
|
|
72
|
+
| `sync` | Stacked notifications, list items (overlap is fine) |
|
|
73
|
+
| `popLayout` | Items removed from a reflow list |
|
|
74
|
+
|
|
75
|
+
## Core Concepts
|
|
76
|
+
|
|
77
|
+
### AnimatePresence contract
|
|
78
|
+
|
|
79
|
+
Three things must always be true:
|
|
80
|
+
|
|
81
|
+
1. `AnimatePresence` wraps the conditional
|
|
82
|
+
2. The direct child has a `key`
|
|
83
|
+
3. The child has an `exit` prop
|
|
84
|
+
|
|
85
|
+
Miss any one of these and the exit animation silently fails.
|
|
86
|
+
|
|
87
|
+
### layout vs layoutId
|
|
88
|
+
|
|
89
|
+
- `layout` — animates the element's own size/position change in place
|
|
90
|
+
- `layoutId` — links two separate elements, crossfading between them across renders
|
|
91
|
+
|
|
92
|
+
Use `layout="position"` on text inside an expanding container to prevent text reflow from animating.
|
|
93
|
+
|
|
94
|
+
## Code Examples
|
|
95
|
+
|
|
96
|
+
### Button feedback
|
|
97
|
+
|
|
98
|
+
```tsx
|
|
99
|
+
"use client"
|
|
100
|
+
import { motion } from "motion/react"
|
|
101
|
+
import { springs, motionTokens } from "@/lib/motion-tokens"
|
|
102
|
+
|
|
103
|
+
<motion.button
|
|
104
|
+
whileHover={{ scale: motionTokens.scale.pop }}
|
|
105
|
+
whileTap={{ scale: motionTokens.scale.press }}
|
|
106
|
+
transition={springs.snappy}
|
|
107
|
+
/>
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Stagger list
|
|
111
|
+
|
|
112
|
+
```tsx
|
|
113
|
+
"use client"
|
|
114
|
+
import { motion } from "motion/react"
|
|
115
|
+
import { motionTokens, springs } from "@/lib/motion-tokens"
|
|
116
|
+
|
|
117
|
+
const container = {
|
|
118
|
+
hidden: {},
|
|
119
|
+
visible: {
|
|
120
|
+
transition: {
|
|
121
|
+
staggerChildren: 0.08, // within the 0.05–0.10 rule
|
|
122
|
+
delayChildren: 0.1,
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
const item = {
|
|
128
|
+
hidden: { opacity: 0, y: motionTokens.distance.md },
|
|
129
|
+
visible: { opacity: 1, y: 0, transition: springs.gentle },
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
<motion.ul variants={container} initial="hidden" animate="visible">
|
|
133
|
+
{items.map((i) => (
|
|
134
|
+
<motion.li key={i.id} variants={item} />
|
|
135
|
+
))}
|
|
136
|
+
</motion.ul>
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Modal
|
|
140
|
+
|
|
141
|
+
```tsx
|
|
142
|
+
"use client"
|
|
143
|
+
import { motion, AnimatePresence } from "motion/react"
|
|
144
|
+
import { motionTokens, springs } from "@/lib/motion-tokens"
|
|
145
|
+
|
|
146
|
+
// Wrap at the call site:
|
|
147
|
+
// <AnimatePresence>{isOpen && <Modal key="modal" />}</AnimatePresence>
|
|
148
|
+
|
|
149
|
+
export function Modal({ onClose }: { onClose: () => void }) {
|
|
150
|
+
return (
|
|
151
|
+
<>
|
|
152
|
+
{/* Overlay */}
|
|
153
|
+
<motion.div
|
|
154
|
+
className="fixed inset-0 bg-black/50"
|
|
155
|
+
initial={{ opacity: 0 }}
|
|
156
|
+
animate={{ opacity: 1 }}
|
|
157
|
+
exit={{ opacity: 0 }}
|
|
158
|
+
onClick={onClose}
|
|
159
|
+
/>
|
|
160
|
+
|
|
161
|
+
{/* Panel — accessibility requirements: focus trap, Escape close,
|
|
162
|
+
scroll lock, role="dialog", aria-modal="true" */}
|
|
163
|
+
<motion.div
|
|
164
|
+
role="dialog"
|
|
165
|
+
aria-modal="true"
|
|
166
|
+
className="fixed inset-x-4 top-1/2 -translate-y-1/2 rounded-xl bg-white p-6"
|
|
167
|
+
initial={{
|
|
168
|
+
opacity: 0,
|
|
169
|
+
scale: motionTokens.scale.press,
|
|
170
|
+
y: motionTokens.distance.sm,
|
|
171
|
+
}}
|
|
172
|
+
animate={{ opacity: 1, scale: 1, y: 0 }}
|
|
173
|
+
exit={{
|
|
174
|
+
opacity: 0,
|
|
175
|
+
scale: motionTokens.scale.press,
|
|
176
|
+
y: motionTokens.distance.sm,
|
|
177
|
+
}}
|
|
178
|
+
transition={springs.gentle}
|
|
179
|
+
/>
|
|
180
|
+
</>
|
|
181
|
+
)
|
|
182
|
+
}
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### Toast stack
|
|
186
|
+
|
|
187
|
+
```tsx
|
|
188
|
+
"use client"
|
|
189
|
+
import { motion, AnimatePresence } from "motion/react"
|
|
190
|
+
import { motionTokens, springs } from "@/lib/motion-tokens"
|
|
191
|
+
|
|
192
|
+
<AnimatePresence mode="sync">
|
|
193
|
+
{toasts.map((t) => (
|
|
194
|
+
<motion.div
|
|
195
|
+
key={t.id}
|
|
196
|
+
layout
|
|
197
|
+
initial={{
|
|
198
|
+
opacity: 0,
|
|
199
|
+
x: motionTokens.distance.xl,
|
|
200
|
+
scale: motionTokens.scale.subtle,
|
|
201
|
+
}}
|
|
202
|
+
animate={{ opacity: 1, x: 0, scale: 1 }}
|
|
203
|
+
exit={{
|
|
204
|
+
opacity: 0,
|
|
205
|
+
x: motionTokens.distance.xl,
|
|
206
|
+
scale: motionTokens.scale.subtle,
|
|
207
|
+
}}
|
|
208
|
+
transition={springs.snappy}
|
|
209
|
+
/>
|
|
210
|
+
))}
|
|
211
|
+
</AnimatePresence>
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### Page transition (Next.js App Router)
|
|
215
|
+
|
|
216
|
+
```tsx
|
|
217
|
+
// components/page-transition.tsx
|
|
218
|
+
"use client"
|
|
219
|
+
import { motion, AnimatePresence } from "motion/react"
|
|
220
|
+
import { usePathname } from "next/navigation"
|
|
221
|
+
import { motionTokens } from "@/lib/motion-tokens"
|
|
222
|
+
|
|
223
|
+
const variants = {
|
|
224
|
+
initial: { opacity: 0, y: motionTokens.distance.sm },
|
|
225
|
+
enter: { opacity: 1, y: 0 },
|
|
226
|
+
exit: { opacity: 0, y: -motionTokens.distance.sm },
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export function PageTransition({ children }: { children: React.ReactNode }) {
|
|
230
|
+
const pathname = usePathname()
|
|
231
|
+
return (
|
|
232
|
+
<AnimatePresence mode="wait">
|
|
233
|
+
<motion.div
|
|
234
|
+
key={pathname}
|
|
235
|
+
variants={variants}
|
|
236
|
+
initial="initial"
|
|
237
|
+
animate="enter"
|
|
238
|
+
exit="exit"
|
|
239
|
+
transition={{
|
|
240
|
+
duration: motionTokens.duration.normal,
|
|
241
|
+
ease: motionTokens.easing.smooth,
|
|
242
|
+
}}
|
|
243
|
+
>
|
|
244
|
+
{children}
|
|
245
|
+
</motion.div>
|
|
246
|
+
</AnimatePresence>
|
|
247
|
+
)
|
|
248
|
+
}
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### Scroll reveal
|
|
252
|
+
|
|
253
|
+
```tsx
|
|
254
|
+
"use client"
|
|
255
|
+
import { motion } from "motion/react"
|
|
256
|
+
import { motionTokens, springs } from "@/lib/motion-tokens"
|
|
257
|
+
|
|
258
|
+
<motion.div
|
|
259
|
+
initial={{ opacity: 0, y: motionTokens.distance.lg }}
|
|
260
|
+
whileInView={{ opacity: 1, y: 0 }}
|
|
261
|
+
viewport={{ once: true, margin: "-80px" }} // once: true — rule 7
|
|
262
|
+
transition={{ duration: motionTokens.duration.slow, ease: motionTokens.easing.smooth }}
|
|
263
|
+
/>
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
### Scroll progress bar
|
|
267
|
+
|
|
268
|
+
```tsx
|
|
269
|
+
"use client"
|
|
270
|
+
import { motion, useScroll } from "motion/react"
|
|
271
|
+
|
|
272
|
+
export function ScrollProgress() {
|
|
273
|
+
const { scrollYProgress } = useScroll()
|
|
274
|
+
return (
|
|
275
|
+
<motion.div
|
|
276
|
+
className="fixed top-0 left-0 h-1 bg-indigo-500 origin-left w-full"
|
|
277
|
+
style={{ scaleX: scrollYProgress }}
|
|
278
|
+
/>
|
|
279
|
+
)
|
|
280
|
+
}
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
### Expanding card
|
|
284
|
+
|
|
285
|
+
```tsx
|
|
286
|
+
"use client"
|
|
287
|
+
import { useState } from "react"
|
|
288
|
+
import { motion, AnimatePresence } from "motion/react"
|
|
289
|
+
import { springs, motionTokens } from "@/lib/motion-tokens"
|
|
290
|
+
|
|
291
|
+
export function ExpandingCard({ title, body }: { title: string; body: string }) {
|
|
292
|
+
const [expanded, setExpanded] = useState(false)
|
|
293
|
+
|
|
294
|
+
return (
|
|
295
|
+
<motion.div layout onClick={() => setExpanded(!expanded)} className="cursor-pointer">
|
|
296
|
+
{/* layout="position" prevents text reflow from animating */}
|
|
297
|
+
<motion.h2 layout="position" className="font-semibold">
|
|
298
|
+
{title}
|
|
299
|
+
</motion.h2>
|
|
300
|
+
|
|
301
|
+
<AnimatePresence>
|
|
302
|
+
{expanded && (
|
|
303
|
+
<motion.p
|
|
304
|
+
key="body"
|
|
305
|
+
initial={{ opacity: 0 }}
|
|
306
|
+
animate={{ opacity: 1 }}
|
|
307
|
+
exit={{ opacity: 0 }}
|
|
308
|
+
transition={{ duration: motionTokens.duration.fast }}
|
|
309
|
+
>
|
|
310
|
+
{body}
|
|
311
|
+
</motion.p>
|
|
312
|
+
)}
|
|
313
|
+
</AnimatePresence>
|
|
314
|
+
</motion.div>
|
|
315
|
+
)
|
|
316
|
+
}
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
### Shared-element crossfade
|
|
320
|
+
|
|
321
|
+
```tsx
|
|
322
|
+
// Source context
|
|
323
|
+
<motion.img layoutId="hero-image" src={src} className="w-16 h-16 rounded" />
|
|
324
|
+
|
|
325
|
+
// Destination context (same layoutId — motion handles the transition)
|
|
326
|
+
<motion.img layoutId="hero-image" src={src} className="w-full rounded-xl" />
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
### Accordion
|
|
330
|
+
|
|
331
|
+
```tsx
|
|
332
|
+
<motion.div
|
|
333
|
+
initial={false}
|
|
334
|
+
animate={{ opacity: open ? 1 : 0, scaleY: open ? 1 : 0 }}
|
|
335
|
+
style={{ transformOrigin: "top", overflow: "hidden" }}
|
|
336
|
+
transition={{
|
|
337
|
+
duration: motionTokens.duration.normal,
|
|
338
|
+
ease: motionTokens.easing.smooth,
|
|
339
|
+
}}
|
|
340
|
+
>
|
|
341
|
+
{children}
|
|
342
|
+
</motion.div>
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
## End-to-End Example
|
|
346
|
+
|
|
347
|
+
A staggered list that enters on mount, handles conditional presence, and
|
|
348
|
+
respects reduced motion — combining tokens, springs, AnimatePresence, and
|
|
349
|
+
the accessibility hook from `motion-foundations`:
|
|
350
|
+
|
|
351
|
+
```tsx
|
|
352
|
+
"use client"
|
|
353
|
+
import { useState } from "react"
|
|
354
|
+
import { motion, AnimatePresence } from "motion/react"
|
|
355
|
+
import { motionTokens, springs } from "@/lib/motion-tokens"
|
|
356
|
+
import { useSafeMotion } from "@/hooks/use-reduced-motion"
|
|
357
|
+
|
|
358
|
+
const containerVariants = {
|
|
359
|
+
hidden: {},
|
|
360
|
+
visible: {
|
|
361
|
+
transition: { staggerChildren: 0.08, delayChildren: 0.1 },
|
|
362
|
+
},
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
function ListItem({ label, onRemove }: { label: string; onRemove: () => void }) {
|
|
366
|
+
const safe = useSafeMotion(motionTokens.distance.sm)
|
|
367
|
+
return (
|
|
368
|
+
<motion.li
|
|
369
|
+
variants={{
|
|
370
|
+
hidden: safe.initial,
|
|
371
|
+
visible: safe.animate,
|
|
372
|
+
}}
|
|
373
|
+
exit={safe.exit}
|
|
374
|
+
transition={springs.gentle}
|
|
375
|
+
className="flex items-center justify-between p-3 rounded-lg bg-white shadow-sm"
|
|
376
|
+
>
|
|
377
|
+
<span>{label}</span>
|
|
378
|
+
<button onClick={onRemove}>Remove</button>
|
|
379
|
+
</motion.li>
|
|
380
|
+
)
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
export function AnimatedList({ items, onRemove }: {
|
|
384
|
+
items: { id: string; label: string }[]
|
|
385
|
+
onRemove: (id: string) => void
|
|
386
|
+
}) {
|
|
387
|
+
return (
|
|
388
|
+
<motion.ul
|
|
389
|
+
variants={containerVariants}
|
|
390
|
+
initial="hidden"
|
|
391
|
+
animate="visible"
|
|
392
|
+
className="space-y-2"
|
|
393
|
+
>
|
|
394
|
+
<AnimatePresence mode="popLayout">
|
|
395
|
+
{items.map((item) => (
|
|
396
|
+
<ListItem
|
|
397
|
+
key={item.id}
|
|
398
|
+
label={item.label}
|
|
399
|
+
onRemove={() => onRemove(item.id)}
|
|
400
|
+
/>
|
|
401
|
+
))}
|
|
402
|
+
</AnimatePresence>
|
|
403
|
+
</motion.ul>
|
|
404
|
+
)
|
|
405
|
+
}
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
## Constraints / Non-Goals
|
|
409
|
+
|
|
410
|
+
This skill does **not** cover:
|
|
411
|
+
|
|
412
|
+
- Token and spring definitions → see `motion-foundations`
|
|
413
|
+
- Drag interactions, swipe gestures, reorderable lists → see `motion-advanced`
|
|
414
|
+
- Text animations (word/character reveal, counters) → see `motion-advanced`
|
|
415
|
+
- SVG path drawing or morphing → see `motion-advanced`
|
|
416
|
+
- Custom animation hooks → see `motion-advanced`
|
|
417
|
+
- CSS-only transitions not using `motion/react`
|
|
418
|
+
|
|
419
|
+
## Anti-Patterns
|
|
420
|
+
|
|
421
|
+
| Anti-pattern | Rule violated | Fix |
|
|
422
|
+
| -------------------------------------------- | ------- | ------------------------------------------ |
|
|
423
|
+
| `AnimatePresence` child missing `key` | Rule 1 | Add stable `key` to the direct child |
|
|
424
|
+
| `initial` + `animate` without `exit` | Rule 2 | Always define all three together |
|
|
425
|
+
| Page transition without `mode="wait"` | Rule 3 | Add `mode="wait"` to `AnimatePresence` |
|
|
426
|
+
| `layout` on a 50-item list | Rule 4 | Use `mode="popLayout"` or explicit transforms |
|
|
427
|
+
| `staggerChildren: 0.2` on a 10-item list | Rule 5 | Cap at `0.08–0.10` |
|
|
428
|
+
| Modal without focus trap | Rule 6 | Add `focus-trap-react` or Radix Dialog |
|
|
429
|
+
| `whileInView` without `viewport={{ once: true }}` | Rule 7 | Repeating entrances distract, not inform |
|
|
430
|
+
| `transition={{ duration: 0.3 }}` inline | Rule 8 | Use `motionTokens.duration.normal` |
|
|
431
|
+
|
|
432
|
+
## Related Skills
|
|
433
|
+
|
|
434
|
+
- **`motion-foundations`** — defines all tokens, springs, the `useSafeMotion` hook, and SSR guards that every pattern here imports. Must be set up first.
|
|
435
|
+
- **`motion-advanced`** — extends these patterns with drag, gestures, SVG, text, custom hooks, and imperative sequencing. Does not redefine any patterns from this skill.
|