DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to index a local docs folder and search it from the chat with Context Mode

Add a local file or folder to the FTS5 knowledge base and query it later.

Short answer: Install Context Mode with the Claude Code plugin steps from the README; then run /context-mode:ctx-index and give it the path to a local docs folder; run /context-mode:ctx-search with a question about the docs. All steps.

Who it is forA developer who wants the agent to search project docs or notes without pasting them into each prompt.

The problemReference material pasted into the chat takes up context on every turn and is lost when the session ends.

The outcomeThe docs are stored in the persistent FTS5 knowledge base and returned by search results when relevant.

What you need first

  • Claude Code v1.0.33+ for the plugin install, or Node.js >= 22.5 (or Bun) for the Gemini CLI setup
  • An existing AI coding agent session in a project you want to work on

Steps

  1. Install Context Mode with the Claude Code plugin steps from the README.
  2. Run /context-mode:ctx-index and give it the path to a local docs folder.
  3. Run /context-mode:ctx-search with a question about the docs.
  4. Check that the returned passage comes from the indexed files.
  5. Run /context-mode:ctx-purge when you no longer need the indexed content, since it deletes everything in the knowledge base.

Prompt for your agent

Index the folder <docs-path> with the context-mode ctx-index command, then search it with ctx-search for <question>. Return the matching passages with their source file names and confirm that each passage appears in the original file.

Caveat. ctx-purge permanently deletes all indexed content, not just one folder, so use it only when you want a full reset.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for mksglu/context-mode and "Index a local docs folder and search it from the chat"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer