Motion And Hapticsのロゴ

Motion And Haptics

コミュニティ
zakariaf
motion-and-haptics

フレームワークの既定動作に任せず、意図して設計したインタラクションフィードバックを実装します。状態を確定する操作には同じフレーム内で必ず応答し、動きは状態を装飾するものであって状態そのものにはしません(アニメーションをオフにしても最終状態は同じです)。各演出のきっかけ、時間の役割、触覚フィードバックのタイミング、設計時に定めた動きの軽減設定への代替動作を含むカタログを用意します。HapticThemeをイベントから強度へのマップとして使い、確定したフレームで触覚フィードバックを1回だけ発生させます(アニメーションの各フレームやまとめられた入力ごとには発生させず、エラーにheavyImpactを使いません)。一元管理された切り替え機能を設けます。すべてのアニメーションは途中で操作可能にし、タップすると最終状態に遷移するようにします。演出は再生1回限りで範囲を限定し、ループも入力の妨げもないようにします。繰り返すアニメーションには、画面を離れたとき、バックグラウンドに移行したとき、動きを軽減する設定のときなど、明確な停止条件を設けます。動きの軽減設定でも触覚とサウンドが機能するよう、複数のチャネルでフィードバックを提供します。アニメーション、成功/エラー状態、触覚フィードバック、演出、画面遷移の追加や調整に使用してください。

Add to TypingMind

概要

公開者zakariaf
リポジトリFlutter-Skills
スキル名motion-and-haptics
スター
64
フォーク
15
同梱ファイル
1
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 1個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    zakariafがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Motion And Haptics」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/zakariaf/Flutter-Skills/tree/main/skills/motion-and-haptics
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/zakariaf/Flutter-Skills.git /tmp/Flutter-Skills
mkdir -p .claude/skills
cp -r /tmp/Flutter-Skills/skills/motion-and-haptics .claude/skills/motion-and-haptics
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでMotion And Hapticsを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にMotion And Hapticsを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Motion And Hapticsは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Motion and haptics

What fires, when, exactly once, and how it degrades. Feedback is the layer users feel rather than read — an app whose taps land, whose errors are felt, and whose success is acknowledged reads as finished; the same app with default Material feedback reads as a prototype.

Scope boundary. Motion tokens — duration roles, curve slots, the no-raw-values gate, and resolveMotion collapsing to Duration.zero under reduced motion — are owned by design-system-structure. Painter/ticker mechanics are owned by custom-canvas-and-gestures. Which surface a message uses — loading, empty, error, snackbar, banner, dialog, Undo, and screen-reader announcements — is owned by ui-states-and-feedback. This skill owns the sensory layer those decisions ride on: which moments exist, what each one commits to, how haptics are mapped and fired, and what survives when the animation does not.

