search-hexdocs
Search Hex package documentation for Elixir/Erlang.
When & Why to Use This Skill
This Claude skill provides a seamless interface to search hexdocs.pm, the primary documentation repository for Elixir and Erlang packages. It enables developers to instantly retrieve function signatures, module guides, and implementation examples directly within their workflow, significantly reducing context switching and accelerating the development process for the BEAM ecosystem.
Use Cases
- API Reference Lookup: Quickly find function definitions, callbacks, and parameter details for specific Elixir modules like GenServer, Ecto, or Phoenix.
- Cross-Package Discovery: Search across multiple Hex packages simultaneously to find relevant hooks or library integrations for complex projects.
- Debugging & Troubleshooting: Retrieve precise documentation snippets to verify API contracts and error handling behaviors when resolving library-specific bugs.
- AI-Assisted Coding: Provide the AI agent with up-to-date documentation context to ensure generated Elixir or Erlang code follows the latest best practices and library versions.
| name | search-hexdocs |
|---|---|
| description | Search Hex package documentation for Elixir/Erlang. |
| compatibility | Requires Node.js 18+. Run `npm install` in {baseDir}/scripts first. |
Search hexdocs
Search hexdocs.pm documentation.
Usage
{baseDir}/scripts/hexdocs.js <QUERY> [OPTIONS]
Examples
# Search all packages
{baseDir}/scripts/hexdocs.js "GenServer callbacks"
# Filter by package
{baseDir}/scripts/hexdocs.js "Ecto.Query" --packages ecto
# Multiple packages
{baseDir}/scripts/hexdocs.js "LiveView hooks" --packages phoenix_live_view,phoenix
# Limit results
{baseDir}/scripts/hexdocs.js "plug conn" --limit 5
# JSON output
{baseDir}/scripts/hexdocs.js "json encode" --packages jason --json
Output Format
Results: 42 (showing 10)
<result index="0" package="phoenix" ref="Phoenix.Controller.html#json/2" title="json/2">
Sends JSON response...
</result>