phoenix

phoenix is a skill for Claude Code, Codex from ericrisco/rsc-harness. It costs 89 tokens per session (2,881 once invoked), scanned B, original, MIT.

A guide to building web applications with Phoenix, an Elixir web framework, using Ecto for data access and LiveView for interactive pages.

In plain words
What is it for?
Use it for Phoenix contexts, database schemas and migrations, LiveView pages, real-time channels, PubSub messaging, generators, and the boundary between application logic and the web layer.
Why use it?
It keeps business rules separate from web pages and helps avoid common problems such as repeated database queries and unnecessary page updates.

Skill for Claude CodeCodex

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/ericrisco/rsc-harness/phoenix
Any agent
npx skills add ericrisco/rsc-harness --skill phoenix
Clone the repo
git clone --depth 1 https://github.com/ericrisco/rsc-harness

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/ericrisco/rsc-harness/phoenix.svg)](https://agentmods.dev/skills/ericrisco/rsc-harness/phoenix)
Your own site
<a href="https://agentmods.dev/skills/ericrisco/rsc-harness/phoenix"><img src="https://agentmods.dev/badge/skills/ericrisco/rsc-harness/phoenix.svg" alt="Measured on agentmods" height="20"></a>
Per session 89 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,881 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00089 $0.02881
Opus 5 $0.00044 $0.01440
Sonnet 5 $0.00018 $0.00576
Haiku 4.5 $0.00009 $0.00288

Measured yesterday against content hash 283075ea53ea, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

phoenix scanned grade B with 1 finding 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 yesterday.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/verify.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

Depth on defining and threading scopes, magic-link auth, sudo mode and query-level enforcement lives in `references/auth-and-scopes.md`.
skills/phoenix/SKILL.md · 170 lines

How it starts

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

Phoenix

You are building a web application on the BEAM with Phoenix. There is one mental model that keeps a Phoenix app coherent as it grows: contexts are the public API of your domain; the web layer (controllers, LiveViews, channels) is a thin caller of contexts. A LiveView that reaches into Repo directly, or a controller stuffed with business rules, is the first crack. Push logic down into a context function and the web layer stays a presentation shell you can swap (HTML → JSON → LiveView) without rewriting the domain.

Target the current stack: Phoenix 1.8.7 (1.8.0 shipped 2025-08-05), LiveView 1.1 (1.1.x patch line; 1.0 shipped 2024-12-03), Ecto as the data layer, Erlang/OTP 25+. The headline 1.8 change is scopes: generators thread the current actor (user/org) through every context function and into the query, so secure-by-default data access is the norm, not something you bolt on later. New apps ship daisyUI + Tailwind theming, a single root layout, and an AGENTS.md for LLM-assisted work.

If the question has no web, Ecto or LiveView in it — it is a GenServer, a supervision tree, a mix release — that is the runtime, route to ../elixir/SKILL.md.

Where does this code go — generator decision

Pick the layer first, then the generator. Getting this wrong means rewriting the boundary later.

You are building Use Generator
Stateless page or JSON endpoint, request→response Controller + view mix phx.gen.html / phx.gen.json
Stateful interactive UI, server-rendered, live updates LiveView mix phx.gen.live
Raw bidirectional WebSocket / fan-out to many clients Channel + PubSub hand-wire, no generator
Domain logic with no UI yet (just the boundary) Context only mix phx.gen.context
Login, sessions, password reset, scopes Auth scaffold mix phx.gen.auth

Rule: generate the context first, then the web layer on top of it. phx.gen.live and phx.gen.html already produce a context — don't hand-write a controller that calls Repo and skip the context.

Read the full file on GitHub · 170 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. yesterday First seen · 170 lines · 89 tokens per session scan B 283075ea53ea

Subscribe to this mod's changes

phoenix is a skill published in the GitHub repository ericrisco/rsc-harness (64 stars, last pushed 2d ago), licensed MIT. It adds 89 tokens to every session and 2,881 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

tui-design

This skill should be used when designing terminal user interfaces, creating TUI layouts, choosing TUI color schemes, implementing keyboard navigation, building terminal dashboards, or working with any TUI framework. Activates on mentions of TUI design, terminal UI, Ratatui layout, Ink components, Textual widgets…

pass-agent/loomkin · 109 tokens

modern-css

Specialized knowledge for writing modern high-quality CSS. Trigger this skill when starting a new CSS project/file, when the user asks about new CSS features (e.g. Masonry, View Transitions, Container Queries, Scroll-driven animations), or requests refactoring of legacy styles to modern standards.

pass-agent/loomkin · 61 tokens

vault-meeting

Process a meeting transcript — extract decisions, action items, and key discussion points into structured vault entries.

pass-agent/loomkin · 23 tokens

elixir-expert

Expert in Elixir, Phoenix Framework, and OTP. Specializes in building concurrent, fault-tolerant, and real-time applications using the BEAM. Use when building Elixir applications, working with Phoenix, implementing GenServers, or designing distributed systems on the BEAM.

pass-agent/loomkin · 60 tokens

vault-groom

Audit and clean up knowledge base state — archive completed work, fix inconsistencies.

pass-agent/loomkin · 19 tokens

clack

Build and maintain interactive Node.js/Bun CLIs with Clack (@clack/prompts and @clack/core). Use when an AI agent needs to design prompt flows, implement cancellation-safe input handling, add spinners/log/note UX, apply Clack best practices, or generate runnable examples aligned with official Clack docs.

pass-agent/loomkin · 72 tokens