Non-negotiable rules

  1. Every committing interaction is acknowledged in the same frame it happens. Finger-down shows a press state immediately; the commit's own feedback follows on commit. WHY: a control that waits for an async result before showing anything is indistinguishable from a control that did not register the tap, and the user taps again.

  2. Motion decorates state; it is never the state. The end state must be identical, correct, and reachable with all animations disabled. A selection that only exists while its animation runs, or a value that is only legible mid-transition, is a bug that reduced-motion users hit every time.

  3. Name your moments and design each one deliberately. Every app has a small catalog — press acknowledgment, rejected input, the commit payoff, success, progress or streak increment, and the signature screen transition. Each moment declares five things: its trigger, what changes, which duration role and curve it spends, its haptic slot, and its reduced-motion fallback. A moment left unspecified is not "minimal" — it is the framework default, chosen by nobody. See references/moment-catalog.md.

  4. Every animation declares its reduced-motion behaviour at design time. "It is small, nobody will mind" is not a fallback. The mechanism (resolveMotion → Duration.zero) belongs to design-system-structure; the decision — cross-fade to the end state, appear already-complete, omit the flourish entirely — is made per moment, here, and written down. Feature code never re-reads the platform flag per animation.

  5. Haptics are a map, not scattered calls. A HapticTheme extension maps each event to at most one HapticFeedback verb: selection ≤ selectionClick, commit ≤ lightImpact/mediumImpact, rejection ≤ lightImpact, success ≤ mediumImpact, and heavyImpact reserved for a genuine milestone. A null slot is a declared silence, not an omission. WHY: haptics added ad hoc at call sites always drift upward in intensity until the app buzzes.

  6. Fire one haptic per committed event, on the commit frame. Never inside an animation callback, never per frame, never once per input in a coalesced gesture — a drag emits at most an engage and a commit. WHY: a haptic per frame is a vibration, and a haptic per coalesced input turns a fast gesture into a rattle.

  7. heavyImpact is never the error sound. Escalating intensity for failure punishes the user for a mistake the UI could have prevented. Rejection is acknowledged, not amplified.

  8. One in-app toggle gates every haptic, celebrations included. Platforms have their own coarse system-haptics setting; an app that fires haptics needs its own switch too, and it must be a single central gate rather than a flag each call site remembers to check.

  9. Every animation is interruptible. A tap during a transition or celebration resolves it to its end state immediately. Never block input for the duration of a flourish, and never make the user wait out a success. WHY: the second time a user sees a celebration they want to be past it.

  10. Celebrations have a budget. Bounded element count, bounded time to the next interactive state, originating from the point of action rather than the screen edges, played once, never looped. Failure states get acknowledgment with no shaming motion. WHY: an unbounded celebration is a load screen the user did not ask for.

  11. Every repeating or ambient animation declares a stop condition. It stops when its route is not current, when the app is backgrounded, and under reduced motion. A repeat() with no stop condition is a battery bug that no test will catch and no reviewer will see.

  12. Feedback is redundant across channels. Haptics and sound survive reduced motion precisely because they are the remaining channels — so a state change may never be carried by motion alone. (Color-alone is owned by accessibility-as-code; this is the motion-alone half of the same rule.)

  13. Sound, if any, is the third channel and never the first. Respect the platform's silent behaviour, keep it short, never require it to understand what happened, and gate it behind the same kind of central toggle as haptics.

  14. Transitions follow reading direction; a fixed content surface does not re-mirror. A horizontal push flips under RTL because navigation is directional; a canvas, board, chart, or media surface whose own layout is direction-neutral stays as it is. Direction geometry is owned by i18n-rtl-l10n.

The moment declaration

Write each moment down before implementing it. The table is the specification — an implementation that cannot fill a column has not finished designing that moment.

MomentTriggerWhat changesDuration roleHapticReduced-motion fallback
Presspointer downpress transformshortestselectionClickinstant state, no transform
Rejectinvalid inputbounded shake + messageshort, interruptiblelightImpactmessage only, no shake
Commitstate committedthe transformation itselfmediumlightImpactend state appears instantly
Successtask completeacknowledgment + resultlong, skippablemediumImpactresult appears already complete
Incrementcounter advancesone emphasis pulseshortselectionClick or silencenew value, no pulse
Transitionroute changethe signature transitionmediumnonecross-fade or none

Durations here are roles, not numbers — the numbers are tokens owned by design-system-structure.

Firing a haptic exactly once

dart
// The event map lives in the theme; call sites name an event, never an intensity.
@immutable
class HapticTheme extends ThemeExtension<HapticTheme> {
  const HapticTheme({this.select, this.commit, this.reject, this.success});

  /// A null slot is a DECLARED silence — the design said no haptic here.
  final Future<void> Function()? select;
  final Future<void> Function()? commit;
  final Future<void> Function()? reject;
  final Future<void> Function()? success;
  // copyWith / lerp omitted — see design-system-structure for the ThemeExtension contract.
}

// One central gate; no call site remembers to check the setting.
void fire(WidgetRef ref, Future<void> Function()? slot) {
  if (!ref.read(hapticsEnabledProvider)) return;
  slot?.call();
}

// At the commit — once, on the frame the state actually changed (rules 6, 8).
void onCommit(BuildContext context, WidgetRef ref, EditIntent intent) {
  ref.read(itemsProvider.notifier).apply(intent);          // state first
  fire(ref, Theme.of(context).extension<HapticTheme>()!.commit);
}

Never call HapticFeedback.* from an AnimationController listener, an onEnd callback, or a per-item loop — those are the three places a single event becomes a burst.

