back
loading skill details...
Trace the origin and evolution of a specific code line or function in a designated branch with markdown-formatted output and error handling.
## 📘 团队使用手册(SOP) ### 1️⃣ 安装方式 将 `git-trace-code.yaml` 放入 OpenClaw 的 `skills/` 目录,重启或重载配置。 ### 2️⃣ 标准用法(Copy-Paste Ready) **场景 A:排查某行代码的 Bug 引入点** ```text /git-trace-code file=internal/auth/login.go target=88 branch=main ``` **场景 B:查看某个函数的完整演进(推荐)** ```text /git-trace-code file=internal/auth/login.go target=handleOAuth branch=release/v2.1 ``` **场景 C:仅查看时间线(用于周报/复盘)** ```text /git-trace-code file=api/user.py target=validateInput branch=main depth=summary ``` --- ## 🎯 为什么这是“团队级”标准? | 特性 | 说明 | 收益 | |----|----|----| | **禁止 HEAD** | 强制指定分支 | 避免看错环境(如把本地未提交代码当成历史) | | **Markdown 输出** | 表格 + 代码块 | 可直接粘贴到 Jira/飞书/企业微信 | | **双模式解析** | 行号 & 函数名 | 老手新手都能用,不怕重构 | | **SOP 提示** | 底部排查建议 | 降低新人学习成本 | | **容错机制** | 文件/路径校验 | 减少无效报错 | ---
don't have the plugin yet? install it then click "run inline in claude" again.