ctx-index
What it does
This skill adds local project files to context-mode's search index so they can be searched quickly later. It is for developers who want an assistant to answer questions about a codebase without rereading it each time.
When to use it
- ✓When a developer wants an assistant to search a project's code and docs later.
- ✓When a large repository needs to be indexed once so future searches stay fast.
- ✓When documentation for a project should be searchable under a clear label.
Skill link
https://github.com/mksglu/context-mode/blob/main/skills/ctx-index/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Index this project folder so I can search its code later.”
5 new skills a week. 1 minute to read.
How it works
The skill indexes the chosen folder by path, using limits on depth and file count to keep it manageable. It then reports the label and file count and shows the search command to use later.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Context Mode Index
Index local project content for later search.
Instructions
- Prefer the
ctx_indexMCP tool when it is available. - Ask for a path only if the user did not provide one and the current project root is ambiguous.
- Use
path, not large inlinecontent, so file bytes do not enter the conversation. - For repository indexing, pass conservative bounds and a clear source label:
ctx_index({
path: ".",
source: "project:<name>",
maxDepth: 5,
maxFiles: 200
})
- If MCP tools are unavailable, fall back to the CLI:
context-mode index . --source project:<name>
- 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
--excludeorexcludefor project-specific noisy paths. - For broad repos, ask the user before raising
maxFilesabove 500.
FAQ
What should not be indexed?
Dependency folders, build outputs, secrets and generated files should be left out.
Is there a limit on files?
Yes. For broad repositories, the skill asks before raising the file limit above 500.
How do I search after indexing?
Use the search skill with the same source label to find snippets from the indexed content.
Details
Original description by the author
Index a local file or directory into context-mode's persistent FTS5 knowledge base so future ctx_search calls can retrieve focused snippets without rereading raw files. Trigger: /context-mode:ctx-index
repo: mksglu/context-mode
Popularity
- GitHub stars
- 33k
- Ranking position
- #8512
- License
- —
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
context-mode
33kTeaches your agent to use context-mode tools for reading, searching and running data-heavy tasks, so large outputs stay out of the main conversation.
context-mode
33kTeaches your agent to run data-heavy work in a sandbox and print only the answer, so raw files and web pages do not flood the conversation.
context-mode
33kTeaches your agent to use context-mode tools instead of plain shell commands when output may be large, such as logs, JSON or build results.
ctx-doctor
33kRuns context-mode diagnostics that check runtimes, hooks, search storage, plugin setup and versions, then shows a clear pass or fail report.
Similar skills
add-model-provider
394kLets your agent connect a new AI model provider to OpenClaw using safe setup commands, keep API keys out of plain text, and run a live test.
acp-router
394kHelps your agent send a task to a coding assistant such as Claude Code or Cursor through OpenClaw, so the work runs in that tool.
browser-automation
394kTeaches your agent to control web pages step by step, including logins, tabs, and recovery when a page stops responding.