Agent Skillsmksglu/context-mode › ctx-index

ctx-index

GitHub

将本地文件或目录索引至FTS5知识库,以便后续通过ctx_search检索片段。支持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
a55e44c
Hash
5e495485
Indexed
2026-07-24 17:38

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-29 21:51
浙ICP备14020137号-1 $お客様$