local-link/skills/git-skills/skills/update-gsd/SKILL.md
Automatically update GSD codebase documentation when code changes are detected. Use this skill when working with GSD projects to keep .planning/codebase/*.md documentation synchronized with actual code changes. This skill monitors git operations (commit, rebase, cherry-pick) and triggers documentation updates after a 10-minute cooldown period.
npx skillsauth add lionad-morotar/local-tools update-gsdInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
自动更新 GSD(Goal-Space-Direction)项目中的代码库文档。当检测到代码变更时,在冷却期后自动触发文档更新。
每次上下文压缩后,重新读取该技能文件。
$isOld 创建定时器,计时 60±10 分钟gsd-codebase-mapper.planning/codebase/*.md 总和的 hash,记为 $doc_hash
1.1 当不存在任何文档,$doc_hash 应当记为空
1.2 如果 $doc_hash 为空,报错退出,并使用 Ask 工具提醒用户是否执行 /gsd:mapping-codebase 技能生成文档.panning/meta.yaml 的 codebase 的 hash 字段和 $doc_hash 是否一致,当文件缺失或不一致,记为 $isOld如果 $isOld:
gsd-codebase-mapper ,子代理工作步骤如下:
1.1 读取 .panning/meta.yaml 的 codebase 的 from 字段,判断文档目前对齐哪一个提交,记为 $from
1.2 所谓参考代码(以便更新文档),是指 git diff <$from>...HEAD,但如果 $from 为空,则不指定参考代码
1.3 注意,参考代码不应文档更新,只包含代码、配置项等变更
1.4 根据参考代码,使用中文,补充或修复 .planning/codebase/*.md 的内容,应当极端克制,无必要不更新
1.5 向主代理汇报更新成功及附带极简概要$isOld).panning/meta.yaml 的 codebase 的 hash 字段为 HEAD 的 short-hash如果 $isOld 为 false:
tools
理解用户意图;listen 模式通过 grill-me 深挖任务并归档经验
development
给 VSCode(Insiders/Stable) 内置 ripgrep 加 5s 超时包装,防止搜索卡死吃满 CPU。--on 包装(幂等) / --off 还原 / 不带参数查状态。Use when VSCode 搜索卡死、rg 进程占满 CPU,或 VSCode 更新后超时保护失效需要重包。
development
为指定项目创建完全隔离的 hapi(Claude Code On the Go)实例,包括独立数据目录、LaunchAgent 持久化、zsh wrapper 和 app.hapi.run 直连 URL。与全局 ~/.hapi 互不干扰。
development
关闭承载当前 Claude Code 会话的宿主(VSCode 窗口或其终端面板),连同 claude 一起退出。通过 close-host-window 扩展触发:先 SIGTERM claude(走完 SessionEnd hooks)再关 host,不抢焦点、不丢 hooks。--host vscode 关窗口、--host terminal(默认)只关终端面板。Use when 任务结束要随宿主退出,或需精确关闭某 claude 终端所在窗口/面板。