Skip to content
Skillpedia
Agents33k · #8512

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.md

Copy 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

Use this skill to help me: https://github.com/mksglu/context-mode/blob/main/skills/ctx-index/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

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

  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.
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

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills