← 返回 Skills 市场
venki0552

Skill

作者 Venkat Ambati · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
116
总下载
1
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install slg-cli
功能描述
Semantic git history search and code archaeology. Use when asked why code exists, who owns a file, what introduced a regression, what changed in a commit ran...
使用说明 (SKILL.md)

\r \r

SLG — Semantic Git Search\r

\r slg is a local-first CLI that builds a semantic index of your git history (embeddings + BM25) so you can ask natural-language questions about who changed what, why, and when. No API keys required — everything runs offline via ONNX Runtime.\r \r

Installation\r

\r

npm install -g slg-cli\r
# or run without installing\r
npx slg-cli \x3Ccommand>\r
```\r
\r
## When to Use This Skill\r
\r
Use `slg` when the user:\r
\r
- Asks **why** a piece of code exists or was written a certain way\r
- Wants to know **who** is responsible for a file or function\r
- Is tracking down **what introduced a bug** across many commits\r
- Needs to understand **what changed** between two refs or in a range\r
- Wants to assess **how risky** reverting a commit would be\r
- Asks about **recent activity** on a file or directory\r
\r
## Setup\r
\r
Index must be built once before searching. Run this in the repo root:\r
\r
```bash\r
slg init\r
```\r
\r
Re-index after significant new commits:\r
\r
```bash\r
slg reindex\r
```\r
\r
Check index health:\r
\r
```bash\r
slg doctor\r
```\r
\r
## Core Commands\r
\r
### Why does this code exist?\r
\r
```bash\r
slg why "why does the retry logic use exponential backoff"\r
slg why "what is the purpose of the connection pool size limit"\r
```\r
\r
Returns ranked commit results explaining the reasoning behind code decisions.\r
\r
### Who owns a file?\r
\r
```bash\r
slg blame src/auth/middleware.ts\r
slg blame --top 3 src/payments/\r
```\r
\r
Returns contributors ranked by semantic commit weight for the given path.\r
\r
### Find what introduced a regression\r
\r
```bash\r
slg bisect "authentication stopped working after the refactor"\r
```\r
\r
Narrows down the range of commits most likely to have introduced an issue using semantic search over the message + diff corpus.\r
\r
### Search commit history semantically\r
\r
```bash\r
slg log "database schema migrations"\r
slg log --since 2024-01-01 "API rate limiting changes"\r
slg log --limit 20 "performance optimizations"\r
```\r
\r
Returns commits ranked by semantic + BM25 relevance. Supports `--since`, `--until`, `--limit`, and `--path` filters.\r
\r
### Summarize a diff\r
\r
```bash\r
slg diff HEAD~5..HEAD\r
slg diff v1.2.0..v1.3.0\r
slg diff --path src/api/ main~10..main\r
```\r
\r
Generates a semantic summary of what changed across a commit range.\r
\r
### Assess revert risk\r
\r
```bash\r
slg revert-risk abc1234\r
slg revert-risk HEAD~3\r
```\r
\r
Scores how risky it would be to revert a given commit based on downstream dependency analysis.\r
\r
### See recent activity\r
\r
```bash\r
slg status\r
slg status --path src/\r
```\r
\r
Shows recent indexed commits and index freshness.\r
\r
## MCP Server\r
\r
`slg` ships an MCP (Model Context Protocol) server, letting AI agents query git history directly:\r
\r
```bash\r
slg serve\r
# or\r
slg mcp\r
```\r
\r
Configure in your agent:\r
\r
```json\r
{\r
  "mcpServers": {\r
    "slg": {\r
      "command": "slg",\r
      "args": ["serve"]\r
    }\r
  }\r
}\r
```\r
\r
Available MCP tools: `slg_why`, `slg_blame`, `slg_bisect`, `slg_log`, `slg_diff`, `slg_revert_risk`, `slg_status`.\r
\r
## Tips\r
\r
- `slg why` works best with full-sentence natural language questions\r
- `slg bisect` is most effective when given a behavioral description rather than error text\r
- Prefix path filters with `--path` to narrow any command to a directory or file\r
- Run `slg doctor` if search results seem stale — it reports index coverage and age\r
- For large repos (10K+ commits) the initial `slg init` may take several minutes; subsequent `slg reindex` calls are incremental and fast\r
安全使用建议
This skill appears to be what it says: a local-first semantic git-history tool. Before installing, consider: (1) inspect the slg-cli package on npm/GitHub to confirm maintainership and review any postinstall scripts; (2) prefer npx slg-cli for one-off use instead of npm -g if you want to avoid global installs; (3) be aware that running 'slg init' indexes your repository and 'slg serve' starts a local MCP server that will expose indexed git history to any agent process you connect — avoid serving in untrusted networks and don't point it at repos containing secrets you don't want queried; (4) run initial indexing in a safe environment (e.g., a sandbox or personal machine) if you have sensitive code. Overall the skill is coherent with its stated purpose.
功能分析
Type: OpenClaw Skill Name: venki0552-slg Version: 1.0.0 The skill bundle provides documentation and integration instructions for 'slg-cli', a legitimate-looking tool for semantic git history search. The SKILL.md file contains standard operational instructions for an AI agent without any signs of prompt injection, data exfiltration, or malicious execution logic.
能力评估
Purpose & Capability
Name/description match the declared dependency (slg) and the npm install spec for slg-cli. Requiring the 'slg' binary is appropriate for a git-history semantic search tool.
Instruction Scope
SKILL.md confines runtime actions to running slg commands (init, reindex, why, blame, bisect, diff, serve) against the local repository and starting a local MCP server. This is expected, but it does instruct running a local server that will expose repository history to the agent — users should be aware that the agent (or any configured MCP client) will be able to query local git history.
Install Mechanism
Install uses an npm global package (slg-cli) which is an expected distribution for a CLI. npm packages can run install/postinstall scripts, so review the package source (npm page / GitHub) before installing globally; using npx avoids a permanent global install.
Credentials
No environment variables, credentials, or unrelated config paths are requested. The skill's access needs are limited to local git repositories, which matches the functionality.
Persistence & Privilege
always is false and the skill does not request system-wide persistence. It suggests configuring an MCP server entry for the agent (normal for agent integration) but does not modify other skills or request elevated privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install slg-cli
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /slg-cli 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of slg-git-search - Introduces a local-first semantic search CLI for git history analysis. - Supports natural language queries for code reasoning, ownership, regression detection, commit history, diff summaries, and revert risk assessment. - Features commands: why, blame, bisect, log, diff, revert-risk, and status. - Provides installation and setup guidance, with offline functionality (no API keys required). - Includes an MCP server enabling AI agent integration via documented endpoints.
元数据
Slug slg-cli
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Skill 是什么?

Semantic git history search and code archaeology. Use when asked why code exists, who owns a file, what introduced a regression, what changed in a commit ran... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 116 次。

如何安装 Skill?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install slg-cli」即可一键安装,无需额外配置。

Skill 是免费的吗?

是的,Skill 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Skill 支持哪些平台?

Skill 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Skill?

由 Venkat Ambati(@venki0552)开发并维护,当前版本 v1.0.0。

💬 留言讨论