Context Mode Index
SkillFiles & storagectx-index is a skill that indexes a local file or directory into context-mode's persistent FTS5 knowledge base. Once content is indexed, later ctx_search calls can pull focused snippets from it instead of rereading the raw files. It is meant for people who want an AI agent to search project content without loading whole files into the conversation.
Then ask your AI: use the Context Mode Index skill
Details
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; Ahel provides instructions and does not run this skill.
No other account needed.
Have context-mode available, either through its MCP tools or its CLI.
What your AI can do with it
- Index a local file or directory into the FTS5 knowledge base
- Use the ctx_index MCP tool when it is available
- Fall back to the context-mode index CLI when MCP tools are unavailable
- Index a repository with bounds such as maxDepth and maxFiles
- Attach a source label so ctx_search can target the indexed content
- Exclude noisy paths with --exclude or exclude
Getting started
- Have context-mode available, either through its MCP tools or its CLI.
- Choose the file or directory to index and a source label such as project:<name>.
- Run ctx_index with the path and source, or run context-mode index . --source project:<name> if MCP tools are unavailable.
- For a repository, set conservative bounds like maxDepth 5 and maxFiles 200, and ask before raising maxFiles above 500.
- Use ctx_search with the same source label to retrieve focused snippets.
What this skill tells your AI
The instructions your AI receives, as published by mksglu/context-mode in skills/ctx-index/SKILL.md and read by Ahel’s review.
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.
Signals
- GitHub stars
- 26k
- Forks
- 2k
- Last commit
- Oct 2026
Questions
- What does ctx-index do?
- It indexes a local file or directory into context-mode's persistent FTS5 knowledge base. Future ctx_search calls can then retrieve focused snippets from that content without rereading the raw files.
- How do I trigger it?
- Use the trigger /context-mode:ctx-index. The skill then prefers the ctx_index MCP tool when it is available.
- What should I avoid indexing?
- Do not index dependency directories, build outputs, secrets, or generated artifacts. Use --exclude or exclude for project-specific noisy paths.
Advanced
- Item type
- skill
- Key
ctx-index- Source
- github.com/mksglu/context-mode
github.com/mksglu/context-mode
Related picks
Skill · thedaviddias
The pick for JavaScriptmodern-javascript-patterns
Skill · sickn33
The pick for JavaScriptpptx
Skill · anthropics
More in Files & storagedocx
Skill · anthropics
More in Files & storageresearch
Skill · mattpocock
More in Files & storageto-tickets
Skill · mattpocock
More in Files & storage