跳到正文
Skillpedia
智能体33k · #8515

ctx-search

它能做什么

这个技能搜索 context-mode 已经索引过的内容,例如项目文件、文档和较早的会话笔记。适合希望从项目中快速获得答案、又不想重新阅读原始资料的人。

适用场景

  • ✓当有人提出的问题应该通过已索引的项目内容来回答的时候。
  • ✓当用户想一次在多份已索引文档中查找某个主题的时候。
  • ✓当需要较早会话的笔记来回答问题的时候。

技能链接

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

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/mksglu/context-mode/blob/main/skills/ctx-search/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请在已索引的项目中搜索令牌刷新是如何处理的。”

每周 5 个新技能,1 分钟读完。

工作原理

这个技能会把一个或多个简短的搜索查询发送到索引,可以选择限定在某个来源内,并返回聚焦的片段。如果索引为空,它会提示你先索引内容。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Context Mode Search

Search indexed content without rereading raw sources into conversation context.

Instructions

  1. Prefer the ctx_search MCP tool when it is available.
  2. Batch all related questions in one queries array.
  3. Scope with source when the user names a project or indexed label.
  4. Use short, specific queries of two to four technical terms.
ctx_search({
  source: "project:<name>",
  queries: ["authentication middleware", "token refresh"],
  limit: 5
})
  1. If MCP tools are unavailable, fall back to the CLI:
context-mode search "authentication middleware" --source project:<name> --limit 5
  1. If the index is empty, tell the user to run /context-mode:ctx-index or context-mode index <path> first.
常见问题

什么样的搜索查询最好?

简短、具体、由两到四个技术术语组成的查询效果最好。

我可以只搜索一个项目吗?

可以。指定来源标签后,搜索就只限于该已索引内容。

如果什么都搜不到怎么办?

索引可能为空,请先使用索引技能索引项目。

详情

作者的原始描述

Search context-mode's persistent FTS5 knowledge base for previously indexed local project content, documentation, or session memory. Trigger: /context-mode:ctx-search

repo: mksglu/context-mode

热度

GitHub 星标
33k
排名
#8515
许可证
—
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能