Check for and apply upstream COG framework updates (skills, docs, scripts) without touching personal content
npx skills add https://github.com/huytieu/COG-second-brain --skill update-cog
Help the user update their COG framework files (skills, documentation, scripts) from the official upstream repository without risking their personal content (braindumps, profiles, notes).
Read COG-VERSION from the vault root. If it doesn't exist, inform the user they may be on an older version that predates version tracking.
# Add the upstream remote if not already present
git remote get-url cog-upstream 2>/dev/null || \
git remote add cog-upstream https://github.com/huytieu/COG-second-brain.git
# Fetch latest
git fetch cog-upstream main --quiet
# Local version
cat COG-VERSION
# Upstream version
git show cog-upstream/main:COG-VERSION
If versions match, tell the user they're up to date.
For each framework file, compare local vs upstream:
git diff HEAD..cog-upstream/main -- <file>
Framework files (safe to update — never contain user content):
README.md, SETUP.md, AGENTS.md, GEMINI.md, CHANGELOG.md, CONTRIBUTING.md.claude/skills/*/SKILL.md.kiro/powers/*/POWER.md.gemini/commands/*.toml, .gemini/skills/*.md.claude-plugin/plugin.json, marketplace-entry.json, .gitignorecog-update.shCOG-VERSIONBefore updating, check if the user has customized any framework files:
# Compare user's file against the version they originally got
git diff cog-upstream/main -- <file>
If a file has local customizations, warn the user and offer options:
<file>.backup-YYYYMMDD then updateFor files the user approves:
# Surgical file replacement — no merge, no rebase, zero conflict risk
git checkout cog-upstream/main -- <file>
After updating:
git add -A && git commit -m "Update COG framework to v<new-version>"
For users who prefer a non-AI update, mention the update script:
./cog-update.sh # Interactive
./cog-update.sh --check # Just check for updates
./cog-update.sh --dry-run # Preview changes
./cog-update.sh --force # Update everything
00-inbox/, 01-daily/, 02-personal/, 03-professional/, 04-projects/, 05-knowledge/, 06-templates/ contain user data and are always ignored.gitkeep files are tracked)cog-update.sh is in the framework file listgit checkout for surgical file replacement, not git merge or git rebaseTake huytieu/cog-second-brain-update-cog from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.