mcpField
C
ctx-index

ctx-index

github.com/mksgluAgent workflows32.7k1.1k installsUpdated today
Repository

About ctx-index

ctx-index is a skill for indexing local project content for later search, using the `ctx_index` MCP tool or the `context-mode` CLI. It guides safe indexing with file and depth limits, exclusions for noisy or sensitive paths, and reporting of the indexed source and counts.

Key features

  1. 01Index local project content
  2. 02Prefer the `ctx_index` MCP tool
  3. 03Fall back to the CLI
  4. 04Set bounds and exclude paths
  5. 05Report source and indexed counts

Use cases

  1. 01Prepare a repository for later searches
  2. 02Avoid indexing secrets or generated files

MCP support

Prefers the `ctx_index` MCP tool to index a path; if MCP tools are unavailable, it uses the `context-mode index` CLI command.

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/mksglu/context-mode --skill ctx-index

After installing, type/ctx-indexin Claude Code to confirm it loaded.

Details

From the project README

Context Mode Index

Index local project content for later search.

Instructions

  1. Prefer the ctx_index MCP tool when it is available.
  2. Ask for a path only if the user did not provide one and the current project root is ambiguous.
  3. Use path, not large inline content, so file bytes do not enter the conversation.
  4. For repository indexing, pass conservative bounds and a clear source label:
ctx_index({
  path: ".",
  source: "project:<name>",
  maxDepth: 5,
  maxFiles: 200
})
  1. If MCP tools are unavailable, fall back to the CLI:
context-mode index . --source project:<name>
  1. Report the indexed source label, file count or section count, and the matching search command:
ctx_search({ source: "project:<name>", queries: ["..."] })

Safety

  • Do not index dependency directories, build outputs, secrets, or generated artifacts.
  • Prefer --exclude or exclude for project-specific noisy paths.
  • For broad repos, ask the user before raising maxFiles above 500.

Comments

Markdown supported