Absinthe Subscriptions
TheBushidoCollective/han
A skill your agent uses when implementing real-time GraphQL subscriptions with Absinthe.
A skill your agent uses when adding real-time updates via Phoenix.PubSub — subscribe/broadcast topology, topic naming, handleinfo message handling.
$ npx skills add j-morgan6/elixir-phoenix-guide --skill phoenix-pubsub-patterns -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install j-morgan6/elixir-phoenix-guide phoenix-pubsub-patterns --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/j-morgan6/elixir-phoenix-guide.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/phoenix-pubsub-patterns .claude/skills/phoenix-pubsub-patterns && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "phoenix-pubsub-patterns" agent skill from https://github.com/j-morgan6/elixir-phoenix-guide/tree/main/skills/phoenix-pubsub-patterns into .claude/skills/phoenix-pubsub-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "phoenix-pubsub-patterns", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/j-morgan6/elixir-phoenix-guide/tree/main/skills/phoenix-pubsub-patternsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add j-morgan6/elixir-phoenix-guide --skill phoenix-pubsub-patterns -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install j-morgan6/elixir-phoenix-guide phoenix-pubsub-patterns --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/j-morgan6/elixir-phoenix-guide.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/phoenix-pubsub-patterns .agents/skills/phoenix-pubsub-patterns && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "phoenix-pubsub-patterns" agent skill from https://github.com/j-morgan6/elixir-phoenix-guide/tree/main/skills/phoenix-pubsub-patterns into .agents/skills/phoenix-pubsub-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "phoenix-pubsub-patterns", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add j-morgan6/elixir-phoenix-guide --skill phoenix-pubsub-patterns -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install j-morgan6/elixir-phoenix-guide phoenix-pubsub-patterns --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/j-morgan6/elixir-phoenix-guide.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/phoenix-pubsub-patterns .cursor/skills/phoenix-pubsub-patterns && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "phoenix-pubsub-patterns" agent skill from https://github.com/j-morgan6/elixir-phoenix-guide/tree/main/skills/phoenix-pubsub-patterns into .cursor/skills/phoenix-pubsub-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "phoenix-pubsub-patterns", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/j-morgan6/elixir-phoenix-guide.git --path skills/phoenix-pubsub-patterns--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add j-morgan6/elixir-phoenix-guide --skill phoenix-pubsub-patterns -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install j-morgan6/elixir-phoenix-guide phoenix-pubsub-patterns --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/j-morgan6/elixir-phoenix-guide.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/phoenix-pubsub-patterns .gemini/skills/phoenix-pubsub-patterns && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "phoenix-pubsub-patterns" agent skill from https://github.com/j-morgan6/elixir-phoenix-guide/tree/main/skills/phoenix-pubsub-patterns into .gemini/skills/phoenix-pubsub-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "phoenix-pubsub-patterns", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install j-morgan6/elixir-phoenix-guide phoenix-pubsub-patternsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add j-morgan6/elixir-phoenix-guide --skill phoenix-pubsub-patterns -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/j-morgan6/elixir-phoenix-guide.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/phoenix-pubsub-patterns .github/skills/phoenix-pubsub-patterns && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "phoenix-pubsub-patterns" agent skill from https://github.com/j-morgan6/elixir-phoenix-guide/tree/main/skills/phoenix-pubsub-patterns into .github/skills/phoenix-pubsub-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "phoenix-pubsub-patterns", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add j-morgan6/elixir-phoenix-guide --skill phoenix-pubsub-patterns -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install j-morgan6/elixir-phoenix-guide phoenix-pubsub-patterns --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/j-morgan6/elixir-phoenix-guide.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/phoenix-pubsub-patterns .opencode/skills/phoenix-pubsub-patterns && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "phoenix-pubsub-patterns" agent skill from https://github.com/j-morgan6/elixir-phoenix-guide/tree/main/skills/phoenix-pubsub-patterns into .opencode/skills/phoenix-pubsub-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "phoenix-pubsub-patterns", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
phoenix-pubsub-patternsA skill your agent uses when adding real-time updates via Phoenix.PubSub — subscribe/broadcast topology, topic naming, handleinfo message handling.
Phoenix Pubsub Patterns is an agent skill from j-morgan6/elixir-phoenix-guide. Use when adding real-time updates via Phoenix.PubSub — subscribe/broadcast topology, topic naming, handleinfo message handling.
Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Backend & APIs, covering Event-driven systems and LLM observability. The licence is MIT.
6 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit cdfddac. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are elixir).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Phoenix Pubsub Patterns loads about 1.8k tokens when it runs. Until then it costs about 38 tokens; SKILL.md has 273 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from j-morgan6/elixir-phoenix-guide at commit cdfddac, republished under its MIT licence (© j-morgan6). 273 words, ~1,805 tokens.
.claude/skills/phoenix-pubsub-patterns/SKILL.md (or your agent's skills folder).if connected?(socket) — the disconnected render runs in a separate short-lived process; subscribing there is wasted work, not a duplicate (LiveView mounts twice: once static, once connected)"resource:id" for specific resources, "resource:action" for collection-wide eventshandle_info/2 — never in handle_event/3; PubSub messages are process messages, not client eventsupdate/3 when the new value derives from the old — update(socket, :posts, &[post | &1]) reads better than reaching into socket.assigns manually. Both are equivalent; this is style, not safety.PubSub.broadcast directly; test the full cycleSubscribe in mount/3 only when connected. The static render doesn't need real-time updates.
defmodule MyAppWeb.PostLive.Index do
use MyAppWeb, :live_view
@impl true
def mount(_params, _session, socket) do
if connected?(socket) do
Phoenix.PubSub.subscribe(MyApp.PubSub, "posts")
end
{:ok, assign(socket, :posts, list_posts())}
end
@impl true
def handle_info({:post_created, post}, socket) do
{:noreply, update(socket, :posts, fn posts -> [post | posts] end)}
end
@impl true
def handle_info({:post_updated, post}, socket) do
{:noreply,
update(socket, :posts, fn posts ->
Enum.map(posts, fn
p when p.id == post.id -> post
p -> p
end)
end)}
end
@impl true
def handle_info({:post_deleted, post}, socket) do
{:noreply,
update(socket, :posts, fn posts ->
Enum.reject(posts, &(&1.id == post.id))
end)}
end
endBroadcast after successful database operations. The context owns the business logic — LiveViews are just subscribers.
defmodule MyApp.Blog do
alias MyApp.Blog.Post
alias MyApp.Repo
def create_post(attrs) do
%Post{}
|> Post.changeset(attrs)
|> Repo.insert()
|> broadcast(:post_created)
end
def update_post(%Post{} = post, attrs) do
post
|> Post.changeset(attrs)
|> Repo.update()
|> broadcast(:post_updated)
end
def delete_post(%Post{} = post) do
post
|> Repo.delete()
|> broadcast(:post_deleted)
end
# Only broadcast on success
defp broadcast({:ok, post}, event) do
Phoenix.PubSub.broadcast(MyApp.PubSub, "posts", {event, post})
{:ok, post}
end
defp broadcast({:error, changeset}, _event) do
{:error, changeset}
end
endUse a consistent naming scheme so subscribers know what to expect.
# Collection-wide — all posts
topic = "posts"
# Events: {:post_created, post}, {:post_updated, post}, {:post_deleted, post}
# Specific resource — one post
topic = "posts:#{post.id}"
# Events: {:post_updated, post}, {:post_deleted, post}, {:comment_added, comment}
# User-scoped — all activity for a user
topic = "users:#{user.id}"
# Events: {:notification, notification}, {:message_received, message}@impl true
def mount(%{"id" => id}, _session, socket) do
post = Blog.get_post!(id)
if connected?(socket) do
Phoenix.PubSub.subscribe(MyApp.PubSub, "posts:#{post.id}")
end
{:ok, assign(socket, :post, post)}
endWhen events should only reach specific users or resources:
# In context — broadcast to resource-specific topic
defp broadcast({:ok, comment}, :comment_added) do
Phoenix.PubSub.broadcast(
MyApp.PubSub,
"posts:#{comment.post_id}",
{:comment_added, comment}
)
{:ok, comment}
end
# In context — broadcast to user-specific topic
defp broadcast({:ok, notification}, :new_notification) do
Phoenix.PubSub.broadcast(
MyApp.PubSub,
"users:#{notification.user_id}",
{:new_notification, notification}
)
{:ok, notification}
endupdate/3Use update/3 when the new value derives from the old one — it reads better
than reaching into socket.assigns manually. Functionally, assign/3 and
update/3 produce identical results here; this is a style preference, not a
correctness rule.
# Equivalent — reaches into socket.assigns directly
def handle_info({:post_created, post}, socket) do
{:noreply, assign(socket, :posts, [post | socket.assigns.posts])}
end
# Preferred — update/3 reads better when deriving from the old value
def handle_info({:post_created, post}, socket) do
{:noreply, update(socket, :posts, fn posts -> [post | posts] end)}
end
# Good — update a specific item in the list
def handle_info({:post_updated, updated_post}, socket) do
{:noreply,
update(socket, :posts, fn posts ->
Enum.map(posts, fn
post when post.id == updated_post.id -> updated_post
post -> post
end)
end)}
end
# Good — remove an item from the list
def handle_info({:post_deleted, deleted_post}, socket) do
{:noreply,
update(socket, :posts, fn posts ->
Enum.reject(posts, &(&1.id == deleted_post.id))
end)}
endTest the full cycle: call a context function, assert the LiveView updates. Don't test PubSub.broadcast in isolation.
describe "real-time updates" do
test "new post appears in list", %{conn: conn} do
user = user_fixture()
conn = log_in_user(conn, user)
{:ok, lv, _html} = live(conn, ~p"/posts")
# Create a post through the context (triggers broadcast)
{:ok, post} = Blog.create_post(%{title: "New Post", user_id: user.id})
# Assert the LiveView received and rendered the update
assert render(lv) =~ "New Post"
end
test "updated post reflects changes", %{conn: conn} do
user = user_fixture()
post = post_fixture(user_id: user.id, title: "Original")
conn = log_in_user(conn, user)
{:ok, lv, _html} = live(conn, ~p"/posts")
assert render(lv) =~ "Original"
{:ok, _post} = Blog.update_post(post, %{title: "Updated"})
assert render(lv) =~ "Updated"
refute render(lv) =~ "Original"
end
test "deleted post disappears from list", %{conn: conn} do
user = user_fixture()
post = post_fixture(user_id: user.id, title: "To Delete")
conn = log_in_user(conn, user)
{:ok, lv, _html} = live(conn, ~p"/posts")
assert render(lv) =~ "To Delete"
{:ok, _post} = Blog.delete_post(post)
refute render(lv) =~ "To Delete"
end
endSee phoenix-liveview-essentials skill for LiveView lifecycle patterns.
See testing-essentials skill for comprehensive testing patterns.
© j-morgan6, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/phoenix-pubsub-patterns of j-morgan6/elixir-phoenix-guide.
Open the folder on GitHubat commit cdfddac
Phoenix Pubsub Patterns next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Phoenix Pubsub Patterns this skillj-morgan6/elixir-phoenix-guide | 166 | — | ~1.8k | Automated safety check: Pass | MIT | |
| Absinthe SubscriptionsTheBushidoCollective/han | 198 | — | ~875 | Automated safety check: Pass | Custom licence | |
| Phoenixericrisco/rsc-harness | 167 | — | ~2.9k | Automated safety check: Notes | MIT | |
| Phoenix Contextsoliver-kriska/claude-elixir-phoenix | 565 | — | ~841 | Automated safety check: Pass | MIT | |
| Databuddydatabuddy-analytics/Databuddy | 1.2k | — | ~2.1k | Automated safety check: Pass | AGPL-3.0 | |
| Phoenix GraphqlArize-ai/phoenix | 12k | — | ~2.2k | Automated safety check: Pass | Custom licence |
TheBushidoCollective/han
A skill your agent uses when implementing real-time GraphQL subscriptions with Absinthe.
ericrisco/rsc-harness
A skill your agent uses when building an Elixir web app with Phoenix — contexts, Ecto schemas, changesets and migrations, LiveView, channels and PubSub, the generators, and the boundary between…
oliver-kriska/claude-elixir-phoenix
Phoenix context design — creating/splitting contexts, Scope (1.8+), Ecto.Multi, PubSub, routers, plugs, controllers.
databuddy-analytics/Databuddy
Integrate Databuddy analytics using the SDK, REST API, or MCP.
Arize-ai/phoenix
Write efficient GraphQL queries against the Phoenix API. An agent skill from Arize-ai/phoenix.
Arize-ai/phoenix
REST API development for Phoenix. An agent skill from Arize-ai/phoenix.
j-morgan6/elixir-phoenix-guide
A skill your agent uses when refactoring for duplication, complexity, or dead code — includes the plugin's on-demand analysis scripts.
j-morgan6/elixir-phoenix-guide
A skill your agent uses when preparing releases or deployment config — runtime.exs vs compile-time config, release migrations, PHXHOST/PHXSERVER, assets, health checks.
j-morgan6/elixir-phoenix-guide
A skill your agent uses when a resource needs multiple changesets (registration vs update), conditional validation, field transforms, or uniqueness validation — changeset composition.
j-morgan6/elixir-phoenix-guide
A skill your agent uses when defining schemas, writing queries, or creating migrations — schema design, Repo usage, indexes, query composition.
j-morgan6/elixir-phoenix-guide
A skill your agent uses when a form or operation manages parent and child records together — castassoc/castembed, onreplace, Ecto.Multi across tables, FK cascade design.
j-morgan6/elixir-phoenix-guide
A skill your agent uses when writing or refactoring core Elixir — pattern matching, case/cond/with, pipes, {:ok, }/{:error, } contracts.
Categories
A skill your agent uses when adding real-time updates via Phoenix.PubSub — subscribe/broadcast topology, topic naming, handleinfo message handling. Phoenix Pubsub Patterns is an agent skill from j-morgan6/elixir-phoenix-guide.PubSub — subscribe/broadcast topology, topic naming, handleinfo message handling.
Phoenix Pubsub Patterns fits situations like: adding real-time updates via Phoenix.PubSub — subscribe/broadcast topology; handleinfo message handling.
Run `npx skills add j-morgan6/elixir-phoenix-guide --skill phoenix-pubsub-patterns -a claude-code`. Or copy the skill folder (skills/phoenix-pubsub-patterns in j-morgan6/elixir-phoenix-guide) into .claude/skills/phoenix-pubsub-patterns in your project. Claude Code loads it when a task matches its description.
Run `npx skills add j-morgan6/elixir-phoenix-guide --skill phoenix-pubsub-patterns -a codex`. Or copy the skill folder (skills/phoenix-pubsub-patterns in j-morgan6/elixir-phoenix-guide) into .agents/skills/phoenix-pubsub-patterns in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add j-morgan6/elixir-phoenix-guide --skill phoenix-pubsub-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/phoenix-pubsub-patterns, .gemini/skills/phoenix-pubsub-patterns, .github/skills/phoenix-pubsub-patterns and .opencode/skills/phoenix-pubsub-patterns in your project.
SKILL.md names no scripts, command-line tools or credentials: Phoenix Pubsub Patterns is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Phoenix Pubsub Patterns is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.8k tokens (SKILL.md is roughly 7.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Phoenix Pubsub Patterns: Absinthe Subscriptions (TheBushidoCollective/han, 198 stars), Phoenix (ericrisco/rsc-harness, 167 stars), Phoenix Contexts (oliver-kriska/claude-elixir-phoenix, 565 stars) and Databuddy (databuddy-analytics/Databuddy, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
j-morgan6 (a GitHub user) maintains it in j-morgan6/elixir-phoenix-guide, which has 166 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on July 6, 2026.
Source: j-morgan6/elixir-phoenix-guide on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.