Skip to content

■ SKILLS // SKILL SPECS

core

Essential Elixir development support with hooks and automation

■ [!] ON THIS PAGE ▼
■ INSTALL // npx @self.md/cli install core
AuthorBradley Golden
Namespace@bradleygolden/elixir
Category#general
Version1.0.0
Stars★ 159
Downloads↓ 7
Verification[ ✓ ] self.md verified

Essential Elixir development support with hooks and automation

Installation

npx claude-plugins install @bradleygolden/elixir/core

Contents

Folders: hooks, scripts, skills

Files: CHANGELOG.md, README.md

Documentation

Essential Elixir development support plugin for Claude Code.

Installation

claude
/plugin install core@elixir

Requirements

  • Elixir installed and available in PATH
  • Mix available
  • Run from an Elixir project directory (with mix.exs)
  • curl and jq (for hex-docs-search skill)

Features

Automatic Hooks

PostToolUse - After file edits:

  • ✅ Auto-format - Automatically runs mix format on edited .ex/.exs files
  • ✅ Compile check - Runs mix compile --warnings-as-errors to catch errors immediately

PreToolUse - Before git commits:

  • ✅ Pre-commit validation - Ensures code is formatted, compiles, and has no unused deps before committing

Skills

hex-docs-search - Intelligent Hex package documentation search with progressive fetching:

  • 🔍 Local deps search - Searches installed packages in deps/ directory for code and docs
  • 💾 Fetched cache - Checks previously fetched documentation and source in .hex-docs/ and .hex-packages/
  • ⬇️ Progressive fetch - Automatically fetches missing documentation or source code locally (with version prompting)
  • 📚 Codebase usage - Finds real-world usage examples from your project
  • 🌐 HexDocs API - Queries hex.pm API for official documentation
  • 🔎 Web fallback - Uses web search when other methods don’t provide enough information
  • 🚀 Offline-capable - Once fetched, documentation and source available without network access

See skills/hex-docs-search/SKILL.md for details.

usage-rules - Package best practices and coding conventions search:

  • 🔍 Local deps search - Searches installed packages in deps/ for usage-rules.md files
  • 💾 Fetched cache - Checks previously fetched rules in .usage-rules/
  • ⬇️ Progressive fetch - Automatically fetches missing usage rules when needed
  • 🎯 Context-aware - Extracts relevant sections based on coding context (querying, errors, etc.)
  • 📝 Pattern examples - Shows good/bad code examples from package maintainers
  • 🤝 Integrates with hex-docs-search - Combine for comprehensive “best practices + API” guidance
  • 🚀 Offline-capable - Once fetched, usage rules available without network access

See skills/usage-rules/SKILL.md for details.

Hooks Behavior

Auto-format (Non-blocking)

mix format {{file_path}}
  • Runs automatically after editing .ex or .exs files
  • Non-blocking - just formats and continues
  • Fast - only formats the changed file

Compile Check (Blocking on errors)

mix compile --warnings-as-errors
  • Runs after editing .ex or .exs files
  • Blocks on compilation errors - Claude must fix before continuing
  • Output truncated to 50 lines to avoid overwhelming context

Pre-commit Validation (Blocking)

mix format --check-formatted &&
mix compile --warnings-as-errors &&
mix deps.unlock --check-unused
  • Runs before any git commit command (including git add && git commit)
  • Blocks commit if any check fails
  • Three checks:
    1. All files are formatted
    2. Code compiles without warnings
    3. No unused dependencies
  • Note: Skips if project has a precommit alias (defers to precommit plugin)

Changelog

See CHANGELOG.md for version history.

Included Skills

This plugin includes 2 skill definitions:

Research Hex packages (Sobelow, Phoenix, Ecto, Credo, Ash, etc). Use when investigating packages, understanding integration patterns, or finding module/function docs and usage examples. Automatically fetches missing documentation and source code locally.

View skill definition

Comprehensive search for Elixir and Erlang package documentation, following a cascading strategy to find the most relevant and context-aware information.

When to use this skill

Use this skill when you need to:

  • Look up documentation for a Hex package or dependency
  • Find function signatures, module documentation, or type specs
  • See usage examples of a library or module
  • Understand how a dependency is used in the current project
  • Search for Elixir/Erlang standard library documentation

Search strategy

This skill implements a cascading search that prioritizes local and contextual information:

  1. Local dependencies - Search installed packages in deps/ directory (both source code AND generated docs)
  2. Fetched cache - Check previously fetched documentation and source code in .hex-docs/ and .hex-packages/
  3. Progressive fetch - Automatically fetch missing documentation or source code locally when needed
  4. Codebase usage - Find how packages are used in the current project
  5. HexDocs API - Search official documentation on hexdocs.pm (fallback)
  6. Web search - Fallback to general web search (last resort)

Instructions

Step 1: Identify the search target

Extract the package name and optionally the module or function name from the user’s question.

Examples:

  • “How do I use Phoenix.LiveView?” → Package: phoenix_live_view, Module: Phoenix.LiveView
  • “Show me Ecto query examples” → Package: ecto, M

usage-rules

Search for package-specific usage rules and best practices from Elixir packages. Use when you need coding conventions, patterns, common mistakes, or good/bad examples for packages like Ash, Phoenix, Ecto, etc.

View skill definition

Comprehensive search for Elixir and Erlang package usage rules and best practices, following a cascading strategy to find the most relevant coding conventions and patterns.

When to use this skill

Use this skill when you need to:

  • Look up coding conventions for a Hex package
  • Find best practices and recommended patterns
  • See good/bad code examples for proper usage
  • Understand common mistakes to avoid
  • Learn package-specific idioms and conventions
  • Get context-aware recommendations for implementation

Search strategy

This skill implements a cascading search that prioritizes local and contextual information:

  1. Local dependencies - Search installed packages in deps/ directory for usage-rules.md
  2. Fetched cache - Check previously fetched usage rules in .usage-rules/
  3. Progressive fetch - Automatically fetch package and extract usage-rules.md if missing
  4. Context-aware extraction - Extract relevant sections based on coding context
  5. Fallback - Note when package doesn’t provide usage rules, suggest alternatives

Instructions

Step 1: Identify the package and context

Extract the package name and identify the coding context from the user’s question.

Package name examples:

  • “Ash best practices” → Package: ash
  • “Phoenix LiveView patterns” → Package: phoenix_live_view
  • “How to use Ecto properly?” → Package: ecto

Context keywords:

  • Querying: “query”, “filter”, “search”, “find”, “list”
  • Erro

Source

View on GitHub