# Hexdocs Fetcher

Fetch HexDocs for Elixir libraries with HTML-to-markdown conversion.

- Repository: https://github.com/oliver-kriska/claude-elixir-phoenix (572 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-10-30
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add oliver-kriska/claude-elixir-phoenix --skill hexdocs-fetcher -g -a claude-code -y`
Codex: `npx skills add oliver-kriska/claude-elixir-phoenix --skill hexdocs-fetcher -g -a codex -y`
Cursor: `npx skills add oliver-kriska/claude-elixir-phoenix --skill hexdocs-fetcher -g -a cursor -y`
Gemini CLI: `npx skills add oliver-kriska/claude-elixir-phoenix --skill hexdocs-fetcher -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add oliver-kriska/claude-elixir-phoenix`

## Description

Fetch HexDocs for Elixir libraries with HTML-to-markdown conversion. Use when looking up docs on hexdocs.pm, modules, functions, guides, changelogs.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# HexDocs Fetcher

Efficiently fetch Elixir library documentation from hexdocs.pm using Claude Code's native `WebFetch` tool.

## Usage

When researching libraries, use `WebFetch`:

```
# Fetch library overview
WebFetch(
  url: "https://hexdocs.pm/oban",
  prompt: "Extract the main documentation, including module overview, installation instructions, and key functions. Format as clean markdown."
)

# Fetch specific module docs
WebFetch(
  url: "https://hexdocs.pm/phoenix_live_view/Phoenix.LiveView.html",
  prompt: "Extract the module documentation including all public functions, their specs, and examples."
)

# Fetch getting started guide
WebFetch(
  url: "https://hexdocs.pm/ecto/getting-started.html",
  prompt: "Extract the complete getting started guide content."
)
```

## Token Efficiency

WebFetch automatically converts HTML to markdown and extracts relevant content:

| Source | Raw HTML | With WebFetch | Benefit |
|--------|----------|---------------|---------|
| HexDocs page | ~80k tokens | ~15k tokens | **80% reduction** |
| Phoenix docs | ~120k tokens | ~25k tokens | **79% reduction** |
| README | ~20k tokens | ~8k tokens | **60% reduction** |

## Integration with hex-library-researcher

When evaluating libraries, fetch docs efficiently:

```
# Get library overview with focused extraction
WebFetch(
  url: "https://hexdocs.pm/oban",
  prompt: "Extract: 1) Installation instructions 2) Main features 3) Basic usage example"
)
```

## Common HexDocs URLs

```
# Library overview
https://hexdocs.pm/{library}

# Module documentation
https://hexdocs.pm/{library}/{Module}.html
https://hexdocs.pm/{library}/{Module.Submodule}.html

# Guides
https://hexdocs.pm/{library}/guides.html
https://hexdocs.pm/{library}/{guide-name}.html

# API reference
https://hexdocs.pm/{library}/api-reference.html
```

## Prompt Strategies

Use focused prompts for better extraction:

```
# For API docs
prompt: "Extract all public function docs with @spec and examples"

The rest: https://github.com/oliver-kriska/claude-elixir-phoenix/blob/HEAD/plugins/elixir-phoenix/skills/hexdocs-fetcher/SKILL.md
