lvassigns

Solid

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.

AI & Automation 384 stars 25 forks Updated 4 days ago MIT

Install

View on GitHub

Quality Score: 95/100

Stars 20%
86
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# LiveView Assigns Audit Analyze LiveView socket assigns for memory efficiency, clarity, and best practices. ## Iron Laws - Never Violate These 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 ## Quick Audit Commands ### Extract All Assigns Use Grep to find all `assign(` and `assign_new(` calls in the target LiveView file. ### Find Large Data Patterns 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. ## Audit Checklist ### 1. Memory Issues | 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 | ### 2. Missing temporary_assigns Should use `temporary_assigns`: - Flash messages - Form errors after submission - One-time notifications - Upload progress ``...

Details

Author
oliver-kriska
Repository
oliver-kriska/claude-elixir-phoenix
Created
3 months ago
Last Updated
4 days ago
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

Code & Development Solid

liveview-patterns

Build LiveView: async data (assign_async), PubSub (check connected?), phx-change events, form components/modals/uploads, streams for lists, live_patch. Use when handling interactions, debugging events, or tracking Presence.

384 Updated 4 days ago
oliver-kriska
AI & Automation Solid

flow-next-audit

Audit `.flow/memory/` entries against the current codebase and decide Keep / Update / Consolidate / Replace / Delete per entry. Triggers on /flow-next:audit, "audit memory", "review memory", "refresh learnings", "sweep stale memory", "consolidate overlapping memory entries". Optional `mode:autofix` token in arguments runs without questions and marks ambiguous as stale. Optional scope hint after the mode token (concept, category, module, or path) narrows what gets audited.

621 Updated 4 days ago
gmickel
Data & Documents Listed

memory-hygiene

Audit and clean up Claude Code's persistent memory system — MEMORY.md, memory files, lessons, and ADRs. Use this skill when: (1) the user asks to clean up, audit, or review their memory/lessons/ADRs, (2) MEMORY.md is approaching or exceeding the 200-line limit, (3) lesson files have grown large and may contain duplicates, (4) you notice ADR numbering conflicts, (5) memory files seem stale or contradicted by current code, or (6) the user says things like 'my memory is getting messy', 'clean up my lessons', 'deduplicate', 'review ADRs', 'memory audit'. Also proactively suggest running this after 10+ sessions on a project, or when MEMORY.md triggers a truncation warning.

0 Updated today
wan-huiyan
AI & Automation Listed

claude-md-overhaul

Audit and improve a Claude Code memory layer end-to-end. Measures CLAUDE.md and MEMORY.md against Anthropic's documented caps (200 lines per CLAUDE.md, 200 lines OR 25 KB for MEMORY.md auto-load), surveys project portfolio on disk vs memory coverage, finds sync conflicts in ~/.claude/, identifies gaps tier-by-tier, and executes improvements under bias-to-action with cap-fitting verification at each step. Use when CLAUDE.md/MEMORY.md "feel bloated", when memory feels invisible in fresh sessions, or as periodic hygiene (~monthly).

0 Updated 6 days ago
HermeticOrmus
AI & Automation Listed

clean-artifacts

Audit + groom `.forsvn/artifacts/` — classify every file (KEEP/STALE/ORPHAN/LEGACY/EPHEMERAL), surface references + risk. On `--apply` archives candidates behind per-category confirmation (moves to dated archive, never deletes). Not for cleaning code (use clean-code) or machine state (use clean-machine).

10 Updated today
hungv47