dot_claude/skills/elixir-expert/SKILL.md
Use when needing idiomatic, high-performance Elixir (v1.18+) guidance for distributed systems, Phoenix applications, or Nerves-based embedded logic.
npx skillsauth add nijaru/dotfiles elixir-expertInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
|>) for readability.Task or GenServer over raw spawn.strong and dynamic types).if or unless where pattern matching or case is clearer.Enum where Stream is more efficient for large or infinite collections.Process.sleep/1 in production code unless absolutely necessary (e.g., backoff).Regex for simple string operations—use String functions.try/catch for control flow. Use tagged tuples ({:ok, value}, {:error, reason}).Mix.Config (deprecated)—use Config (introduced in 1.9).@spec.
strong for strict type checking.dynamic where Elixir's dynamic nature is required.mix compile --warnings-as-errors to catch type mismatches during development.@enforce_keys and use defstruct with clear defaults.Supervisor module. Prefer start_link and child_spec/1.Registry for local process discovery instead of named processes for scalability.Task.async/1 and Task.await/2 for simple concurrent work. Use Task.Supervisor for managed tasks.~p"/path" instead of helper functions for compile-time route checking.Phoenix.Component) for reusable UI parts.attr, slot).Ecto.Changeset for all data validation and transformation.Ecto.Query.API functions.preload. Avoid N+1 queries by preloading necessary data in the context.Ecto.Multi for complex database transactions involving multiple operations.PascalCase. Use alias, require, import, and use judiciously.snake_case.:snake_case.? (e.g., active?).! (e.g., save!).mix format. Adhere to .formatter.exs.mix.Hex.mix deps.get, mix deps.compile, mix deps.unlock.ExUnit. Write doctests in module documentation. Use Mix.env() == :test for conditional logic.Credo for code style and consistency.Dialyzer (via dialyxir) for static analysis, though the new type system is becoming the primary path.iex. Use recompile() to reload code.dbg() (Elixir 1.14+) for interactive inspection. Use IO.inspect(label: "...") for quick logging.development
Use after completing a bug fix, feature, refactor, or tk task when the first implementation taught enough context to replace it with a simpler, cleaner, or more coherent version before finalizing.
development
Use when writing, migrating, or reviewing Zig code across recent stable versions (0.14-0.16), especially to correct stale syntax or stdlib, build.zig, allocator, formatting, or runtime API knowledge.
documentation
Use when reviewing or revising text (prose, docs, commits) to remove AI patterns and improve voice/clarity.
content-media
Use when fetching X/Twitter post content by URL, or searching for recent X posts.