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
- Install Context Mode with the Claude Code plugin steps from the README.
- Run
/context-mode:ctx-indexand give it the path to a local docs folder. - Run
/context-mode:ctx-searchwith a question about the docs. - Check that the returned passage comes from the indexed files.
- Run
/context-mode:ctx-purgewhen 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.
Get 5 new use cases every morning. Free, one short email, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Disclaimer
Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page