agentsclimarketplace

Docsearch

Skill thevgergroup/mad-skills/skills/docsearch

Semantic search over a local document archive (PDFs, Word, PowerPoint, Excel, Markdown). Uses ChromaDB + any OpenAI-compatible embeddings endpoint.From its SKILL.md

Install
npx -y skills add thevgergroup/mad-skills --skill docsearch

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

4.3 KB, as published. Nobody here has run it

docsearch

Semantic search over a local directory of documents. Indexes into ChromaDB using any OpenAI-compatible embeddings endpoint (LM Studio, Ollama, OpenAI, etc.) and supports incremental re-sync via content hashing.

Supported formats: .docx, .pptx, .pdf, .xlsx, .xlsm, .md, .txt, .csv

Companion documents

TopicFile
Embedding backend options (LM Studio, Ollama, OpenAI, remote)embeddings.md
Troubleshooting install issues, venv setup, platform quirkssetup.md

Configuration

All configuration is via environment variables — no config files to edit.

VariableDefaultPurpose
DOCSEARCH_DIR(required)Root directory to index and search
DOCSEARCH_DB~/.docsearch/chroma_dbChromaDB storage path
DOCSEARCH_COLLECTION(derived from dir name)Override the collection name
DOCSEARCH_EMBED_URLhttp://localhost:1234/v1/embeddingsEmbeddings endpoint
DOCSEARCH_EMBED_MODELtext-embedding-nomic-embed-text-v1.5Model name
DOCSEARCH_EMBED_KEYlmstudioAPI key
DOCSEARCH_EMBED_DIM768Embedding dimensions
DOCSEARCH_PYTHON(python3 on PATH)Override Python interpreter

Set these in your shell profile (.zshrc, .bashrc) or pass them inline.

Commands

Search

docsearch search "QUERY" [--top N] [--filter KEY=VALUE ...]

Filters use path-depth metadata extracted at index time:

  • --filter depth_1=customers — top-level subdirectory
  • --filter depth_2=acme_corp — second-level subdirectory
  • --filter extension=.pdf — file type

Output: JSON when piped (for agent use), human-readable when run in a terminal.

Index

docsearch index [--dir PATH] [--force]

Incremental by default — only processes new or changed files. --force rebuilds from scratch.

Show index stats

docsearch info

Check configuration

docsearch config

Running as an agent

When calling docsearch from a Bash tool, the output is JSON:

[
  {
    "rank": 1,
    "score": 0.87,
    "file": "/path/to/document.pdf",
    "filename": "document.pdf",
    "relative_path": "customers/acme/proposal.pdf",
    "type": ".pdf",
    "depth_1": "customers",
    "depth_2": "acme",
    "preview": "..."
  }
]

After finding a document:

  • .md, .txt, .csv — read directly with the Read tool
  • .docx, .pptx, .pdf, .xlsx — show the path to the user or open with open "FILE_PATH"

Installation

1. Python packages

pip install chromadb requests python-docx python-pptx pypdfium2 openpyxl

Requires Python 3.10+. Install into a venv if preferred.

2. Embeddings server — any OpenAI-compatible endpoint must be running when you index or search.

BackendDefault URLQuick start
LM Studiohttp://localhost:1234/v1/embeddingsLoad a nomic-embed-text model in the app
Ollamahttp://localhost:11434/v1/embeddingsollama pull nomic-embed-text
OpenAIhttps://api.openai.com/v1/embeddingsSet DOCSEARCH_EMBED_KEY=sk-... and DOCSEARCH_EMBED_MODEL=text-embedding-3-small

3. Make the script accessible — pick one approach:

# Symlink onto PATH
ln -s /path/to/mad-skills/skills/docsearch/scripts/docsearch.sh ~/.local/bin/docsearch

# Or call directly
python3 /path/to/mad-skills/skills/docsearch/scripts/docsearch.py search "query"

4. Set required env var and index

export DOCSEARCH_DIR="$HOME/Documents/my-docs"
docsearch index   # walks DOCSEARCH_DIR, builds ChromaDB index
docsearch info    # verify

See setup.md for venv setup, troubleshooting, and platform-specific notes. See embeddings.md for full backend configuration options.

Notes

  • The embeddings server must be running when you index or search
  • iCloud-evicted files (.icloud placeholders) are automatically skipped
  • Re-indexing is safe to run at any time — unchanged files are skipped
  • Each indexed directory gets its own ChromaDB collection (isolated namespaces)

Keep looking

Skills are one crate of 607,533. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.