Agent skill

Liveview Patterns

by oliver-kriska in oliver-kriska/claude-elixir-phoenix

Build LiveView: async data (assignasync), PubSub (check connected?), phx-change events, form components/modals/uploads, streams for lists, livepatch.

MITAuto-check passedDevelopment

Install Liveview Patterns

skills CLI
$ npx skills add oliver-kriska/claude-elixir-phoenix --skill liveview-patterns -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install oliver-kriska/claude-elixir-phoenix liveview-patterns --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/oliver-kriska/claude-elixir-phoenix.git skills-src && mkdir -p .claude/skills && cp -r skills-src/targets/pi/skills/liveview-patterns .claude/skills/liveview-patterns && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
liveview-patterns
GitHub stars
565
Token cost
~1.3k tokens
SKILL.md length
404 words
Files
7 (incl. references)
Skills in repo
105
Repo updated
First seen
Licence
MIT

At a glance

Build LiveView: async data (assignasync), PubSub (check connected?), phx-change events, form components/modals/uploads, streams for lists, livepatch.

  • Works in 10 steps: NO UNCONDITIONAL DB QUERIES IN MOUNT —… → ALWAYS USE STREAMS FOR LISTS — Regular… → CHECK connected?/1 BEFORE SUBSCRIPTIONS… → …
  • Handling interactions
  • SKILL.md covers Iron Laws — Never Violate These, Memory Impact, Quick Patterns and Navigation Decision Tree, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Liveview Patterns is an agent skill from oliver-kriska/claude-elixir-phoenix. Build LiveView: async data (assignasync), PubSub (check connected?), phx-change events, form components/modals/uploads, streams for lists, livepatch. Use when handling interactions, debugging events, or tracking Presence.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including reference files (for example `references/async-streams.md`, `references/channels-presence.md` and `references/components.md`).

It sits in Development, covering Event-driven systems. The repository describes itself as: Claude Code plugin for Elixir/Phoenix/LiveView — 26 specialist agents, Iron Laws enforcement, and Tidewave MCP integration. Plan features with parallel research agents, execute… The licence is MIT.

When your agent uses it

  • Handling interactions
  • Debugging events
  • Tracking Presence

Example prompts

  • “/liveview-patterns”

Workflow steps

10 steps, taken from the first numbered list in SKILL.md.

  1. NO UNCONDITIONAL DB QUERIES IN MOUNT — Mount runs TWICE. Default: assign_async. SEO routes: connected? guard + cache-backed disconnected…
  2. ALWAYS USE STREAMS FOR LISTS — Regular assigns = O(n) memory per user. Streams = O(1)
  3. CHECK connected?/1 BEFORE SUBSCRIPTIONS — Prevents double subscriptions
  4. EXTRACT VARIABLES BEFORE assign_async CLOSURE — Closures copy entire referenced variables
  5. LOAD PRIMARY DATA IN mount/3, PAGINATION IN handle_params/3 — handle_params runs on EVERY URL change
  6. NEVER PASS SOCKET TO BUSINESS LOGIC — Extract data before calling contexts
  7. CHECK CHANGESET ERRORS BEFORE UI DEBUGGING — Silent form save = check {:error, changeset} first, not viewport/JS
  8. HIDDEN INPUTS FOR ALL REQUIRED EMBEDDED FIELDS — Every required field in an embedded schema MUST have a hidden_input if not directly…
  9. NEVER USE assign_new FOR LIFECYCLE VALUES — assign_new skips the function if key exists. Use assign/3 for locale, current user, or any…
  10. MATCH {:error, %Ecto.Changeset{}} EXPLICITLY — Bare {:error, _} merges changeset and non-changeset errors; the form silently never…

What it can do on your machine

Read from SKILL.md and the folder at commit 9767a82. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are elixir).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Liveview Patterns loads about 1.3k tokens when it runs, and up to ~8.8k if it reads all its reference files. Until then it costs about 60 tokens; SKILL.md has 404 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~60
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~8.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from oliver-kriska/claude-elixir-phoenix at commit 9767a82, republished under its MIT licence (© oliver-kriska). 404 words, ~1,271 tokens.

