Phoenix framework development guidelines covering LiveView, Ecto, real-time features, and best practices for building scalable web applications with Elixir.
Install
npx skills add https://github.com/mindrally/skills --skill phoenixSKILL.md
Phoenix Framework Development
You are an expert in Elixir, Phoenix, PostgreSQL, LiveView, and Tailwind CSS.
Code Style and Structure
- Write concise, idiomatic Elixir code with accurate examples
- Follow Phoenix conventions and established best practices
- Leverage functional programming patterns and immutability principles
- Favor higher-order functions and recursion over imperative loops
- Use meaningful variable and function names (e.g.,
user_signed_in?,calculate_total) - Organize files per Phoenix conventions: controllers, contexts, views, schemas
Naming Standards
- Use snake_case for files, functions, and variables
- Use PascalCase for module names
- Adhere to Phoenix naming conventions for contexts, schemas, and controllers
Elixir and Phoenix Implementation
- Utilize pattern matching and guards effectively
- Leverage Phoenix's built-in functions and macros
- Apply Ecto proficiently for database operations
Syntax and Formatting
- Follow the Elixir Style Guide
- Chain functions with the pipe operator
|> - Use single quotes for charlists, double quotes for strings
Error Handling
- Embrace the "let it crash" philosophy with supervisor trees
- Log errors properly and provide user-friendly messaging
- Validate data through Ecto changesets
- Display appropriate flash messages for controller errors
UI and Styling
- Use LiveView for real-time, dynamic interactions
- Implement responsive design with Tailwind CSS
- Employ view helpers to maintain DRY templates
Performance Optimization
- Index databases effectively
- Cache strategically (ETS, Redis)
- Prevent N+1 queries using
preload,joins, orselect - Optimize database queries for efficient data retrieval
Architecture Patterns
- Follow RESTful routing conventions
- Organize functionality within contexts
- Use GenServers for stateful processes and background work
- Deploy Tasks for concurrent, isolated operations
Testing
- Write comprehensive ExUnit tests
- Practice TDD (Test-Driven Development)
- Use ExMachina for test data generation
Security
- Implement authentication and authorization (Guardian, Pow)
- Validate strong parameters in controllers
- Defend against XSS, CSRF, and SQL injection vulnerabilities
Related skills
entra-app-registrationmicrosoft606KGuides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Key Vault secrets (use azure-keyvault-expiration-audit), general Azure resource security guidance.azure-messagingmicrosoft595KTroubleshoot and resolve issues with Azure Messaging SDKs for Event Hubs and Service Bus. Covers connection failures, authentication errors, message processing issues, and SDK configuration problems. WHEN: event hub SDK error, service bus SDK issue, messaging connection failure, AMQP error, event processor host issue, message lock lost, message lock expired, lock renewal, lock renewal batch, send timeout, receiver disconnected, SDK troubleshooting, azure messaging SDK, event hub consumer, servicentra-agent-idmicrosoft328KProvision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmi_path, OBO, cross-tenant) including the Microsoft Entra SDK for AgentID sidecar. USE FOR: Agent Identity Blueprint, BlueprintPrincipal, agent OAuth, fmi_path token exchange, agent OBO, Workload Identity Federation for agents, polyglot agent auth, Microsoft.Identity.Web.AgentIdentities. DO NOT USE FOR: standard Entra app registsupabasesupabase298KUse when doing ANY task involving Supabase. Triggers: Supabase products (Database, Auth, Edge Functions, Realtime, Storage, Vectors, Cron, Queues); client libraries and SSR integrations (supabase-js, @supabase/ssr) in Next.js, React, SvelteKit, Astro, Remix; auth issues (login, logout, sessions, JWT, cookies, getSession, getUser, getClaims, RLS); Supabase CLI or MCP server; schema changes, migrations, declarative schemas, security audits, Postgres extensions (pg_graphql, pg_cron, pg_vector); deb