Context Mode Search

SkillSearch

ctx-search is a skill that searches a persistent FTS5 knowledge base of previously indexed local project content, documentation, and session memory. It lets an agent find answers in material that was already indexed instead of rereading raw sources into the conversation. The skill batches related queries, scopes results to a named source, and falls back to a CLI command when the search tool is unavailable.

Then ask your AI: use the Context Mode Search skill

Details

Instructions available. Your AI can read the instructions. Execution depends on the setup they require.

Make sure the content you want to search has been indexed first.

What your AI can do with it

  • Search indexed local project content, documentation, and session memory
  • Batch related questions in one queries array
  • Scope results to a named source such as project:<name>
  • Use short queries of two to four technical terms
  • Fall back to the context-mode search CLI when MCP tools are unavailable
  • Report an empty index and point to the indexing step

Getting started

  1. Make sure the content you want to search has been indexed first.
  2. If nothing is indexed yet, run /context-mode:ctx-index or context-mode index <path>.
  3. Invoke the skill with /context-mode:ctx-search.
  4. Provide short, specific queries of two to four technical terms.
  5. Add a source label when you want results scoped to a named project or index.

What this skill tells your AI

The instructions your AI receives, as published by mksglu/context-mode in skills/ctx-search/SKILL.md and read by Ahel’s review.

Search indexed content without rereading raw sources into conversation context.

Instructions

  1. Prefer the ctx_search MCP tool when it is available.
  2. Batch all related questions in one queries array.
  3. Scope with source when the user names a project or indexed label.
  4. Use short, specific queries of two to four technical terms.
ctx_search({
  source: "project:<name>",
  queries: ["authentication middleware", "token refresh"],
  limit: 5
})
  1. If MCP tools are unavailable, fall back to the CLI:
context-mode search "authentication middleware" --source project:<name> --limit 5
  1. If the index is empty, tell the user to run /context-mode:ctx-index or context-mode index <path> first.

Signals

GitHub stars
26k
Forks
2k
Last commit
Oct 2026

Questions

What happens if nothing is indexed yet?
The skill tells the user to index a path first, by running /context-mode:ctx-index or context-mode index <path>.
What if the search tool is unavailable?
It falls back to the CLI command context-mode search, for example context-mode search "authentication middleware" --source project:<name> --limit 5.
How should queries be written?
Use short, specific queries of two to four technical terms, and batch all related questions in one queries array.
Can results be limited to one project?
Yes. Scope with source when the user names a project or indexed label, such as source: "project:<name>".
Advanced
Item type
skill
Key
ctx-search
Source
github.com/mksglu/context-mode