Download SKILL.mdSave it as .claude/skills/liveview-patterns/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
liveview-patterns
description
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.

LiveView Patterns Reference

Ash projects: Use ash-framework skill for AshPhoenix.Form. Lifecycle: AshPhoenix.Form.validate/3 on phx-change, AshPhoenix.Form.submit/2 on submit, to_form/1 for HEEx. Do not use Ecto.Changeset.cast/3.

Reference for building with Phoenix LiveView 1.0/1.1.

Iron Laws — Never Violate These

  1. NO UNCONDITIONAL DB QUERIES IN MOUNT — Mount runs TWICE. Default: assign_async. SEO routes: connected? guard + cache-backed disconnected branch (crawlers read that HTML)
  2. ALWAYS USE STREAMS FOR LISTS — Regular assigns = O(n) memory per user. Streams = O(1)
  3. CHECK connected?/1 BEFORE SUBSCRIPTIONS — Prevents double subscriptions
  4. EXTRACT VARIABLES BEFORE assign_async CLOSURE — Closures copy entire referenced variables
  5. LOAD PRIMARY DATA IN mount/3, PAGINATION IN handle_params/3 — handle_params runs on EVERY URL change
  6. NEVER PASS SOCKET TO BUSINESS LOGIC — Extract data before calling contexts
  7. CHECK CHANGESET ERRORS BEFORE UI DEBUGGING — Silent form save = check {:error, changeset} first, not viewport/JS
  8. HIDDEN INPUTS FOR ALL REQUIRED EMBEDDED FIELDS — Every required field in an embedded schema MUST have a hidden_input if not directly editable
  9. NEVER USE assign_new FOR LIFECYCLE VALUES — assign_new skips the function if key exists. Use assign/3 for locale, current user, or any value refreshed every mount
  10. MATCH {:error, %Ecto.Changeset{}} EXPLICITLY — Bare {:error, _} merges changeset and non-changeset errors; the form silently never re-renders validation errors. Handle other errors separately

Memory Impact

Pattern3K items10K users × 10K items
Regular assigns~5.1 MB~10+ GB
Streams~1.1 MBMinimal (O(1))

Decision: Lists with >100 items → Use streams, not assigns

Quick Patterns

Async Assigns (CRITICAL)
elixir
def mount(%{"slug" => slug}, _session, socket) do
  # Extract needed values BEFORE the closure
  scope = socket.assigns.current_scope

  {:ok,
   socket
   |> assign_async(:org, fn -> {:ok, %{org: fetch_org(scope, slug)}} end)}
end
Show full SKILL.md (163 more words)Show less
Streams for Lists
elixir
def mount(_params, _session, socket) do
  {:ok, stream(socket, :items, Items.list_items())}
end

# Insert/update/delete
stream_insert(socket, :items, item, at: 0)
stream_delete(socket, :items, item)
SEO Dead-Render (cache-backed disconnected branch)

For public/SEO-visible routes (marketing, articles, product listings) the disconnected render IS the HTML crawlers see. Fetch from a cache there, real data on connect:

elixir
def mount(_params, _session, socket) do
  products =
    if connected?(socket),
      do: Catalog.list_products(),
      else: Cache.get_products() || []

  {:ok, assign(socket, products: products)}
end

Empty list → <noscript>-friendly skeleton. Cache → :persistent_term, ETS, or Cachex. This satisfies Iron Law #1 AND keeps Googlebot/GPTBot happy.

PubSub with connected? check
elixir
def mount(_params, _session, socket) do
  if connected?(socket), do: Chat.subscribe(room_id)
  {:ok, socket}
end

Navigation Decision Tree

Same LiveView, different params? → patch / push_patch
Different LiveView, same live_session? → navigate / push_navigate
Different live_session or non-LiveView? → href / redirect

Component Decision Tree

Does component need BOTH internal state AND event handling?
│
├── YES → Does it encapsulate APPLICATION logic (not just DOM)?
│   ├── YES → Use LiveComponent ✅
│   └── NO → Refactor to function component with parent handling
│
└── NO → Use Function Component ✅

