agentleFS
GoldziherGoldziher/basemind/skills/basemind-documents/SKILL.md

basemind-documents

Skill125 starsChanged 47 days agoMITView on GitHub

Semantic search over documents via basemind's RAG store — PDFs, Office, HTML, email, Jupyter notebooks, and images (OCR), with cross-encoder reranking, keyword and named-entity (NER) filters, and per-document summaries. Reach for it whenever the user asks to "search the docs / PDFs", "find where a topic is discussed", or "what does the documentation say about X".

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Prefer docs_search over opening PDFs/Office/HTML by hand.

    line 25

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md
<!-- AI-RULEZ :: GENERATED FILE — DO NOT EDIT Content-Hash: blake3:19efbf649c5065c68c50c19b030b2a19d8a25605b0d73941cfd03a5ee567f8c8 Source-Hash: blake3:607e3840e47d250c023513008342b4e723eff1841b0530d2a109acaf0dc5dbc6 Schema-Version: v1 -->

basemind-documents — document search and memory

basemind extracts PDFs, Office files, spreadsheets, email, HTML and notebooks (and, in a build with OCR, raster images and scanned PDFs) into a LanceDB vector store and answers meaning-based queries with cross-encoder reranking. For exact text in markdown, config and data files use code_grep (see basemind-code-search): semantic results cannot establish that a string is absent.

Prefer docs_search over opening PDFs/Office/HTML by hand. The tools are always loaded: call them directly, no tool search needed. For source code use basemind-code-search instead; this skill is for prose and documents.

Requirements

  • docs_search needs a build with --features documents (or full); memory_save and memory_search need --features memory. Without the feature the tool answers with an error result naming it. The release binary includes both.
  • OCR and entity filtering depend on the binary's build: OCR is the documents-ocr Cargo feature and named-entity recognition is documents-ner. The published binary has both. On a build without OCR, images are not indexed and a scanned PDF (no text layer) is indexed with no text; on a build without NER, an entity filter returns an error, not an empty result.
  • Archives (.zip, .tar, ...) are never extracted, so their contents are not searchable.
  • Documents must be scanned first: basemind scan with the documents feature extracts and embeds them into the machine-global cache (Linux ~/.local/share/basemind/, macOS ~/Library/Application Support/basemind/; override BASEMIND_DATA_HOME). See the basemind-scan skill.

Tool routing

QuestionMCP callCLI
"Search the docs by meaning?"docs_search {"query":"how releases are versioned"}basemind memory documents "how releases are versioned"
"Search Jupyter notebooks by meaning?"docs_search {"query":"…","mime_type":"application/x-ipynb+json"}basemind memory documents "…" --mime-type application/x-ipynb+json
"Filter by file type?"docs_search {"query":"…","mime_type":"application/pdf"}basemind memory documents "…" --mime-type application/pdf
"Narrow to docs naming an entity category?" (needs a build with documents-ner)docs_search {"query":"…","entity":"PERSON"}basemind memory documents "…" --entity PERSON
"Narrow to docs with a keyword?"docs_search {"query":"…","keywords":"rate limit"}basemind memory documents "…" --keywords "rate limit"
"Remember this for future sessions?"memory_save {"key":"decision/auth-tokens","value":"Tokens rotate every 24h.","tags":["auth"]}basemind memory put decision/auth-tokens "Tokens rotate every 24h." --tag auth
"Recall a note by meaning?"memory_search {"query":"token rotation"}basemind memory search "token rotation"
"Read one note by key?"memory_search {"key":"decision/auth-tokens"}basemind memory get decision/auth-tokens
"List notes under a key prefix?"memory_search {"prefix":"decision/"}basemind memory list --prefix decision/
"Delete a note?"CLI onlybasemind memory delete decision/auth-tokens

What a hit carries

docs_search returns passage hits. Each carries its path (and also_at, other paths holding the same content), mime_type, the document title when it has one, chunk (which chunks of the document), cite (pages, section heading trail, source lines and byte range, each when the format has it), the matched text with its neighbouring chunks (context), the fused score, its rank in each lane (lanes) and, when the reranker scored it, rerank_score. The page reports lanes_ran, lanes_unavailable with the reason, and rerank. entity and keywords keep the documents whose parent carries a matching entity category or keyword (AND-combined when both are set); format filters by document format and path by a glob over document paths.

Examples

docs_search {"query":"how is the index schema versioned","limit":5}
→ {"query":"how is the index schema versioned",
   "hits":[{"path":"docs/ARCHITECTURE.md","mime_type":"text/markdown",
            "cite":{"section":["Index"],"line_start":120,"line_end":134,…},
            "text":"…","score":0.03,"rerank_score":0.91,…}, …],
   "lanes_ran":["vector","lexical"],…}

docs_search {"query":"…","format":"pdf","path":"docs/**"}

Notes

  • memory_search takes one selector: query (by meaning, ranked, no cursor), key (one note) or prefix (list by key prefix); with none it lists everything. tags (any of them) filters a search or a list. A list pages by next_cursor; truncated with truncated_reason: "scan_cap" means its total stopped counting and is a lower bound. Saving an existing key replaces the note.
  • Memory is one store per repository, keyed by the path of its main worktree: its worktrees share notes (per worktree when it has no origin); another clone, a moved repository or an origin that normalises differently does not see them, and a re-clone at the same path with the same origin does. "visibility":"individual" keeps a note to this agent.
  • docs_search returns 10 hits by default; lists take limit and page with next_cursor -> cursor. An argument a tool does not take is rejected with a did-you-mean and the accepted list.

For code structure see basemind-code-search; for git history see basemind-git-history; for agent coordination see basemind-comms.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.