ctx-search

Search indexed project content and session memory in a persistent FTS5 knowledge base.

20.3k|1.5k|Updated Feb 23, 2026
One-click install
npx skills add https://github.com/mksglu/context-mode --skill ctx-search
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ctx-search
Source: https://github.com/mksglu/context-mode/tree/main/skills/ctx-search
Command: npx skills add https://github.com/mksglu/context-mode --skill ctx-search

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Repeatedly rereading raw source files and documentation into conversation context wastes tokens and slows down AI-assisted work. This Skill queries a persistent FTS5 index of previously indexed local projects, documentation, and session memory so answers come from the index instead of reloading raw sources.

Core Features & Use Cases

  • Indexed Full-Text Search: Query the context-mode FTS5 knowledge base via the ctx_search MCP tool or the context-mode search CLI fallback.
  • Scoped and Batched Queries: Scope searches with source labels like project:<name> and batch multiple related questions in a single queries array.
  • Use Case: While working on a large codebase, ask how authentication middleware and token refresh are implemented; the Skill returns relevant indexed snippets without rereading the entire source tree into context.

Quick Start

Ask the assistant to search the context-mode index for how authentication middleware works in your project.

Frequently Asked Questions about ctx-search

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search indexed project content with context-mode?

Use the ctx_search MCP tool with a queries array of short two-to-four-term phrases, optionally scoped with a source like project:<name>. If MCP tools are unavailable, run context-mode search "your query" --source project:<name> --limit 5 from the CLI.

What is the ctx_search MCP tool used for?

The ctx_search MCP tool queries context-mode's persistent FTS5 knowledge base for previously indexed local project content, documentation, or session memory. It returns relevant snippets without rereading raw source files into the conversation.

Can I search multiple questions at once in context-mode?

Yes, batch all related questions in a single queries array passed to ctx_search. This retrieves answers for multiple topics in one call instead of issuing separate searches.

Why does context-mode search return no results?

Empty results usually mean the index has not been built yet. Run /context-mode:ctx-index or context-mode index <path> first to index your project content before searching.

Does ctx-search work without MCP tools available?

Yes, it falls back to the context-mode CLI. Run context-mode search with your query string, plus optional --source and --limit flags to scope and size the results.