Anti-patterns

  • A control with no press state — every "did that register?" double-tap starts here.
  • State that only exists while an animation runs — turn animations off and the app must still be correct and legible.
  • An animation with no designed reduced-motion behaviour, or feature code re-reading the platform flag per animation.
  • HapticFeedback.mediumImpact() sprinkled at call sites — map events to slots once; ad-hoc haptics only ever escalate.
  • A haptic in an animation listener, an onEnd, or per item in a coalesced gesture — one per committed event, on the commit frame.
  • heavyImpact for an error — acknowledge failure, do not punish it.
  • An un-skippable celebration, or blocked input during a flourish — a tap resolves it instantly.
  • A looping celebration, edge-spawned particles, or an unbounded element count — budget it.
  • A "sad" failure animation — the user already knows.
  • repeat() with no stop condition — it must stop off-route, backgrounded, and under reduced motion.
  • Sound as the only signal, or sound that ignores the platform's silent behaviour.
  • A mirrored content surface under RTL — navigation direction flips, a direction-neutral canvas does not.

Definition of done

  • Every committing interaction acknowledges within the same frame.
  • Every moment touched has a filled-in declaration row: trigger, change, duration role, haptic slot, reduced-motion fallback.
  • The end state is identical and reachable with animations disabled; nothing is motion-only.
  • Haptics come from the HapticTheme map, are at or below the intensity ceiling for their event, fire once per committed event on the commit frame, and are gated by one central toggle.
  • null haptic slots are deliberate silences, recorded as such.
  • Every animation is interruptible; a tap resolves it to its end state; input is never blocked.
  • Celebrations are bounded, originate from the point of action, play once, and never loop.
  • Every repeating animation has an explicit stop condition for off-route, backgrounded, and reduced motion.
  • Sound (if any) is redundant, short, silent-mode-aware, and centrally gated.
  • Transitions respect reading direction; direction-neutral content surfaces are not re-mirrored.

Related skills

  • See design-system-structure for the motion tokens, curve slots, and the resolveMotion helper this skill spends — including the three animations Material mounts by default.
  • See custom-canvas-and-gestures for driving canvas animation from an AnimationController as repaint: and for RepaintBoundary placement.
  • See ui-states-and-feedback for the state a moment is feedback about — loading/empty/error rendering, the snackbar/banner/dialog ladder, Undo, and SemanticsService.announce.
  • See accessibility-as-code for the color-alone rule this skill's motion-alone rule mirrors, and for reading platform accessibility flags.
  • See flutter-performance for disposal, boundary budgeting, and profile-mode measurement of anything that feels heavy.
  • See i18n-rtl-l10n for directional geometry under RTL.
  • See design-review-workflow for the end-of-build pass where every declared moment is verified on video with reduced motion on and off.

References

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Motion And Haptics」では何ができますか?

フレームワークの既定動作に任せず、意図して設計したインタラクションフィードバックを実装します。状態を確定する操作には同じフレーム内で必ず応答し、動きは状態を装飾するものであって状態そのものにはしません(アニメーションをオフにしても最終状態は同じです)。各演出のきっかけ、時間の役割、触覚フィードバックのタイミング、設計時に定めた動きの軽減設定への代替動作を含むカタログを用意します。HapticThemeをイベントから強度へのマップとして使い、確定したフレームで触覚フィードバックを1回だけ発生させます(アニメーションの各フレームやまとめられた入力ごとには発生させず、エラーにheavyImpactを使いません)。一元管理された切り替え機能を設けます。すべてのアニメーションは途中で操作可能にし、タップすると最終状態に遷移するようにします。演出は再生1回限りで範囲を限定し、ループも入力の妨げもないようにします。繰り返すアニメーションには、画面を離れたとき、バックグラウンドに移行したとき、動きを軽減する設定のときなど、明確な停止条件を設けます。動きの軽減設定でも触覚とサウンドが機能するよう、複数のチャネルでフィードバックを提供します。アニメーション、成功/エラー状態、触覚フィードバック、演出、画面遷移の追加や調整に使用してください。

TypingMindでMotion And Hapticsを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Motion And Hapticsはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにMotion And Hapticsをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/zakariaf/Flutter-Skills/tree/main/skills/motion-and-hapticsを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Motion And Hapticsを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Motion And Hapticsで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもMotion And Hapticsを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Motion And Haptics」は無料ですか?

はい。zakariafがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