Docmancer
ResearchdocmancerDocmancer is an Agent Skill for research published in the docmancer/docmancer repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Search and query local documentation knowledge bases using docmancer CLI. Use when the user asks about third-party library docs, API references, vendor documentation, version-specific API behavior, GitBook or Mintlify public docs, offline or local doc search, or needs to ground agent responses in up-to-date external documentation.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/docmancer/docmancer/blob/HEAD/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/docmancer, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
docmancer
Docmancer compresses documentation context so coding agents spend tokens on code, not on rereading raw docs. It ingests local files, fetches public docs, indexes everything locally with SQLite FTS5, and returns compact context packs with source attribution. The core retrieval path needs no API keys, vector database, hosted query API, or background daemon.
MIT open source. The CLI runs locally and is intended for source-grounded documentation lookup.
When to Use
- User asks about a third-party library, SDK, or API and you need accurate documentation.
- User references docs from a public site, GitHub repository, or local files.
- You need to verify version-specific API behavior or exact method signatures.
- User asks you to search or query previously indexed documentation.
Workflow
- Check indexed docs:
docmancer list - Query existing docs:
docmancer query "<question>" - Index local docs if needed:
docmancer ingest <path> - Fetch URL docs if needed:
docmancer add <url> - Use the returned context to ground your response with source-attributed sections.
Core Commands
Ingest Local Documentation
docmancer ingest ./docs
Use ingest for local files and directories.
| Flag | Purpose |
|---|---|
--include <glob> | Include only matching relative paths |
--exclude <glob> | Exclude matching relative paths |
--format <format> | Restrict to formats such as md, txt, pdf, docx, rtf, or html |
--recursive / --no-recursive | Recurse through directories |
--skip-known | Skip files whose content hash is already indexed |
--recreate | Drop and rebuild the index |
Add URL Documentation
docmancer add https://docs.example.com
Use add for documentation URLs and GitHub repositories.
| Flag | Purpose |
|---|---|
--provider <auto|gitbook|mintlify|web|github> | Force a specific provider |
--strategy <strategy> | Force discovery strategy |
--max-pages <n> | Cap pages fetched |
--browser | Playwright fallback for JS-heavy sites |
--recreate | Drop and rebuild the index |
Query Documentation
docmancer query "<question>"
Returns a compact markdown context pack with source attribution and token savings. This is the primary command agents should call.
| Flag | Purpose |
|---|---|
--budget <n> | Max estimated output tokens |
--limit <n> | Max sections to return |
--expand | Include adjacent sections around matches |
--expand page | Include full page content within budget |
--format <markdown|json> | Output format |
Manage Sources
| Command | Purpose |
|---|---|
docmancer list | Show indexed documentation sources |
docmancer list --all | Show every stored page or file |
docmancer inspect | Show index stats, format counts, and extract locations |
docmancer remove <source> | Remove a source or docset root |
docmancer remove --all | Clear the entire index |
docmancer update [source] | Re-fetch and re-index all sources, or one specific source |
docmancer doctor | Check config, loader availability, index health, and agent skill installs |
docmancer init | Create project-local docmancer.yaml |
docmancer fetch <url> --output <dir> | Download docs to markdown files without indexing |
Common Mistakes
- Do not use
docmancer addfor new local files. Usedocmancer ingest <path>. - Do not use
docmancer ingestfor URLs. Usedocmancer add <url>. - Do not run
docmancer querybefore checking indexed sources withdocmancer list. - Do not assume docs are indexed. Always verify with
docmancer listbefore querying.