Unordered Eventsのロゴ

Unordered Events

コミュニティ
randommonicle
unordered-events

Webhooks, queues and retries do not arrive in the order the work happened, and a guard written for the state a handler expects lets the neighbouring states through. Write each handler's state machine down, guard every status write with the set of states it may move FROM, test every (event, current state) pair including each event arriving before the one it logically follows, and answer an event whose prerequisite has not landed retryably instead of acknowledging it. Triggers when writing or reviewing a webhook handler (Stripe, payment, email, calendar), a queue consumer, an event-sourced status column, or any handler that moves a row's status on an external signal. Does not fire on in-process calls made in a known order, or on the send-then-record half of an outbound call (outbound-side-effect-idempotency owns that).

概要

公開者randommonicle
リポジトリclaude-skills
スキル名unordered-events
スター
27
フォーク
3
同梱ファイル
指示のみ
ライセンスApache-2.0
リンク
  • Markdown形式の指示

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

  • どのLLMでも利用可能

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

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

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

インストール

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

1

TypingMindにインストール

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

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

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

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

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

TypingMindで使用

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

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

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

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

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

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

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

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

スキルの指示

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

Unordered events

A provider that delivers at least once and in no promised order (Stripe says so of its webhooks) will, given enough traffic, deliver the refund before the payment, the finalised invoice after the paid one, and the dispute before the deposit's own paid event. Each handler then reads a row in a state its author never pictured, and either writes over a later state or acknowledges an event it could not apply, which the provider never sends again.

The rules

  1. Write the state machine down beside the handler: the row's states, which event moves which state to which. A handler whose machine is not written cannot be reviewed.
  2. Guard the FROM set, not the expected state. A status write is a compare-and-set naming every state it may move from (... where status in ('draft', 'open')), never only the one the author expected; a neighbouring state slipping through is the common defect.
  3. Test the pairs. For each event, a test per current state, including the states a later event would have produced and the state before the event's own prerequisite. A test of the happy order alone proves nothing about the unordered one.
  4. A missing prerequisite is retryable. When an event names something that has not landed yet (the payment it disputes, the invoice it pays), answer the provider with a retryable status (5xx) so it re-delivers, or look the link up from the provider's own record before acknowledging. A 200 for an event that changed nothing is final: the provider will not try again.
  5. Stamp from the event, not the clock. A time written from a re-delivered event takes the event's own creation time, so a late delivery lands in the period the money moved.
  6. One writer per field, or an ordering rule. A field that two event types write needs a rule for which wins (a later state never moved back by an earlier event).

Provenance

ICC L-059 (a compare-and-set on one row does not serialise a write to another), L-062 (Stripe does not order webhook deliveries), L-065 (a guard for one status let the neighbouring status through), L-082 (an event guarded to move drafts only was overtaken by an event for a later state), and GPT's review R11 of 22 October 2026 (a card dispute delivered before its deposit's paid event was acknowledged without the photo hold it should have placed). docs/SKILL_PROPOSALS_2026-10-22.md, Tier 1 item 2.

よくある質問

AIスキル「Unordered Events」では何ができますか?

Webhooks, queues and retries do not arrive in the order the work happened, and a guard written for the state a handler expects lets the neighbouring states through. Write each handler's state machine down, guard every status write with the set of states it may move FROM, test every (event, current state) pair including each event arriving before the one it logically follows, and answer an event whose prerequisite has not landed retryably instead of acknowledging it. Triggers when writing or reviewing a webhook handler (Stripe, payment, email, calendar), a queue consumer, an event-sourced st...

TypingMindでUnordered Eventsを使うメリットは何ですか?

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

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

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

Unordered Eventsを使えるAIモデルはどれですか?

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

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

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

AIスキル「Unordered Events」は無料ですか?

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

AIスキルとは何ですか?

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

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

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

すべて見る

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

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