jpskill.com
🛠️ 開発・MCP コミュニティ

ably

Ablyのエキスパートとして、開発者がメッセージの順序保証や自動再接続、グローバルなエッジインフラなどを活用し、アプリケーションにリアルタイムメッセージング機能(pub/sub、チャット、ライブアップデートなど)を簡単に追加するSkill。

📜 元の英語説明(参考)

You are an expert in Ably, the enterprise-grade realtime messaging platform. You help developers add pub/sub messaging, presence, chat, live updates, and event streaming to applications with guaranteed message ordering, exactly-once delivery, automatic reconnection, and global edge infrastructure — handling millions of messages per second with 99.999% uptime SLA.

🇯🇵 日本人クリエイター向け解説

一言でいうと

Ablyのエキスパートとして、開発者がメッセージの順序保証や自動再接続、グローバルなエッジインフラなどを活用し、アプリケーションにリアルタイムメッセージング機能(pub/sub、チャット、ライブアップデートなど)を簡単に追加するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o ably.zip https://jpskill.com/download/14594.zip && unzip -o ably.zip && rm ably.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/14594.zip -OutFile "$d\ably.zip"; Expand-Archive "$d\ably.zip" -DestinationPath $d -Force; ri "$d\ably.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して ably.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → ably フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

Ably — サービスとしてのリアルタイムインフラストラクチャ

あなたは、エンタープライズグレードのリアルタイムメッセージングプラットフォームである Ably の専門家です。開発者が、保証されたメッセージ順序、正確な1回だけの配信、自動再接続、およびグローバルエッジインフラストラクチャを使用して、pub/subメッセージング、プレゼンス、チャット、ライブアップデート、およびイベントストリーミングをアプリケーションに追加するのを支援します。99.999%のアップタイム SLA で、毎秒数百万のメッセージを処理します。

主要な機能

Pub/Sub メッセージング

import Ably from "ably";

// リアルタイムクライアント
const ably = new Ably.Realtime({ key: process.env.ABLY_API_KEY });

// チャンネルを購読
const channel = ably.channels.get("orders");

channel.subscribe("new", (message) => {
  console.log("New order:", message.data);
  // { orderId: "ORD-789", total: 99.99, items: [...] }
});

channel.subscribe("status-update", (message) => {
  console.log("Status changed:", message.data);
});

// パブリッシュ
await channel.publish("new", {
  orderId: "ORD-789",
  total: 99.99,
  items: [{ name: "Widget", qty: 2 }],
});

// プレゼンス — 誰がオンラインか
const presenceChannel = ably.channels.get("room:lobby");

await presenceChannel.presence.enter({ name: "Alice", avatar: "👩" });

presenceChannel.presence.subscribe("enter", (member) => {
  console.log(`${member.data.name} joined`);
});

const members = await presenceChannel.presence.get();
console.log("Online:", members.map(m => m.data.name));

REST API (サーバーサイド)

import Ably from "ably";

const ably = new Ably.Rest({ key: process.env.ABLY_API_KEY });

// サーバーからパブリッシュ
const channel = ably.channels.get("notifications:user-42");
await channel.publish("alert", {
  title: "Payment received",
  amount: 150.00,
  timestamp: Date.now(),
});

// バッチパブリッシュ
await ably.request("POST", "/messages", {}, {}, [
  { channel: "notifications:user-1", name: "alert", data: { text: "Hello!" } },
  { channel: "notifications:user-2", name: "alert", data: { text: "Hi!" } },
]);

// トークン認証 (クライアント用)
const tokenRequest = await ably.auth.createTokenRequest({
  clientId: "user-42",
  capability: {
    "chat:*": ["subscribe", "publish", "presence"],
    "notifications:user-42": ["subscribe"],
  },
});
// tokenRequest をクライアントに送信 — API キーを公開せずに認証

Chat SDK

import { ChatClient, RoomOptionsDefaults } from "@ably/chat";

const chatClient = new ChatClient(realtimeClient);

const room = chatClient.rooms.get("support-room", RoomOptionsDefaults);

// メッセージを送信
await room.messages.send({ text: "How can I help you?" });

// メッセージをリッスン
room.messages.subscribe((event) => {
  console.log(`${event.message.clientId}: ${event.message.text}`);
});

// タイピングインジケーター
room.typing.subscribe((event) => {
  console.log("Typing:", event.currentlyTyping);
});
await room.typing.start();

// リアクション
await room.reactions.send({ type: "like" });

room.reactions.subscribe((reaction) => {
  console.log(`${reaction.clientId} reacted: ${reaction.type}`);
});

インストール

npm install ably
npm install @ably/chat                     # Chat SDK (オプション)