Official guidance: "Prefer function components over live components"

Common Anti-patterns

WrongRight
DB queries without assign_asyncUse assign_async for mount queries (SEO routes: connected? + cached dead render)
assign(socket, items: list) for listsstream(socket, :items, list)
PubSub subscribe without connected?if connected?(socket), do: subscribe()
Passing socket to context functionsExtract socket.assigns first
Business logic in handle_eventDelegate to context
assign_new for locale/user in hooksassign/3 (must run every mount)

References

For detailed patterns, see:

  • references/async-streams.md - assign_async, stream_async, streams
  • references/forms-uploads.md - Forms, validation, file uploads
  • references/components.md - Function components, LiveComponents
  • references/pubsub-navigation.md - PubSub, navigation, JS commands
  • references/js-interop.md - Third-party JS libraries, phx-update="ignore", hooks
  • references/channels-presence.md - Phoenix Channels, Presence, token auth

© oliver-kriska, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files (references) in targets/pi/skills/liveview-patterns of oliver-kriska/claude-elixir-phoenix.

  • SKILL.md
  • references/async-streams.md
  • references/channels-presence.md
  • references/components.md
  • references/forms-uploads.md
  • references/js-interop.md
  • references/pubsub-navigation.md

Open the folder on GitHubat commit 9767a82

Compare with similar skills

Liveview Patterns next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Liveview Patterns compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Liveview Patterns this skilloliver-kriska/claude-elixir-phoenix565—~1.3kAutomated safety check: PassMIT
Evolutionary Modular Architecturetech-leads-club/agent-skills7k—~3.7kAutomated safety check: PassCC-BY-4.0
Designing ArchitectureCloudAI-X/claude-workflow-v21.4k1 repos~1.4kAutomated safety check: PassMIT
Backfillscaccogatto/okf-skills408—~4.3kAutomated safety check: NotesMIT
Migration PathAxonIQ/AxonFramework3.6k—~594Automated safety check: PassApache-2.0
Akka.NET Best PracticesAaronontheweb/dotnet-skills1.2k1 repos~3.3kAutomated safety check: PassMIT

Similar skills

  • Evolutionary Modular Architecture

    tech-leads-club/agent-skills

    Guides design of modular-monolith platforms with DDD, flat-by-aggregate modules, anti-corruption layers, outbox events and resilience, plus an architecture document with SVG diagrams.

    7k GitHub stars~3.7k tokensUpdated 18 days ago
    DevelopmentAuto-check passed
  • Designing Architecture

    CloudAI-X/claude-workflow-v2

    Designs software architecture and selects appropriate patterns for projects.

    1.4k GitHub starsUsed in 1 repo~1.4k tokens
    DevelopmentAuto-check passed
  • Backfill

    scaccogatto/okf-skills

    Reconstruct an OKF bundle by event-sourcing a repository's history (git log and Claude session transcripts).

    408 GitHub stars~4.3k tokensUpdated 10 days ago
    DevelopmentAuto-check: notes
  • Migration Path

    AxonIQ/AxonFramework

    Create a new Axon Framework 4→5 migration path documentation page.

    3.6k GitHub stars~594 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Akka.NET Best Practices

    Aaronontheweb/dotnet-skills

    Guidance for Akka.NET actor systems covering EventStream versus DistributedPubSub, supervision, Props versus DependencyResolver, work distribution and testable cluster code.

    1.2k GitHub starsUsed in 1 repo~3.3k tokens
    DevelopmentAuto-check passed
  • Architect Review

    AratKruglik/claude-laravel

    Master software architect specializing in modern architecture patterns, clean architecture, microservices, event-driven systems, and DDD.

    155 GitHub starsUsed in 8 repos~2.2k tokens
    DevelopmentAuto-check passed

More from oliver-kriska/claude-elixir-phoenix

