mcpField
E
elixir

elixir

github.com/mindrallyDevelopment287841 installsUpdated 3w ago
Repository

About elixir

A development skill for Elixir and Phoenix programmers, covering idiomatic functional code and concurrent systems. It includes guidance on Ecto, LiveView, OTP patterns, testing, and performance.

Key features

  1. 01Functional programming and immutability
  2. 02Pattern matching and Phoenix conventions
  3. 03Ecto database operations
  4. 04LiveView and GenServer patterns
  5. 05ExUnit testing with TDD
  6. 06Concurrency and performance practices

Use cases

  1. 01Writing idiomatic Elixir and Phoenix code
  2. 02Implementing database validation and queries
  3. 03Building real-time LiveView interactions
  4. 04Testing concurrent applications

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/mindrally/skills --skill elixir

After installing, type/elixirin Claude Code to confirm it loaded.

Details

From the project README

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

Comments

Markdown supported