- Elixir 1.14+ OTP 25+, pattern matching extensively,
mix formatnon-negotiable. - Configure
.formatter.exswith:inputsand:import_depsfor consistent formatting across team. - Linting: a linter (e.g., Credo
--strict), type checking: Dialyzer (viadialyxir). - Security:
mix_auditfor dependency CVE scanning, a SAST tool (e.g., Sobelow) for static analysis. Run both in CI. - Testing: ExUnit with
describeblocks,doctestfor examples, a coverage tool (e.g., excoveralls) at 80%+. - Documentation: ExDoc for generation,
@moduledocon all modules,@doc+@specon public functions. {:ok, value}/{:error, reason}tuples — never raise for expected errors.withfor multi-step ops, guard clauses for function overloading.- OTP: GenServer for state, Supervisor for fault tolerance,
|>pipe for transforms. - Dependencies: commit
mix.lock,hexwith~>constraints. - Anti-patterns: mutable state outside processes, long-running NIFs,
String.to_atomwith user input.
Elixir Conventions
Elixir code conventions covering Elixir 1.14+/OTP 25+, pattern matching, mix format, Credo/Dialyzer, ExUnit, ExDoc, OTP process patterns, and dependency security. Load when writing or reviewing Elixir code.
Elixir Conventions by goldziher · d6f8526
npx skillmds@latest add goldziher/elixir-conventions File contents
---name: elixir-conventionsdescription: Elixir code conventions covering Elixir 1.14+/OTP 25+, pattern matching, mix format, Credo/Dialyzer, ExUnit, ExDoc, OTP process patterns, and dependency security. Load when writing or reviewing Elixir code.---- Elixir 1.14+ OTP 25+, pattern matching extensively, `mix format` non-negotiable.- Configure `.formatter.exs` with `:inputs` and `:import_deps` for consistent formatting across team.- Linting: a linter (e.g., Credo `--strict`), type checking: Dialyzer (via `dialyxir`).- Security: `mix_audit` for dependency CVE scanning, a SAST tool (e.g., Sobelow) for static analysis. Run both in CI.- Testing: ExUnit with `describe` blocks, `doctest` for examples, a coverage tool (e.g., excoveralls) at 80%+.- Documentation: ExDoc for generation, `@moduledoc` on all modules, `@doc` + `@spec` on public functions.- `{:ok, value}` / `{:error, reason}` tuples — never raise for expected errors.- `with` for multi-step ops, guard clauses for function overloading.- OTP: GenServer for state, Supervisor for fault tolerance, `|>` pipe for transforms.- Dependencies: commit `mix.lock`, `hex` with `~>` constraints.- Anti-patterns: mutable state outside processes, long-running NIFs, `String.to_atom` with user input.
goldziher/ai-rulez/tree/main/internal/builtins/languages/elixir/skills/elixir-conventions commit d6f8526ccd
Frequently asked questions
Run npx skillmds@latest add goldziher/elixir-conventions in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Elixir code conventions covering Elixir 1.14+/OTP 25+, pattern matching, mix format, Credo/Dialyzer, ExUnit, ExDoc, OTP process patterns, and dependency security. Load when writing or reviewing Elixir code. It is listed under Security on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
goldziher (@goldziher) published this skill. Their other Agent Skills are listed on their SkillMD profile.