Comprehensive Elixir development support - formatting, compilation, testing, and static analysis in one plugin (recommended)
- GitHub stars
- 176
Install
/plugin install elixir@elixirRun it inside Claude Code after adding the marketplace with /plugin marketplace add bradleygolden/claude-marketplace-elixir.
Contents
Discovered from sourceSkills 2
Hex Documentation Search
Search Elixir package documentation. Prioritize local sources, fetch if needed.
Search Locations (in order)
- Project deps:
deps/<package>/lib/(source with @moduledoc/@doc),deps/<package>/doc/(HTML if generated) - Fetched docs cache:
.hex-docs/docs/hexpm/<package>/<version>/ - Fetched source cache:
.hex-packages/<package>-<version>/ - HexDocs API: Programmatic search (see below)
- Web search: Last resort with
site:hexdocs.pm
Fetching Locally
Determine version from mix.lock, mix.exs, or prompt user if ambiguous.
# Fetch documentation (stores in .hex-docs/)
HEX_HOME=.hex-docs mix hex.docs fetch <package> <version>
# Fetch source code (if docs insufficient or unavailable)
mix hex.package fetch <package> <version> --unpack --output .hex-packages/<package>-<version>
Mention adding .hex-docs/ and .hex-packages/ to .gitignore once per session when fetching occurs.
HexDocs Search API
Powered by Typesense at search.hexdocs.pm.
# Search within a specific package
curl -s "https://search.hexdocs.pm/?q=<query>&filter_by=package:=[<package>-<version>]" \
| jq '.hits[].document | {title, doc, url}'
# Search across all packages
curl -s "https://search.hexdocs.pm/?q=<query>" \
| jq '.hits[].document | {package, title, doc}'
Response fields:
package: Package nametitle: Module/function namedoc: Documentation texturl: Path to append tohttps://hexdocs.pm
Version Resolution
# From mix.lock
grep '"<package>"' mix.lock | grep -oE '[0-9]+\.[0-9]+\.[0-9]+'
# Latest from hex.pm
curl -s "https://hex.pm/api/packages/<package>" | jq -r '.releases[0].version'
Key Behaviors
- Prefer local/cached results (version matches project)
- Show real usage examples from project codebase when relevant
- Include file:line references for source code
- Prompt user before fetching external packages
- Source code @moduledoc/@doc often has more detail than HTML docs
Usage Rules Search
Find package-specific best practices and coding conventions from usage-rules.md files.
What Are Usage Rules?
A community convention where packages include a usage-rules.md file with:
- Coding conventions and patterns
- Good/bad code examples (marked
# GOOD,# BAD,# AVOID) - Common mistakes to avoid
- Domain-specific idioms
Search Locations (in order)
- Project deps:
deps/<package>/usage-rules.md - Fetched cache:
.usage-rules/<package>-<version>/usage-rules.md - Fetch if needed: Extract from package (see below)
Packages With Usage Rules
Primarily the Ash ecosystem:
ash,ash_postgres,ash_phoenix,ash_json_api,ash_graphqlspark,igniter,reactor
Most packages (Phoenix, Ecto, etc.) do not have usage-rules.md yet. For those, suggest hex-docs-search skill or official guides.
Fetching Usage Rules
# Fetch package and extract usage-rules.md
mix hex.package fetch <package> <version> --unpack --output .usage-rules/.tmp/<package>-<version>
# If usage-rules.md exists, copy to cache
if [ -f ".usage-rules/.tmp/<package>-<version>/usage-rules.md" ]; then
mkdir -p ".usage-rules/<package>-<version>"
cp ".usage-rules/.tmp/<package>-<version>/usage-rules.md" ".usage-rules/<package>-<version>/"
fi
# Clean up
rm -rf ".usage-rules/.tmp/<package>-<version>"
Mention adding .usage-rules/ to .gitignore once per session when fetching occurs.
Context-Aware Extraction
Usage rules files can be large. Extract relevant sections based on user's question:
| User Context | Look for Sections |
|---|---|
| querying, filters | "Querying", "Filters", "Read Actions" |
| actions, create/update | "Actions", "Changes", "Validations" |
| relationships | "Relationships", "Aggregates" |
| errors, validation | "Error Handling", "Validations" |
| authorization | "Policies", "Authorization" |
| testing | "Testing" |
Find section headings with line numbers, then extract the relevant section content.
Key Behaviors
- Extract relevant sections, don't dump entire file
- Highlight
# GOODvs# BADpatterns explicitly - Note when package doesn't provide usage rules
- Suggest
hex-docs-searchfor API documentation (complementary) - Version awareness: prefer deps/ version over cached
Hooks 2
Sponsors
Details
- Marketplace
- bradleygolden/claude-marketplace-elixir
- Source
- plugins/elixir
- Category
- Community
- License
- MIT
- Keywords
- elixir, erlang, beam, phoenix, ash, credo, dialyzer, sobelow, testing, formatting
