liveview-guidelines

Standardizes Phoenix LiveView development for streaming, JavaScript interop, testing, and form handling.

1|1|Updated Feb 8, 2026
One-click install
npx skills add https://github.com/code0100fun/botfiles --skill liveview-guidelines
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: liveview-guidelines
Source: https://github.com/code0100fun/botfiles/tree/main/plugins/elixir-phoenix/skills/liveview-guidelines
Command: npx skills add https://github.com/code0100fun/botfiles --skill liveview-guidelines

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Phoenix LiveView patterns and best practices to reduce complexity, improve streaming data handling, JS interop, testing, and form handling across LiveView features.

Core Features & Use Cases

  • Provides guidelines for using LiveView streams instead of regular assigns to manage collections.
  • Outlines JavaScript interop practices including colocated hooks, phx-hook management, and colocation of scripts.
  • Includes testing approaches using Phoenix.LiveViewTest and LazyHTML for reliable UI verification.
  • Use Case: Teams reviewing or building LiveView features in apps like dashboards, chats, or real-time forms.

Quick Start

Review an existing LiveView page and apply the streams, hooks, and testing patterns outlined here to your feature.

Frequently Asked Questions about liveview-guidelines

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is the best way to handle large collections in Phoenix LiveView?

Using LiveView streams is the best way to handle large collections in Phoenix LiveView. Streams manage data efficiently instead of storing entire collections in assigns, reducing memory usage and improving UI rendering performance for dashboards and chats.

How do I manage JavaScript interoperability in Phoenix LiveView?

Manage JavaScript interoperability in Phoenix LiveView by using colocated JS hooks and phx-hook attributes. This approach keeps scripts organized and ensures reliable communication between client-side JavaScript and server-rendered LiveView components.

How do I test Phoenix LiveView features reliably?

Test Phoenix LiveView features reliably by using Phoenix.LiveViewTest and LazyHTML. These tools provide robust UI verification approaches, allowing you to assert on rendered HTML and simulate user interactions for comprehensive testing.

Does Phoenix LiveView support real-time form handling without full page reloads?

Phoenix LiveView supports real-time form handling without full page reloads by using to_form and LiveView components. This technique standardizes form validations and submissions, maintaining UI consistency across interactive features.

When should I use phx-update attributes in LiveView streams?

Use phx-update attributes in LiveView streams when you need to control how DOM elements are appended, prepended, or replaced during re-renders. This ensures correct UI updates for dynamic collections like chat messages or live dashboard data.