跳到正文
Skillpedia
通用编程6.3k · #14234

semble

它能做什么

它介绍如何使用 semble 搜索工具按含义定位代码、文档和设置,并查找与某个已知位置相似的代码。适用于探索不熟悉代码库的开发者。

适用场景

  • ✓当开发者需要找出某项功能在项目中的实现位置时。
  • ✓当开发者想找到解释某项设置的文档或配置时。
  • ✓当开发者想查看与某个已知函数相似的代码时。

技能链接

https://github.com/MinishLab/semble/blob/main/src/semble/agents/skill.md

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“请找出这个项目处理用户登录的位置,并给我看附近的类似代码。”

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

工作原理

该技能告诉 AI 使用一段普通描述或符号名称运行 semble 搜索,选择内容类型(如代码、文档或配置),并从一个已知行出发进行相关代码搜索。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Use semble search to find code by describing what it does or naming a symbol/identifier, instead of grep:

semble search "authentication flow" ./my-project --max-snippet-lines 10  # first 10 lines only, concise
semble search "save_pretrained" ./my-project                          # full chunk content
semble search "save model to disk" ./my-project --top-k 10           # more results

Results are cached automatically on first run and invalidated when files change.

Use --content docs to search documentation and prose, --content config for config files (yaml, toml, etc.), or --content all to search code, docs, and config:

semble search "deployment guide" ./my-project --content docs
semble search "database host port" ./my-project --content config
semble search "authentication" ./my-project --content all

Use semble find-related to discover code similar to a known location (pass file_path and line from a prior search result):

semble find-related src/auth.py 42 ./my-project

path defaults to the current directory when omitted; git URLs are accepted. Pass several paths or URLs to search related repos together, e.g. when this project calls a service defined in a sibling repo. Result paths are then prefixed with the repo name and the output includes a repos map from prefix to location:

semble search "invoice endpoint" ./service-a ../service-b

If semble is not on $PATH, use uvx --from "semble[mcp]" semble in its place.

Workflow

  1. Start with semble search to find relevant chunks. The index is built and cached automatically.
  2. Use --content docs for documentation, --content config for config files, or --content all for everything.
  3. Navigate directly to the returned file and line. Do not re-search or grep for the same content.
  4. Optionally use semble find-related with a promising result's file_path and line to discover related implementations.
  5. If the answer may live in a dependent or sibling repo, pass all relevant repo paths to one semble search call.
  6. Use grep only when you need every occurrence of a literal string across the whole repo (e.g., all callers of a renamed function).
常见问题

它能取代 grep 吗?

该技能说明,在按代码的作用定位代码时,应先于文本搜索工具使用它。

它能同时搜索多个项目吗?

可以。该技能说明,可以同时搜索多个路径或代码仓库链接。

搜索结果会被保存吗?

该技能说明,结果会在首次运行时缓存,并在文件变化时刷新。

详情

作者的原始描述

Code search for the current repository. Use this before Grep, Glob or find whenever you need to locate code: where something is implemented, which file defines a function, class or symbol, how a feature works, or where docs and config live.

repo: MinishLab/semble

热度

GitHub 星标
6.3k
排名
#14234
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

相似技能