From chonkie-skills
Use Mandex (mx) to search and manage offline documentation packages for AI agents. Covers pulling docs from CDN, full-text search with BM25 + optional ONNX semantic reranking, building custom .mandex packages from markdown, project-level dependency sync, and multi-agent integration (Claude Code, Cursor, Codex). Use when: looking up library documentation offline, building searchable doc packages, setting up documentation for coding agents, or searching across project dependencies.
How this skill is triggered — by the user, by Claude, or both
Slash command
/chonkie-skills:mandexThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Mandex (`mx`) is a package registry for documentation designed for AI coding agents. It distributes searchable documentation packages that download once and query locally with zero rate limits and sub-millisecond latency.
Mandex (mx) is a package registry for documentation designed for AI coding agents. It distributes searchable documentation packages that download once and query locally with zero rate limits and sub-millisecond latency.
Use this skill when users want to:
# Recommended: With Cargo
cargo install mandex
# Build from source
git clone https://github.com/chonkie-inc/mandex.git
cd mandex && cargo build --release
The binary is named mx. Verify with mx --help.
# Download latest version
mx pull pytorch
mx pull nextjs
mx pull fastapi
# Specific version
mx pull [email protected]
# Multiple packages
mx pull pytorch numpy pandas
Packages are cached at ~/.mandex/cache/{name}/{version}.db and shared across all projects.
# Search within a specific package
mx search pytorch "attention mechanism"
mx search nextjs "server components caching"
mx search fastapi "dependency injection"
# Search across ALL installed packages
mx search "state management"
# Control result count
mx search pytorch "loss functions" -n 5
# Force semantic reranking (ONNX cross-encoder)
mx search pytorch "attention" --rerank
# Disable reranking (raw BM25 only)
mx search pytorch "attention" --no-rerank
Search uses SQLite FTS5 with Porter stemming. Optional ONNX reranking downloads a cross-encoder model on first use for semantic re-scoring of BM25 candidates.
# Exact entry lookup
mx show pytorch "MultiheadAttention"
mx show fastapi "Depends"
# Falls back to FTS5 search if no exact match
mx show nextjs "middleware"
mx list
# Output:
# fastapi 0.135.1
# nextjs 14.2.0
# pytorch 2.3.0
mx info pytorch
# Output:
# Name: pytorch
# Version: 2.3.0
# Entries: 1,234
# Size: 4.2 MB
mx remove pytorch
mx remove pytorch --version 2.2.0 # Remove specific version only
cd my-project/
mx sync
Scans package.json, requirements.txt, pyproject.toml, and Cargo.toml to detect dependencies. Downloads matching documentation packages and creates a merged search index.
Creates .mandex/manifest.json and .mandex/index.db in the project root.
# Build from a docs directory
mx build ./docs --name mylib --version 1.0.0
# Output: [email protected] (zstd-compressed SQLite)
Build process:
.md, .mdx, .markdown files# heading as entry name (falls back to filename)## headings into sectionsCompatible with Docusaurus, MkDocs, Mintlify, Sphinx markdown, plain markdown, and MDX.
mx init
# Interactive setup for:
# - Claude Code skill
# - Cursor rules
# - Windsurf instructions
# - Codex agent instructions
ai-sdk, astro, better-auth, claude-code, drizzle-orm, express, fumadocs, hono, langchain-js, mongodb, nextjs, openclaw, opencode, playwright, prisma, react, shadcn-ui, supabase, svelte, tailwindcss, trpc, vite, vue, zod
django, fastapi, flask, langchain, langgraph, numpy, pandas, pydantic, requests, scipy, sqlalchemy, transformers
mandex
Config file at ~/.mandex/config.toml:
[search]
results = 10 # Results per query
rerank = true # Enable ONNX semantic reranking
rerank_candidates = 20 # BM25 candidates before reranking
[network]
cdn_url = "https://cdn.mandex.dev/v1"
api_url = "https://api.mandex.dev"
[display]
color = "auto" # "auto" | "always" | "never"
Environment variable overrides: MX_SEARCH_RESULTS=20, MX_SEARCH_RERANK=false, MX_NETWORK_CDN_URL=..., etc.
Per-project manifest at .mandex/manifest.json:
{
"packages": {
"pytorch": "2.3.0",
"nextjs": "14.2.0",
"fastapi": "0.135.1"
}
}
After mx sync, the merged project index at .mandex/index.db enables fast cross-package search scoped to the project's dependencies.
Performance:
See references/search_tips.md for query optimization guidance.
Searches MemPalace before answering questions about past work, people, projects, or prior decisions. Returns verbatim stored content instead of guessing from model memory.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Guides Payload CMS config (payload.config.ts), collections, fields, hooks, access control, APIs. Debugs validation errors, security, relationships, queries, transactions, hook behavior.
npx claudepluginhub chonkie-inc/skills --plugin mandex