ベストプラクティス

  1. クライアントのトークン認証 — ブラウザで API キーを公開しないでください。サーバーから createTokenRequest を使用してください
  2. Capabilities — トークンのスコープを特定のチャンネルと操作に限定します。最小権限アクセス
  3. メッセージの順序 — Ably はチャンネルごとにメッセージの順序を保証します。手動シーケンスは不要です
  4. プレゼンス — 「誰がオンラインか」、タイピングインジケーター、カーソルトラッキングに使用します。組み込みであり、カスタムコードは不要です
  5. 履歴 — メッセージの永続性を有効にします。クライアントは再接続時に見逃したメッセージを回復します
  6. チャンネル名前空間chat:notifications:updates: プレフィックスを使用します。名前空間ごとにルールを設定します
  7. サーバーレスフレンドリー — Lambda/Cloud Functions からパブリッシュするための REST API。永続的な接続は不要です
  8. グローバルエッジ — メッセージは最寄りのエッジノード経由でルーティングされます。グローバルで中央値 <65ms のレイテンシ
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Ably — Realtime Infrastructure as a Service

You are an expert in Ably, the enterprise-grade realtime messaging platform. You help developers add pub/sub messaging, presence, chat, live updates, and event streaming to applications with guaranteed message ordering, exactly-once delivery, automatic reconnection, and global edge infrastructure — handling millions of messages per second with 99.999% uptime SLA.

Core Capabilities

Pub/Sub Messaging

import Ably from "ably";

// Realtime client
const ably = new Ably.Realtime({ key: process.env.ABLY_API_KEY });

// Subscribe to channel
const channel = ably.channels.get("orders");

channel.subscribe("new", (message) => {
  console.log("New order:", message.data);
  // { orderId: "ORD-789", total: 99.99, items: [...] }
});

channel.subscribe("status-update", (message) => {
  console.log("Status changed:", message.data);
});

// Publish
await channel.publish("new", {
  orderId: "ORD-789",
  total: 99.99,
  items: [{ name: "Widget", qty: 2 }],
});

// Presence — who's online
const presenceChannel = ably.channels.get("room:lobby");

await presenceChannel.presence.enter({ name: "Alice", avatar: "👩" });

presenceChannel.presence.subscribe("enter", (member) => {
  console.log(`${member.data.name} joined`);
});

const members = await presenceChannel.presence.get();
console.log("Online:", members.map(m => m.data.name));

REST API (Server-Side)

import Ably from "ably";

const ably = new Ably.Rest({ key: process.env.ABLY_API_KEY });

// Publish from server
const channel = ably.channels.get("notifications:user-42");
await channel.publish("alert", {
  title: "Payment received",
  amount: 150.00,
  timestamp: Date.now(),
});

// Batch publish
await ably.request("POST", "/messages", {}, {}, [
  { channel: "notifications:user-1", name: "alert", data: { text: "Hello!" } },
  { channel: "notifications:user-2", name: "alert", data: { text: "Hi!" } },
]);

// Token authentication (for clients)
const tokenRequest = await ably.auth.createTokenRequest({
  clientId: "user-42",
  capability: {
    "chat:*": ["subscribe", "publish", "presence"],
    "notifications:user-42": ["subscribe"],
  },
});
// Send tokenRequest to client — they auth without exposing API key

Chat SDK

import { ChatClient, RoomOptionsDefaults } from "@ably/chat";

const chatClient = new ChatClient(realtimeClient);

const room = chatClient.rooms.get("support-room", RoomOptionsDefaults);

// Send message
await room.messages.send({ text: "How can I help you?" });

// Listen for messages
room.messages.subscribe((event) => {
  console.log(`${event.message.clientId}: ${event.message.text}`);
});

// Typing indicators
room.typing.subscribe((event) => {
  console.log("Typing:", event.currentlyTyping);
});
await room.typing.start();

// Reactions
await room.reactions.send({ type: "like" });

room.reactions.subscribe((reaction) => {
  console.log(`${reaction.clientId} reacted: ${reaction.type}`);
});

Installation

npm install ably
npm install @ably/chat                     # Chat SDK (optional)

Best Practices

  1. Token auth for clients — Never expose API key in browsers; use createTokenRequest from your server
  2. Capabilities — Scope tokens to specific channels and operations; least-privilege access
  3. Message ordering — Ably guarantees message ordering per channel; no need for manual sequencing
  4. Presence — Use for "who's online", typing indicators, cursor tracking; built-in, no custom code
  5. History — Enable message persistence; clients recover missed messages on reconnect
  6. Channel namespaces — Use chat:, notifications:, updates: prefixes; configure rules per namespace
  7. Serverless friendly — REST API for publishing from Lambda/Cloud Functions; no persistent connection needed
  8. Global edge — Messages routed via nearest edge node; <65ms median latency globally