Install any skill in seconds. Free to start, no credit card required.
Get Started Free →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.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 2% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 1% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 2% | 0% |
| case-22 | ✓→✓ | = Same ✓ | 61% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 43% | 0% |
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.
typescriptimport 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));
typescriptimport 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
typescriptimport { 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}`); });
bashnpm install ably npm install @ably/chat # Chat SDK (optional)
createTokenRequest from your serverchat:, notifications:, updates: prefixes; configure rules per namespaceOther measured skills in the registry, with their headline benchmark lift.