本文へスキップ
Skillpedia
エージェント33k · #8512

ctx-index

できること

このスキルは、ローカルのプロジェクトファイルを context-mode の検索インデックスに追加し、後で素早く検索できるようにします。毎回コードを読み直さずに、アシスタントにコードベースについて答えさせたい開発者向けです。

使う場面

  • ✓開発者が、後でプロジェクトのコードとドキュメントを検索させたいとき。
  • ✓大きなリポジトリを一度インデックスにしておき、以後の検索を速くしたいとき。
  • ✓プロジェクトのドキュメントに分かりやすいラベルを付けて検索可能にしたい場合。

スキルのリンク

https://github.com/mksglu/context-mode/blob/main/skills/ctx-index/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/mksglu/context-mode/blob/main/skills/ctx-index/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“このプロジェクトフォルダをインデックスに登録して、後でコードを検索できるようにしてください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

このスキルは、扱いやすいように深さとファイル数の上限を使って、選んだフォルダをパスで登録します。その後、ラベルとファイル数を報告し、後で使う検索コマンドを示します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)を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.
よくある質問

何を登録しないべきですか?

依存関係のフォルダ、ビルドの出力、秘密情報、生成されたファイルは登録から外すべきです。

ファイル数に上限はありますか?

はい。大規模なリポジトリでは、上限を500より引き上げる前にスキルが確認を求めます。

登録後はどのように検索しますか?

同じソースラベルで検索スキルを使うと、登録した内容から一部分を見つけられます。

詳細

作者による元の説明

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

人気

GitHubのスター
33k
ランキング
#8512
ライセンス
—
更新日
2026/11/2

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル