
ctx-index
Index a local file or directory into context-mode's persistent FTS5 knowledge base so future ctxsearch calls can retrieve focused snippets without rereading raw files. Trigger: /context-mode:ctx-index
- Installs
- 1.1K
- Last 24h
- +15
- Trending rank
- #7016
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/mksglu/context-mode --skill ctx-index- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads ctx-index automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
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 does the ctx-index skill do?
Index a local file or directory into context-mode's persistent FTS5 knowledge base so future ctxsearch calls can retrieve focused snippets without rereading raw files. Trigger: /context-mode:ctx-index
How do I install ctx-index?
Run npx skills add https://github.com/mksglu/context-mode --skill ctx-index in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/ctx-index/ (personal) or .claude/skills/ctx-index/ (project).
Which AI agents can use ctx-index?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is ctx-index safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains ctx-index?
It is published by mksglu in mksglu/context-mode. It has 1,123 recorded installs.
More from mksglu/context-mode
context-mode
mksglu/context-mode
Use context-mode tools (ctxexecute, ctxexecutefile) instead of Bash/cat when processing large outputs. Triggers: "analyze logs", "summarize output", "process data", "parse JSON", "filter results", "extract errors", "check build output", "analyze dependencies", "process API response", "large file analysis", "page snapshot", "browser snapshot", "DOM structure", "inspect page", "accessibility tree", "Playwright snapshot", "run tests", "test output", "coverage report", "git log", "recent commits", "diff between branches", "list containers", "pod status", "disk usage", "fetch docs", "API reference", "index documentation", "call API", "check response", "query results", "find TODOs", "count lines", "codebase statistics", "security audit", "outdated packages", "dependency tree", "cloud resources", "CI/CD output". Also triggers on ANY MCP tool output that may exceed 20 lines. Subagent routing is handled automatically via PreToolUse hook.
ctx-stats
mksglu/context-mode
Show how much context window context-mode saved this session. Displays token consumption, context savings ratio, and per-tool breakdown. Read-only — shows stats only, no reset capability. To wipe the knowledge base entirely, use ctxpurge instead. Trigger: /context-mode:ctx-stats
context-mode-ops
mksglu/context-mode
Manage context-mode GitHub issues, PRs, releases, and marketing with parallel subagent army. Orchestrates 10-20 dynamic agents per task. Use when triaging issues, reviewing PRs, releasing versions, writing LinkedIn posts, announcing releases, fixing bugs, merging contributions, validating ENV vars, testing adapters, or syncing branches.
ctx-doctor
mksglu/context-mode
Run context-mode diagnostics. Checks runtimes, hooks, FTS5, plugin registration, npm and marketplace versions. Trigger: /context-mode:ctx-doctor
ctx-upgrade
mksglu/context-mode
Update context-mode from GitHub and fix hooks/settings. Pulls latest, builds, installs, updates npm global, configures hooks. Trigger: /context-mode:ctx-upgrade
ctx-purge
mksglu/context-mode
Purge the context-mode knowledge base. Permanently deletes all indexed content and resets session stats. This is destructive and cannot be undone. Trigger: /context-mode:ctx-purge
Popular other skills
hyperframes-cli
heygen-com/hyperframes
The HyperFrames CLI by job - scaffold, check, look at frames, edit the timeline, preview, render locally or in the cloud, publish, project history - plus reading its JSON and recovering from build or render failures.
triage
mattpocock/skills
Move issues and external PRs through a state machine of triage roles, categorise, verify, grill if needed, and write agent-ready briefs.
ask-matt
mattpocock/skills
Ask which skill or flow fits your situation. A router over the skills in this repo.
to-questionnaire
mattpocock/skills
Turn a decision you can't fully answer into a questionnaire for someone else to fill in.
loop-me
mattpocock/skills
Grill me about specs for the workflows I want to build, within this workspace.