Agent Skillsmksglu/context-mode › ctx-index

ctx-index

GitHub

将本地文件或目录索引至持久化知识库,以便后续通过搜索获取精准片段,避免重复读取原始文件。支持MCP工具或CLI调用,并包含安全排除规则。

skills/ctx-index/SKILL.md mksglu/context-mode

Trigger Scenarios

用户需要对本地项目进行内容索引以便后续检索 /context-mode:ctx-index

Install

npx skills add mksglu/context-mode --skill ctx-index -g -y
More Options

Use without installing

npx skills use mksglu/context-mode@ctx-index

指定 Agent (Claude Code)

npx skills add mksglu/context-mode --skill ctx-index -a claude-code -g -y

安装 repo 全部 skill

npx skills add mksglu/context-mode --all -g -y

预览 repo 内 skill

npx skills add mksglu/context-mode --list

SKILL.md

Frontmatter
{
    "name": "ctx-index",
    "description": "Index a local file or directory into context-mode's persistent FTS5 knowledge base\nso future ctx_search calls can retrieve focused snippets without rereading raw files.\nTrigger: \/context-mode:ctx-index\n",
    "user-invocable": true
}

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.

Version History

  • 6aad62f Current 2026-07-24 17:38

Same Skill Collection

configs/antigravity-cli/skills/context-mode/SKILL.md
configs/copilot-cli/skills/context-mode/SKILL.md
skills/ctx-doctor/SKILL.md
skills/ctx-insight/SKILL.md
skills/ctx-purge/SKILL.md
skills/ctx-search/SKILL.md
skills/ctx-stats/SKILL.md
skills/ctx-upgrade/SKILL.md
.claude/skills/context-mode-ops/SKILL.md
skills/context-mode/SKILL.md

Metadata

Files
0
Version
a029670
Hash
5e495485
Indexed
2026-07-24 17:38

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-16 23:34
浙ICP备14020137号-1 $mapa de visitantes$