update-gsd
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.
Best use case
update-gsd is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
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.
Teams using update-gsd should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/update-gsd/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How update-gsd Compares
| Feature / Agent | update-gsd | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
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.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
自动更新 GSD(Goal-Space-Direction)项目中的代码库文档。当检测到代码变更时,在冷却期后自动触发文档更新。 ## 总体要求 每次上下文压缩后,重新读取该技能文件。 ## 启动技能时 1. 计算文档hash 2. 不论 `$isOld` 创建定时器,计时 60±10 分钟 3. 每当项目有 git commit / git rebase / cherry-pick 等变更代码操作: 3.1 重置定时器 3.2 杀死可能的正在运行的子代理 `gsd-codebase-mapper` ## 如何计算文档hash 1. 计算 `.planning/codebase/*.md` 总和的 hash,记为 `$doc_hash` 1.1 当不存在任何文档,`$doc_hash` 应当记为空 1.2 如果 `$doc_hash` 为空,报错退出,并使用 Ask 工具提醒用户是否执行 `/gsd:mapping-codebase` 技能生成文档 2. 对比 `.panning/meta.yaml` 的 `codebase` 的 `hash` 字段和 `$doc_hash` 是否一致,当文件缺失或不一致,记为 `$isOld` ## 当计时到期 如果 `$isOld`: 1. 创建子代理 `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 向主代理汇报更新成功及附带极简概要 2. 重新计算文档 hash(以及 `$isOld`) 3. 更新 `.panning/meta.yaml` 的 `codebase` 的 `hash` 字段为 `HEAD` 的 short-hash 4. 重置定时器 如果 `$isOld` 为 false: 1. 删除定时器,因为文档已更新,且已经有一段时间没有代码变更
Related Skills
open-u-dashboard
open understand dashboard for user
sync-template-skill
这是一个技能文件的模板,展示了技能的基本结构和内容组织方式。
talk-humanize
Be direct and informative. No filler, no fluff, but give enough to be useful.
search-web
使用 Evaluator-optimizer 模式进行系统性多轮网络搜索,采用结构化 Ask 流程在搜索前澄清研究目标。基于 YC Office Hours 的提问方法论,确保搜索方向清晰、结果可验证。当用户需要深入调查复杂主题、验证假设或全面收集信息时使用。
save-to-eagle
归档网络内容到 Eagle 素材库。支持:(1) Behance/Pixiv 图片归档,(2) 网页视频录制(页面动画、滚动录制)。使用方式:'归档 [URL]' 归档图片;'录制网页视频 [URL]' 录制页面动画;'滚动录制 [URL]' 自动滚动截图。支持评分如 '归档 [URL], 3/5'。
save-ob-chaos
将对话内容快速存档到 Obsidian Chaos 文件夹。触发词:"存档到 Obsidian"、"保存到 Chaos"、"ob 存档"、"记下这个"、"保存这段内容"、"存到 chaos"。
save-ob-chaos-mermaid
将 Mermaid 图表保存到 Obsidian Chaos 文件夹。触发词:"保存 mermaid 到 chaos"、"mermaid 存档"。
save-ob-chaos-excalidraw
绘制 Excalidraw 图表并存档到 Obsidian Chaos 文件夹。触发词:"画个图存到 Obsidian"、"excalidraw 存档"、"画个流程图保存"、"画图存到 chaos"、"创建图表并存档"、"画架构图到 ob"。
release-project
项目版本发布流程指导,帮助用户完成版本规划、Changelog 管理、版本号升级、Git 标签创建和 npm 首次发布准备。Use when: (1) 用户需要发布新版本 (2) 需要创建版本发布流程 (3) 需要管理版本号和 Changelog (4) 需要自动化版本发布 (5) 需要检查 release 分支同步 (6) 首次 npm 发布准备
recognize-codebase-branch-flow
识别并记忆项目 git 分支模型
rebase-commits
将零散的 commits 整合为清晰的逻辑提交,使 Git 历史更易读。 Use when: (1) 用户说 "rebase commits"、"整理提交历史"、"让历史更干净" (2) 用户想将多个相关 commits 合并为逻辑单元 (3) 完成一个功能后需要清理 commit 历史 (4) 提交历史混乱,需要重新组织
read-codebase
阅读棕地项目代码库,智能分析代码结构,递归补充其调用链上所有函数的注释。