All 105 skills in this repo
  • Phx Brief

    oliver-kriska/claude-elixir-phoenix

    Interactive briefing of a plan file — explains reasoning, schema decisions, component choices.

    565 GitHub starsUsed in 1 repo~1.2k tokens
    Auto-check passed
  • Codex Ab

    oliver-kriska/claude-elixir-phoenix

    Run an A/B codex review experiment — holistic codex review vs 3 focused dimension passes (security, ecto, liveview) on the branch diff, classify findings, report a panel-value verdict.

    565 GitHub stars~977 tokensUpdated 3 days ago
    Auto-check passed
  • Audit

    oliver-kriska/claude-elixir-phoenix

    Project health audit and health check — architecture, performance, tests, dependencies, code quality.

    565 GitHub stars~2k tokensUpdated 3 days ago
    Auto-check passed
  • Compound Docs

    oliver-kriska/claude-elixir-phoenix

    Searchable Elixir/Phoenix/Ecto solution documentation system with; Use when consulting past solutions…

    565 GitHub stars~528 tokensUpdated 3 days ago
    Auto-check passed
  • Compound Docs

    oliver-kriska/claude-elixir-phoenix

    Searchable Elixir/Phoenix/Ecto solution documentation system with YAML frontmatter.

    565 GitHub stars~547 tokensUpdated 3 days ago
    Auto-check passed
  • Deploy

    oliver-kriska/claude-elixir-phoenix

    Elixir/Phoenix deployment patterns — Dockerfile, fly.toml, runtime.exs, mix release, rel/ overlays.

    565 GitHub stars~1.1k tokensUpdated 3 days ago
    Auto-check passed

Questions about Liveview Patterns

What does Liveview Patterns do?

Build LiveView: async data (assignasync), PubSub (check connected?), phx-change events, form components/modals/uploads, streams for lists, livepatch. Liveview Patterns is an agent skill from oliver-kriska/claude-elixir-phoenix.), phx-change events, form components/modals/uploads, streams for lists, livepatch.

When should I use Liveview Patterns?

Liveview Patterns fits situations like: handling interactions; debugging events; tracking Presence.

How do I install Liveview Patterns in Claude Code?

Run `npx skills add oliver-kriska/claude-elixir-phoenix --skill liveview-patterns -a claude-code`. Or copy the skill folder (targets/pi/skills/liveview-patterns in oliver-kriska/claude-elixir-phoenix) into .claude/skills/liveview-patterns in your project. Claude Code loads it when a task matches its description.

How do I install Liveview Patterns in Codex?

Run `npx skills add oliver-kriska/claude-elixir-phoenix --skill liveview-patterns -a codex`. Or copy the skill folder (targets/pi/skills/liveview-patterns in oliver-kriska/claude-elixir-phoenix) into .agents/skills/liveview-patterns in your project. Codex loads it when a task matches its description.

Can I use Liveview Patterns in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add oliver-kriska/claude-elixir-phoenix --skill liveview-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/liveview-patterns, .gemini/skills/liveview-patterns, .github/skills/liveview-patterns and .opencode/skills/liveview-patterns in your project.

What does Liveview Patterns need to run?

SKILL.md names no scripts, command-line tools or credentials: Liveview Patterns is instructions for the agent only.

Does Liveview Patterns access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Liveview Patterns safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Liveview Patterns use?

Liveview Patterns is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Liveview Patterns use?

About 1.3k tokens (SKILL.md is roughly 5.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 7.5k tokens, read only when the agent opens those files.

What are the alternatives to Liveview Patterns?

Skills that share tags, products or a category with Liveview Patterns: Evolutionary Modular Architecture (tech-leads-club/agent-skills, 7k stars), Designing Architecture (CloudAI-X/claude-workflow-v2, 1.4k stars), Backfill (scaccogatto/okf-skills, 408 stars) and Migration Path (AxonIQ/AxonFramework, 3.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Liveview Patterns?

oliver-kriska (a GitHub user) maintains it in oliver-kriska/claude-elixir-phoenix, which has 565 GitHub stars. The repository holds 105 skills in this directory. The repository was last updated on October 5, 2026.

Source: oliver-kriska/claude-elixir-phoenix on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.