Hex Documentation Search

VerifiedCaution

Search Elixir package documentation with local-first approach, automatic fetching, and source code access. Find module/function docs, usage examples, and integration patterns for Hex packages.

Sby Skills Guide Bot
DocumentationIntermediate
3/9/2026
Claude Code
#elixir#hex#documentation-search#dependencies#codebase-research

Recommended for

Automated summary

Researches Elixir/Hex package documentation (Sobelow, Phoenix, Ecto, Credo, Ash, etc.) by checking local project sources first and fetching missing docs when needed.

Strengths

  • Explicit search order: source in deps/, local caches, the HexDocs API, then web search as a last resort
  • Resolves the version from mix.lock or hex.pm so documentation matches what the project actually uses
  • Queries the Typesense API at search.hexdocs.pm with per-package filters via curl and jq
  • Cites file:line references and pulls real usage examples from the project codebase

Limitations

  • Scoped to the Elixir/Hex ecosystem only
  • Requires network access plus curl and jq for the API and package downloads
  • Asks for confirmation before each external fetch, which adds extra round-trips
When to use it

Use it when you need accurate docs for an Elixir dependency at the exact version your project locks.

When not to use it

Avoid it for non-Elixir packages or for design questions that no existing library documentation can answer.

Security analysis

Caution
Quality score85/100

The skill is a legitimate documentation-research helper. Its Bash usage is limited to standard Mix/Hex fetch commands and read-only HTTPS queries against HexDocs/hex.pm, with no eval, no pipe-to-shell of remote content, and no access to credentials or sensitive paths beyond normal project files. The only real risk surface is that it pulls and unpacks untrusted package source into the workspace and encourages network use, so it warrants 'caution' rather than 'safe' — but nothing here is malicious or destructive.

Findings
  • •Uses Bash to run network-fetching commands (`mix hex.docs fetch`, `mix hex.package fetch --unpack`, `curl` to search.hexdocs.pm and hex.pm) and writes third-party package source/docs into the working directory (`.hex-docs/`, `.hex-packages/`)
  • •Downloads and unpacks arbitrary third-party package tarballs into the project without mentioning checksum/signature verification or pinned-version review
  • •Overrides HEX_HOME to a project-local path, which is reasonable but could shadow a user's configured Hex environment
  • •No destructive, obfuscated, or secret-exfiltrating behavior; curl output is piped to jq for parsing only, not executed
How this analysis is made

Examples

Ecto query docs
How do I build a dynamic where clause with Ecto.Query? Check the Ecto version in my mix.lock and show me the relevant function docs.
Sobelow config
Search the Sobelow docs for how to skip specific checks in .sobelow-conf and show me a concrete example.
Phoenix integration pattern
Find out how Ash integrates with Phoenix controllers — look in deps/ first, and fetch the Ash docs only if they're missing.

name: hex-docs-search description: 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. allowed-tools: Read, Grep, Glob, Bash, WebSearch, AskUserQuestion model: haiku context: fork agent: Explore user-invocable: true

Hex Documentation Search

Search Elixir package documentation. Prioritize local sources, fetch if needed.

Search Locations (in order)

  1. Project deps: deps/<package>/lib/ (source with @moduledoc/@doc), deps/<package>/doc/ (HTML if generated)
  2. Fetched docs cache: .hex-docs/docs/hexpm/<package>/<version>/
  3. Fetched source cache: .hex-packages/<package>-<version>/
  4. HexDocs API: Programmatic search (see below)
  5. 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 name
  • title: Module/function name
  • doc: Documentation text
  • url: Path to append to https://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

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/hex-documentation-search-mmio7130/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/hex-documentation-search-mmio7130' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/hex-documentation-search-mmio7130/download' --output '.skill-downloads/hex-documentation-search-mmio7130/SKILL.md.part' && mv '.skill-downloads/hex-documentation-search-mmio7130/SKILL.md.part' '.skill-downloads/hex-documentation-search-mmio7130/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Tools declared by the author (check availability in your agent): Read, Grep, Glob, Bash, WebSearch, AskUserQuestion

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/hex-documentation-search-mmio7130/SKILL.md' && test -s '.skill-downloads/hex-documentation-search-mmio7130/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/hex-docs-search' && cp -R '.skill-downloads/hex-documentation-search-mmio7130' '.claude/skills/hex-docs-search'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/hex-documentation-search-mmio7130'

openskills read 'hex-documentation-search-mmio7130'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/hex-documentation-search-mmio7130/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills