elixir

Analyze Elixir code for idiomatic patterns and type specifications.

3|Updated Nov 22, 2020
One-click install
npx skills add https://github.com/jeffutter/nixpkgs --skill elixir-jeffutter
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: elixir
Source: https://github.com/jeffutter/nixpkgs/tree/main/modules/home/languages/ai/skills/elixir
Command: npx skills add https://github.com/jeffutter/nixpkgs --skill elixir-jeffutter

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Claude needs reliable, idiomatic Elixir guidance to write, review, and refactor code with confidence. This Skill provides concise rules, patterns, and examples to improve readability, safety, and maintainability of Elixir projects (.ex, .exs).

Core Features & Use Cases

  • Idiomatic coding guidance: Rules and patterns for writing idiomatic Elixir, including pattern matching, piping, and module organization.
  • Typespecs and Dialyzer readiness: Best practices for @spec, @type, @opaque, and Dialyzer-friendly contracts.
  • GraphQL/Absinthe guidance: Guidance for effective schema design, resolver patterns, and Dataloader usage with Absinthe.
  • Quick Reference: Short, practical snippets and templates for common Elixir tasks.

Quick Start

Analyze a provided Elixir module and return a review highlighting idiomatic improvements, suggested type specs, and refactor opportunities, with concrete code recommendations.

Frequently Asked Questions about elixir

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

FAQPage Schema
How do I write idiomatic Elixir code with proper typespecs and Dialyzer contracts?

Idiomatic Elixir code requires explicit @spec, @type, and @opaque annotations to ensure Dialyzer readiness. You should apply pattern matching, piping, and clear module organization to enforce safe, maintainable contracts and documented error handling.

What are the best practices for using Absinthe Dataloader in Elixir GraphQL schemas?

Absinthe Dataloader best practices involve effective schema design and structured resolver patterns to batch data access. You should implement clear Dataloader usage patterns to safely optimize data fetching and maintain idiomatic Elixir GraphQL modules.

How do I refactor an Elixir module to improve pattern matching and piping?

Refactoring an Elixir module for idiomatic improvements involves analyzing your code to enforce pattern matching and piping patterns. This process highlights refactor opportunities, suggests type specs, and delivers concrete code recommendations for better readability.

Does my Elixir project need explicit typespecs for every function before code review?

Your Elixir project requires explicit specs and documented contracts for safe code review. Enforcing strong type specifications through @spec and @type ensures Dialyzer-friendly contracts, which are necessary for delivering maintainable and reliable Elixir modules.

When should I use higher-order functions and guards in Elixir?

You should use higher-order functions and guards in Elixir to establish clear, safe patterns for conditional logic and error handling. Applying these idiomatic patterns ensures your code remains readable, maintainable, and aligned with strong type specifications.