SkillAgentSearch skills...

assigns-audit

Inspect LiveView socket assigns for memory bloat — missing temporary_assigns, unused assigns, unbounded lists needing streams, memory estimates

Install / Use

npx skills add oliver-kriska/claude-elixir-phoenix --skill assigns-audit

Installs into whichever agent you are using.

About this skill
📄

SKILL.md

Installable skill definition

Quality Score

85/100

Supported Platforms

Universal

Our assessment of assigns-audit

assigns-audit scores 85/100 on our quality scale, 2185th of 4,634 Development & Engineering skills we index (top 48%).

Its SKILL.md is 2.9 KB long, well organised into 14 sections with 2 code examples: a solid amount of guidance for an agent.

It has 560 GitHub stars, a meaningful sign that others use it.

Substance
26/30
Structure
18/20
Description
15/15
Adoption
12/20
Freshness
15/15

Maintenance, license and trust

  • The repository was last updated 2 days ago, so assigns-audit is actively maintained.
  • It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
  • Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

assigns-audit compared with similar skills

All 4 of these similar skills score higher than assigns-audit; compare them before choosing.

SkillScoreStarsUpdatedFormat
assigns-audit (this skill)by oliver-kriska855602d agoSKILL.md
ai-job-searchby MadsLorentzen10044.9ktodayCLAUDE.md
claude-howtoby luongnv8910041.7k3d agoCLAUDE.md
algorithmic-artby anthropics100177.9k11d agoSKILL.md
pptxby anthropics100177.9k11d agoSKILL.md

Frequently asked questions

How do I install assigns-audit?
Run npx skills add oliver-kriska/claude-elixir-phoenix --skill assigns-audit. The install tabs above show the steps for each supported agent.
Which AI agents does assigns-audit work with?
It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
Is assigns-audit safe to use?
It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is assigns-audit still maintained?
The repository was last updated 2 days ago, so assigns-audit is actively maintained.

name: assigns-audit 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." effort: medium argument-hint: path/to/live_view.ex

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
def mount(_params, _session, socket) do
  {:ok, socket, temporary_assigns: [flash_message: nil]}
end

3. Unused Assigns

Search 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.

4. Missing Initialization

# 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: [])}
end

Memory Estimation

For 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 |

Usage

Run /lv:assigns path/to/live_view.ex to generate an assigns inventory with memory estimates and optimization recommendations.

Related Skills

View on GitHub
GitHub Stars560
CategoryDevelopment
Updated2d ago
Forks44

Languages

Python

Trust signals

100/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

No cautions