phoenix-thinking

phoenix-thinking is a skill for Claude Code, Codex from georgeguimaraes/claude-code-elixir. It costs 108 tokens per session (1,309 once invoked), scanned A, original, Apache-2.0.

A set of guidelines for building Phoenix applications, especially pages and forms made with Phoenix LiveView. Phoenix is an Elixir web framework, and LiveView updates pages from the server without full browser reloads.

In plain words
What is it for?
Adding LiveView pages and forms, handling real-time updates, adding routes and API endpoints, and diagnosing lifecycle or event-handling issues.
Why use it?
It explains where to load data and how to handle LiveView lifecycle events, including why initial loading can happen twice.

Skill for Claude CodeCodex

Part of the elixir plugin — 6 skills, 1 hook shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/georgeguimaraes/claude-code-elixir/phoenix-thinking
Any agent
npx skills add georgeguimaraes/claude-code-elixir --skill phoenix-thinking
Clone the repo
git clone --depth 1 https://github.com/georgeguimaraes/claude-code-elixir

Made for: Claude Code, Codex.

Or install elixir, the plugin that ships this one along with the rest of its 6 skills, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for phoenix-thinking

README.md
[![agentmods](https://agentmods.dev/badge/skills/georgeguimaraes/claude-code-elixir/phoenix-thinking.svg)](https://agentmods.dev/skills/georgeguimaraes/claude-code-elixir/phoenix-thinking)
Your own site
<a href="https://agentmods.dev/skills/georgeguimaraes/claude-code-elixir/phoenix-thinking"><img src="https://agentmods.dev/badge/skills/georgeguimaraes/claude-code-elixir/phoenix-thinking.svg" alt="Measured on agentmods" height="20"></a>
Per session 108 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,309 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00108 $0.01309
Opus 5 $0.00054 $0.00655
Sonnet 5 $0.00022 $0.00262
Haiku 4.5 $0.00011 $0.00131

Measured 5d ago against content hash 3d36a80be00b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

phoenix-thinking scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/elixir/skills/phoenix-thinking/SKILL.md · 141 lines

How it starts

The opening of the file, as written. The whole thing — 141 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Phoenix Thinking

Mental shifts for Phoenix applications. These insights challenge typical web framework patterns.

Where to Load Data: mount vs handle_params

Default: load data in mount/3.

def mount(_params, _session, socket) do
  posts = Blog.list_posts(socket.assigns.current_scope)
  {:ok, assign(socket, posts: posts)}
end

Yes, mount runs twice on initial load (HTTP dead render + WebSocket connect). So does handle_params/3. That's the LiveView lifecycle, not a bug to route around. Moving queries from mount to handle_params does not dedupe them.

Use handle_params/3 for data that changes on live navigation (push_patch / <.link patch={...}>). mount does not re-run on patches, handle_params does.

def handle_params(%{"filter" => filter}, _uri, socket) do
  posts = Blog.list_posts(socket.assigns.current_scope, filter)
  {:noreply, assign(socket, posts: posts, filter: filter)}
end

When the initial double-load actually matters, the real tools are:

  • connected?(socket) to gate work to the connected render (loses SEO / no-JS rendering)
  • assign_async/3 to load after mount returns, in a separate process
  • assign_new/3 to reuse values already set on conn.assigns by upstream Plugs (e.g. :current_user), or shared from a parent LiveView. It does not dedupe arbitrary work across the dead/connected boundary: the function still runs on connected mount.
def mount(_params, _session, socket) do
  posts = if connected?(socket), do: Blog.list_posts(socket.assigns.current_scope), else: []
  {:ok, assign(socket, posts: posts)}
end

Scopes: Security-First Pattern (Phoenix 1.8+)

Scopes address OWASP #1 vulnerability: Broken Access Control. Authorization context is threaded automatically—no more forgetting to scope queries.

def list_posts(%Scope{user: user}) do
  Post |> where(user_id: ^user.id) |> Repo.all()
end

PubSub Topics Must Be Scoped

def subscribe(%Scope{organization: org}) do
  Phoenix.PubSub.subscribe(@pubsub, "posts:org:#{org.id}")
end

Read the full file on GitHub · 141 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 141 lines · 108 tokens per session scan A 3d36a80be00b

Subscribe to this mod's changes

phoenix-thinking is a skill published in the GitHub repository georgeguimaraes/claude-code-elixir (168 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 108 tokens to every session and 1,309 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

elixir

Use when writing or refactoring Elixir/OTP on the BEAM — GenServers, supervision trees and restart strategies, pattern matching, mix projects and releases — or when processes misbehave (restart loops, mailbox growth, call timeouts). NOT a Phoenix web app, LiveView, Ecto or channels (that is phoenix).

ericrisco/rsc-harness · 72 tokens

pixir-delegate

Use Pixir as a headless subagent runtime from Claude Code or any harness with skill ! preprocessing (Codex roots and other no-hydration hosts use pixir-delegate-codex instead) — one-shot workers (pixir --json), parallel fan-out to N children (pixir delegate --spec), resumable steering (pixir resume), evidence…

Ranvier-Technologies/pixir · 126 tokens

pixir-delegate-codex

Use when a Codex CLI/Desktop root should fan out subagents, delegate to Pixir workers, run parallel workers, or manage a resident delegation daemon via Pixir Delegate; covers Codex preflight, AGENTS.md, approvals/sandbox, dry-run, daemon start/status/attach/cancel, closure evidence, and audited single-run execution…

Ranvier-Technologies/pixir · 89 tokens

pixir-diagnostics

Diagnose Pixir and T3 Code Pixir incidents from local canonical evidence. Use when a Pixir run, ACP/T3 thread, subagent/workflow, provider replay, or daily-driver dogfood session appears stuck, inconsistent, missing tool output, or hard to classify.

Ranvier-Technologies/pixir · 61 tokens

phoenix

Use when building an Elixir web app with Phoenix — contexts, Ecto schemas, changesets and migrations, LiveView, channels and PubSub, the generators, and the boundary between domain logic and the web layer. Covers the classic LiveView over-rendering and Ecto N+1 traps. NOT pure OTP work with no web or Ecto layer …

ericrisco/rsc-harness · 89 tokens

readonly-review

Run a no-network read-only review practice with two explorer steps and one synthesis step.

Ranvier-Technologies/pixir · 20 tokens