Update your knowledge base using changes in repos since the last evaluation. Checks what changed, helps update documentation, and records the new evaluation in the staleness log.
This skill helps keep your knowledge base current by identifying what changed in repositories since they were last evaluated, then guiding you through updating relevant documentation.
The knowledge base tracks when each repo was last evaluated in docs/docs/reference/staleness.md. This skill:
When this skill is invoked:
Read docs/docs/reference/staleness.md to understand:
Parse the evaluation log table to extract:
Before presenting options, fetch commits since the last evaluation for each tracked repo. This lets you show the user which repos actually have changes.
For each repo in the staleness log:
.gitmodulesUse the helper script:
.claude/skills/update-knowledge/scripts/repo-changes.sh "<repo-url>" --since-rev "<last-revision>" --limit 30
Or if no revision was recorded, use the date:
.claude/skills/update-knowledge/scripts/repo-changes.sh "<repo-url>" --since-date "<last-evaluated-date>"
Finding repo URLs:
.gitmodules to find the URL for each repoShow the user which repos have new commits since their last evaluation:
I checked all tracked repositories for changes since their last evaluation.
**Repos with new commits:**
| Repo | Last Evaluated | New Commits | Latest Commit |
|------|----------------|-------------|---------------|
| repo-a | 2026-01-15 | 12 | 2026-01-16 |
| repo-b | 2026-01-15 | 3 | 2026-01-16 |
...
**Repos with no changes:** <list of repos with no new commits>
Which repos would you like to review?
1. Review all repos with changes (Recommended)
2. Review specific repos
3. Skip - just update staleness log for repos with no doc-relevant changes
Use AskUserQuestion to let the user choose.
For each repo the user wants to review, show:
## <repo-name>
**Changes since <last-eval-date> (<N> commits):**
<commit list from script>
**Related docs:** <docs-updated from staleness log>
Would you like to:
1. Review this repo's changes and update docs
2. Skip this repo
3. Mark as evaluated with no doc changes needed
When the user chooses to review a repo:
Access the latest code:
git submodule update --checkout <path>Analyze significant changes:
Identify docs to update:
Make updates:
After updating, ask:
I've updated:
- <list of docs updated>
Would you like me to:
1. Commit these changes
2. Review the changes first
3. Continue to the next repo
After completing a repo evaluation (whether docs were updated or not):
Last Evaluated: today's dateRevision: current HEAD SHARevision Date: date of latest commitDocs Updated: list docs that were updated (or "-" if none)Notes: brief summary of changes or "No significant changes"Example update:
| repo-name | 2026-01-16 | architecture/repo-name.md | a1b2c3d... | 2026-01-15 | Added new health check modes |
After each repo, ask:
<repo-name> evaluation complete.
Remaining repos to check: <list>
Would you like to:
1. Continue to the next repo (<next-repo-name>)
2. Check a different repo
3. Finish for now
Fetches commits from a repo since a specific revision or date:
.claude/skills/update-knowledge/scripts/repo-changes.sh <repo-url> [options]
Options:
--since-rev <sha> Show commits after this revision
--since-date <YYYY-MM-DD> Show commits after this date
--limit <n> Max commits to fetch (default: 20)
Output includes commit list and current HEAD SHA.
Parses the staleness log to extract evaluation info:
.claude/skills/update-knowledge/scripts/parse-staleness.sh [options]
Options:
--repo <name> Filter to specific repo
--stale-days <n> Only show repos not evaluated in N days
Output is TSV: repo_name<TAB>last_evaluated<TAB>docs_updated<TAB>revision<TAB>revision_date<TAB>notes
The staleness log uses repo names that may differ from submodule paths. Use .gitmodules to find the actual URL for each repo. Match by the repository name portion of the path.
Focus on significant changes. Not every commit needs documentation updates. Focus on:
Update, don't append. Documentation should reflect the current state. Replace outdated information rather than adding caveats.
Cross-reference. When updating one doc, check if related docs also need updates.
Commit atomically. Commit doc updates for each repo separately with clear messages.
Note what didn't change. When a repo has commits but no doc updates needed, note this in the staleness log to explain why.