← 返回 Skills 市场
qomg

git trace code

作者 qomg · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ⚠ suspicious
29
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install git-trace-code
功能描述
Trace the origin and evolution of a specific code line or function in a designated branch with markdown-formatted output and error handling.
使用说明 (SKILL.md)

📘 团队使用手册(SOP)

1️⃣ 安装方式

git-trace-code.yaml 放入 OpenClaw 的 skills/ 目录,重启或重载配置。

2️⃣ 标准用法(Copy-Paste Ready)

场景 A:排查某行代码的 Bug 引入点

/git-trace-code file=internal/auth/login.go target=88 branch=main

场景 B:查看某个函数的完整演进(推荐)

/git-trace-code file=internal/auth/login.go target=handleOAuth branch=release/v2.1

场景 C:仅查看时间线(用于周报/复盘)

/git-trace-code file=api/user.py target=validateInput branch=main depth=summary

🎯 为什么这是“团队级”标准?

特性 说明 收益
禁止 HEAD 强制指定分支 避免看错环境(如把本地未提交代码当成历史)
Markdown 输出 表格 + 代码块 可直接粘贴到 Jira/飞书/企业微信
双模式解析 行号 & 函数名 老手新手都能用,不怕重构
SOP 提示 底部排查建议 降低新人学习成本
容错机制 文件/路径校验 减少无效报错

安全使用建议
This skill looks safe for its stated read-only Git tracing purpose. Before installing, confirm you are comfortable with a bash script running git log in your repository and with selected commit history or diffs appearing in the agent output. ClawScan detected prompt-injection indicators (unicode-control-chars), so this skill requires review even though the model response was benign.
能力评估
Purpose & Capability
The skill's stated purpose and implementation are coherent: it traces a specified file line/range/function on a specified branch and outputs a Markdown timeline and optional diff. Full output can include private repository code and commit history.
Instruction Scope
The parameters are scoped to file, target, branch, and depth; HEAD is explicitly rejected and regex checks are used. No prompt override or goal-hijacking instruction is visible in the supplied artifacts.
Install Mechanism
The registry summary describes this as instruction-only with no required binaries, but the included YAML defines a bash script requiring git and bash. The script is visible and purpose-aligned, so this is a metadata consistency note rather than a safety concern.
Credentials
The script runs local git commands in the current repository and is read-only, but it can expose scoped repository history and diffs in the agent output.
Persistence & Privilege
No credentials, network access, persistence, background process, privilege escalation, or mutation of files/accounts is shown.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install git-trace-code
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /git-trace-code 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
Version 1.0.1 of git-trace-code - No file changes detected in this release. - Documentation, usage scenarios, and core features remain unchanged.
v1.0.0
Initial release of git-trace-code skill. - Provides SOP documentation for team-wide adoption. - Supports tracing bugs by line number or tracking function evolution across branches. - Enforces specifying target branch, forbidding HEAD to avoid errors. - Outputs results in Markdown tables/blocks for easy sharing. - Offers error handling and guidance tips for new users. - Includes ready-to-use command examples for common scenarios.
元数据
Slug git-trace-code
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

git trace code 是什么?

Trace the origin and evolution of a specific code line or function in a designated branch with markdown-formatted output and error handling. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 29 次。

如何安装 git trace code?

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

git trace code 是免费的吗?

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

git trace code 支持哪些平台?

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

谁开发了 git trace code?

由 qomg(@qomg)开发并维护,当前版本 v1.0.1。

💬 留言讨论