cc-changelog
CONTRIBUTOR TOOL - Track CC changelog, extract new versions since last check, analyze impact on plugin (breaking changes, opportunities, deprecations). Run…
Inspect LiveView socket assigns for memory bloat — missing temporary_assigns,
$ npx -y skills add oliver-kriska/claude-elixir-phoenix --skill lv-assigns --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/lv-assignsContext preview
The summary Claude sees to decide when to auto-load this skill.
Inspect LiveView socket assigns for memory bloat — missing temporary_assigns,
name: lv-assigns description: Inspect LiveView socket assigns for memory bloat — missing temporary_assigns, unused assigns, unbounded lists needing streams, memory estimates. Use when LiveView memory grows or you need to add temporary_assigns.
Analyze LiveView socket assigns for memory efficiency, clarity, and best practices.
1. **Use streams for lists > 100 items** - Never store large lists directly in assigns 2. **Use temporary_assigns for transient data** - Flash messages, temp errors, notifications 3. **Preload only needed fields** - Don't store full Ecto schemas when only needing subset 4. **Initialize all assigns in mount** - Never access assigns that might not exist 5. **NEVER modify assigns or code during audit** — this is a read-only diagnostic; report findings only
Use Grep to find all `assign(` and `assign_new(` calls in the target LiveView file.
Use Grep to find large data patterns: lists stored in assigns (`assign.*\[\]`, `assign.*Repo\.all`) and full schema storage (`assign.*Repo\.get`) in the target file.
| Pattern | Problem | Solution | |---------|---------|----------| | `assign(:items, Repo.all(...))` | Unbounded list | Use `stream/3` | | `assign(:user, Repo.get!(...))` | Full schema | Select only needed fields | | `assign(:file_data, binary)` | Large binary | Store reference, not data | | Nested preloads | Excessive data | Preload only what's rendered |
Should use `temporary_assigns`:
def mount(_params, _session, socket) do
{:ok, socket, temporary_assigns: [flash_message: nil]}
endSearch for assigns defined but never used in templates:
Use Grep to extract all assign names (`assign\(:(\w+)`) from the LiveView file, then use Grep to find all `@\w+` references in the corresponding `.heex` template. Compare to find unused assigns.
# BAD: @items might not exist
def render(assigns) do
~H"<%= for item <- @items do %>"
end
# GOOD: Initialize in mount
def mount(_params, _session, socket) do
{:ok, assign(socket, items: [])}
endFor each assign, estimate memory footprint:
| Data Type | Approx Size | Concern Level | |-----------|-------------|---------------| | Integer | 8 bytes | Low | | String (100 chars) | ~200 bytes | Low | | List of 100 maps | ~10-50 KB | Medium | | List of 1000 items | ~100-500 KB | High | | Binary (image) | Varies | Critical | | Full Ecto schema | ~1-5 KB each | Medium |
Run `lv-assigns path/to/live_view.ex` to generate an assigns inventory with memory estimates and optimization recommendations.
Docs: phxagents.dev -- install guides per runtime, the runtime compatibility matrix, all 26 Iron Laws, and a browsable skill and agent catalog. Claude Code is great.
Repo: oliver-kriska/claude-elixir-phoenix
CONTRIBUTOR TOOL - Track CC changelog, extract new versions since last check, analyze impact on plugin (breaking changes, opportunities, deprecations). Run…
Run an A/B codex review experiment — holistic codex review vs 3 focused dimension passes (security, ecto, liveview) on the branch diff, classify findings,…
CONTRIBUTOR TOOL - Validate plugin against latest Claude Code documentation. Catches breaking changes, deprecations, discovers new features. Run before…
Guide plugin development workflow — editing skills, agents, hooks, or eval framework in this repo. Use when modifying files in plugins/elixir-phoenix/,…
Generate X/Twitter release promotion posts with ASCII tables and CodeSnap rendering. Use when writing release posts, promotion tweets, plugin announcements, or…
CONTRIBUTOR TOOL - Cut a plugin release: bump plugin.json version, finalize CHANGELOG, update README if needed, gate on make ci, commit, tag vX.Y.Z, and create…