Skip to content
bobmatnyc avatar

Phoenix Api Channels

Phoenix guide for JSON APIs, Channels, and Presence on the BEAM, covering contexts, plugs, auth, and PubSub.

CCM score
54 of 100
skills.sh installs
365
GitHub stars
79
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers versioned REST/JSON controllers, Ecto contexts, Channels with PubSub fan-out, and Presence tracking for users and devices
  • Includes setup via mix phx.new my_api --no-html --no-live, routing pipelines, FallbackController error translation, and Channel and context test patterns
  • Enforces that authorization happens in UserSocket.connect/3 before any topic is joined, and that controllers delegate data logic to contexts
  • Designed for Elixir teams building JSON APIs with real-time features such as chat, notifications, or collaborative editing

Install

$ npx -y skills add bobmatnyc/claude-mpm-skills --skill phoenix-api-channels -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Phoenix APIs, Channels, and Presence (Elixir/BEAM)

Phoenix excels at REST/JSON APIs and WebSocket Channels with minimal boilerplate, leveraging the BEAM for fault tolerance, lightweight processes, and supervised PubSub/Presence.

Core pillars

  • Controllers for JSON APIs with plugs, pipelines, and versioning.
  • Contexts own data (Ecto schemas + queries) and expose a narrow API to controllers/channels.
  • Channels + PubSub for fan-out real-time updates; Presence for tracking users/devices.
  • Auth via plugs (session/cookie for browser, token/Bearer for APIs), with signed params.

Project Setup

mix phx.new my_api --no-html --no-live
cd my_api
mix deps.get
mix ecto.create
mix phx.server

Key files:

  • lib/my_api_web/endpoint.ex — plugs, sockets, instrumentation
  • lib/my_api_web/router.ex — pipelines, scopes, versioning, sockets
  • lib/my_api_web/controllers/* — REST/JSON controllers
  • lib/my_api/* — contexts + Ecto schemas (ownership of data logic)
  • lib/my_api_web/channels/* — Channel modules

Routing and Pipelines

Separate browser vs API pipelines; version APIs with scopes.

defmodule MyApiWeb.Router do
  use MyApiWeb, :router

Details

Repository
github.com/bobmatnyc/claude-mpm-skills
Category
Backend & APIs
First seen
Jun 3, 2026

Questions

What is the phoenix-api-channels skill used for?

phoenix-api-channels covers Phoenix controllers, JSON APIs, Channels, and Presence on the BEAM. It shows how to structure controllers with plugs and versioned routes, keep data logic in Ecto contexts, and add WebSocket Channels with PubSub-backed broadcasts and Presence tracking.

How do I install the phoenix-api-channels skill?

Run npx -y skills add bobmatnyc/claude-mpm-skills --skill phoenix-api-channels -y in a project. Once installed, phoenix-api-channels lets the agent build Phoenix JSON APIs and real-time Channel features that follow its patterns.

Where does phoenix-api-channels sit in the Backend & APIs category?

phoenix-api-channels is listed in the Backend & APIs category on Claude Marketplaces. Its neighbors there include entra-app-registration, neon, firebase-basics, firebase-auth-basics and workers-best-practices, and phoenix-api-channels is the one focused on Elixir Phoenix APIs and Channels.

Does phoenix-api-channels cover authentication and testing for Phoenix APIs?

phoenix-api-channels covers authentication patterns such as bearer token plugs, signed join params with Phoenix.Token, and authorizing in UserSocket.connect/3. It also includes controller and channel test examples using ConnCase and ChannelCase.

More from bobmatnyc/claude-mpm-skills

All 154

Similar to Phoenix Api Channels

More Backend & APIs