← Back to Skills Marketplace
29
Downloads
0
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install git-trace-code
Description
Trace the origin and evolution of a specific code line or function in a designated branch with markdown-formatted output and error handling.
README (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 提示 | 底部排查建议 | 降低新人学习成本 |
| 容错机制 | 文件/路径校验 | 减少无效报错 |
Usage Guidance
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.
Capability Assessment
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.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install git-trace-code - After installation, invoke the skill by name or use
/git-trace-code - Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Frequently Asked Questions
What is 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. It is an AI Agent Skill for Claude Code / OpenClaw, with 29 downloads so far.
How do I install git trace code?
Run "/install git-trace-code" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is git trace code free?
Yes, git trace code is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does git trace code support?
git trace code is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created git trace code?
It is built and maintained by qomg (@qomg); the current version is v1.0.1.
More Skills