phoenix-api-channels

Build JSON APIs and real-time features with Phoenix Channels and Presence.

68|19|Updated Nov 21, 2025
One-click install
npx skills add https://github.com/bobmatnyc/claude-mpm-skills --skill phoenix-api-channels
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: phoenix-api-channels
Source: https://github.com/bobmatnyc/claude-mpm-skills/tree/main/toolchains/elixir/frameworks/phoenix-api-channels
Command: npx skills add https://github.com/bobmatnyc/claude-mpm-skills --skill phoenix-api-channels

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill streamlines the development of real-time, scalable web applications by providing a robust framework for building JSON APIs, WebSocket channels, and managing user presence within the Elixir/Phoenix ecosystem.

Core Features & Use Cases

  • JSON APIs: Build versioned RESTful APIs with controllers, contexts, and plugs for efficient data handling.
  • Real-time Communication: Implement live features like chat, notifications, and collaborative editing using Phoenix Channels and PubSub.
  • Presence Tracking: Monitor connected users and devices in real-time.
  • Use Case: Develop a real-time chat application where users can join rooms, send messages, and see who else is online, all powered by Phoenix Channels and Presence.

Quick Start

Use the phoenix-api-channels skill to set up a new Phoenix project for building JSON APIs and WebSocket channels.

Frequently Asked Questions about phoenix-api-channels

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build real-time chat and notifications using Phoenix Channels?

Build real-time chat and notifications in Phoenix Channels by establishing WebSocket connections, defining topic subscriptions, and broadcasting events through PubSub to connected clients. This Skill provides the framework to implement live features like chat rooms and collaborative editing on the Elixir BEAM.

What is Phoenix Presence and how does it track connected users?

Phoenix Presence tracks connected users and devices in real-time by broadcasting join and leave events via PubSub. It maintains a synchronized state of active participants, allowing applications to monitor who is online and handle connection drops across the BEAM.

How do I add authentication to a Phoenix JSON API?

Add authentication to a Phoenix JSON API by creating custom plugs that verify user credentials and assign the current user to the connection. This Skill outlines using plugs within controllers to secure API endpoints and manage data access through Ecto contexts.

Can I use Ecto contexts for data persistence with Phoenix Channels?

Yes, you can use Ecto contexts for data persistence alongside Phoenix Channels. This Skill handles data persistence by structuring contexts to manage database interactions, allowing real-time channel events to trigger data validation, creation, and updates efficiently.

What's the best way to version JSON APIs in a Phoenix application?

The best way to version JSON APIs in a Phoenix application is by structuring controllers and contexts into distinct versioned modules, routing requests to the appropriate logic. This approach isolates breaking changes and maintains backwards compatibility for API consumers.

Does Phoenix PubSub optimize for fault tolerance and concurrency?

Yes, Phoenix PubSub optimizes for fault tolerance and concurrency by leveraging the Elixir BEAM's lightweight processes to handle millions of simultaneous connections. It isolates failures and distributes message broadcasting across nodes without blocking operations.