- name
SKILL.md
技能文件保留在发布者的仓库中。
在终端中粘贴复制的命令。它会把这个 SKILL.md 安装到对应的智能体中。
npx skills add oliver-kriska/claude-elixir-phoenix --skill assigns-audit -a cursor -y在终端中粘贴复制的命令。它会把这个 SKILL.md 安装到对应的智能体中。
npx skills add oliver-kriska/claude-elixir-phoenix --skill assigns-audit -a claude-code -y在终端中粘贴复制的命令。它会把这个 SKILL.md 安装到对应的智能体中。
npx skills add oliver-kriska/claude-elixir-phoenix --skill assigns-audit -a codex -y在终端中粘贴复制的命令。它会把这个 SKILL.md 安装到对应的智能体中。
npx skills add oliver-kriska/claude-elixir-phoenix --skill assigns-audit -a grok -y在 Grok Bot 聊天中发送复制的消息。Bot 会从 GitHub 获取这个 SKILL.md,并添加到你所有 Bot 共享的技能中。
Install this skill: https://github.com/oliver-kriska/claude-elixir-phoenix/tree/HEAD/plugins/elixir-phoenix/skills/assigns-audit来自发布者
Analyze LiveView socket assigns for memory efficiency, clarity, and best practices.
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.
Should use temporary_assigns:
def mount(_params, _session, socket) do
{:ok, socket, temporary_assigns: [flash_message: nil]}
end
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.
# 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
For each assign, estimate memory footprint:
Run /lv:assigns path/to/live_view.ex to generate an assigns inventory with memory estimates and optimization recommendations.
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 tempo
---name: assigns-auditdescription: Inspect LiveView socket assigns for memory bloat — missing temporary_assigns, unused assigns, unbounded lists…---# plugins/elixir-phoenix/skills/assigns-audit/SKILL.md概览
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.
常见问题
从发布者处下载 plugins/elixir-phoenix/skills/assigns-audit/SKILL.md,或复制路径后打开仓库。PlugMCP 只收录该技能,不托管文件。
发布者将它存放在 https://github.com/oliver-kriska/claude-elixir-phoenix。
Claude、Cursor、Codex 和 Grok Build 可以读取你从发布者仓库添加的 SKILL.md。在聊天中发送技能的 GitHub 文件夹链接,Grok Bot 就会安装它。