From tdk-memory
Record staged .specify/memory/ changes in CHANGELOG.md via git diff --staged. Stage edits first with 'git add .specify/memory/', then run this skill before committing. Requires /tdk-memory-init first.
How this skill is triggered — by the user, by Claude, or both
Slash command
/tdk-memory:tdk-memory-changelogThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**If ANY script or git command errors, you MUST:**
If ANY script or git command errors, you MUST:
If .specify/memory/ missing → STOP: "Run /tdk-memory-init first."
If no staged memory changes → EXIT: "No staged changes in .specify/memory/. Stage edits first: git add .specify/memory/"
If --file used with unstaged path → EXIT: "File not staged. Run: git add .specify/memory/{path} first."
Detects staged .specify/memory/ changes via git diff --staged, asks user for
descriptions per change group, then writes a structured CHANGELOG.md entry.
Natural git workflow: stage edits → run skill → commit everything together.
Scope: Changelog entry only. Also rebuilds memory-index.md and updates
memory.yaml checksums. Does NOT update section content.
$ARGUMENTS
Optional: --file [path] to record a specific staged file only.
git diff --staged --name-status -- .specify/memory/
Returns tab-separated lines: M\t.specify/memory/data-model.md, A\t..., D\t...
Parse with bash — split on tab to extract status + path:
M → change type: modifiedA → change type: addedD → change type: deprecatedIf --file provided, filter to that path only; verify it is staged (exit with helpful message if not).
If zero memory files are staged:
No staged changes in .specify/memory/.
Stage edits first: git add .specify/memory/
Group files by git status (A / M / D). For each non-empty group, ask ONE description:
Also ask once: "Changed by: [agent name | 'manual edit']"
Change type is auto-derived from git status — do NOT ask user to specify type.
VENV_PY="$(pwd)/.venv/Scripts/python.exe"
[ -f "$VENV_PY" ] || VENV_PY="$(pwd)/.venv/bin/python3"
For each changed file:
D): file was moved to _deprecated/ — hash from _deprecated/{rel-path}$VENV_PY "$(pwd)/.specify/plugins/tdk-memory/scripts/compute-sha256-hashes.py" \
"$(pwd)/.specify/memory/" "{relative-file-path}"
Prepend to CHANGELOG.md (after header, before existing entries):
## {YYYY-MM-DD} — {overall description from user}
**Changed by**: {agent or "manual edit"}
**Files affected**: {comma-separated list}
### {file-path-1}
**Change type**: {added | modified | deprecated}
**Description**: {group description}
**Verified**: {sha256}
### {file-path-2}
...
See references/changelog-entry-format-and-change-type-taxonomy.md for full spec.
Full regeneration (same logic as /tdk-memory-update Step 5).
For all recorded files: update sha256, updated_at, updated_by: "tdk-memory-changelog".
✅ CHANGELOG.md updated — {N} files recorded.
memory-index.md rebuilt.
memory.yaml checksums updated.
Ready to commit. Suggested: git commit -m "docs(memory): {description}"
references/changelog-entry-format-and-change-type-taxonomy.mdCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub vinhltt/tdk --plugin tdk-memory