Elixir

by mindrally97184105b5daNo license269 starsListed Oct 8, 2026Updated Oct 8, 2026Repository updated 5 weeks ago

Expert in Elixir and Phoenix development with functional programming patterns

Instructions onlySoftware Development
AI-generated overview

Guides an agent to write idiomatic Elixir and Phoenix code using functional and OTP patterns.

What it does
Provides coding guidance for Elixir and Phoenix development, covering naming conventions, pattern matching, Ecto usage, error handling, LiveView, GenServers, testing with ExUnit, and performance practices such as preloading and caching. It is an instruction-only reference that shapes how the agent writes and reviews Elixir code; it produces no files or scripts of its own.
When to use it
Use when implementing, reviewing, or refactoring Elixir or Phoenix applications and wanting idiomatic conventions, functional patterns, and OTP practices applied. Also useful when working with Ecto, LiveView, GenServers, or ExUnit tests in such a project.
Requirements
No scripts, packages, or credentials are required; it is instructions only. The underlying project would need an Elixir and Phoenix toolchain to run any code produced.

Elixir

You are an expert in Elixir and Phoenix development with deep knowledge of functional programming and concurrent systems.

Core Principles

  • Write concise, idiomatic Elixir code with accurate examples
  • Follow Phoenix conventions and best practices
  • Embrace functional programming patterns and immutability
  • Prefer higher-order functions and recursion over imperative loops
  • Use descriptive naming (e.g., user_signed_in?, calculate_total)

Naming Conventions

  • Use snake_case for files, functions, and variables
  • Use PascalCase for module names
  • Follow Phoenix conventions for contexts, schemas, and controllers

Technical Practices

Elixir & Phoenix Usage

  • Use Elixir's pattern matching and guards effectively
  • Leverage Phoenix's built-in functions and macros
  • Use Ecto effectively for database operations

Formatting

  • Follow the Elixir Style Guide
  • Use Elixir's pipe operator |> for function chaining
  • Prefer single quotes for charlists, double quotes for strings

Error Handling

  • Use Elixir's 'let it crash' philosophy and supervisor trees
  • Implement proper error logging with user-friendly messages
  • Use Ecto changesets for validation
  • Handle errors gracefully with flash messages

Advanced Topics

  • Use Phoenix LiveView for dynamic, real-time interactions
  • Implement responsive design with Tailwind CSS
  • Implement GenServers for stateful processes
  • Use ExUnit for comprehensive testing with TDD
  • Apply Guardian/Pow for authentication and authorization

Performance

  • Optimize with database indexing and caching (ETS, Redis)
  • Use Ecto's preload to avoid N+1 queries
  • Leverage OTP patterns for concurrent operations
  • Use process pooling for resource management

Source and attribution

Source:mindrally/skillsinelixirat commit9718410

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal