/cog-second-brain:update-cogfrom cog-second-brain
Checks for and applies upstream COG framework updates (skills, docs, scripts) while preserving personal content like braindumps and notes.
Ships in cog-second-brain. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
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 repository 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; they never contain user content). The authoritative list is the FRAMEWORK_FILES array in cog-update.sh. The main groups are:
README.md, SETUP.md, AGENTS.md, GEMINI.md, CHANGELOG.md, CONTRIBUTING.md, WORKFLOW.md, RESOLVER.md, BRAIN-HEALTHCHECK.md, BRAIN-MAINTENANCE.md, and the files in docs/.claude/skills/ and .agents/skills/.claude/agents/, .agents/agents/, .claude/roles/.claude/lib/, .claude/hooks/ (shipped, never installed into your settings), and scripts/.kiro/powers/*/POWER.md, .gemini/commands/*.toml, .gemini/skills/*.mdplugin.json, .claude-plugin/plugin.json, .cursor-plugin/plugin.json, marketplace-entry.json, .cursorrules, .gitignoreCOG-VERSIONBefore updating, check if the user has customized any framework files:
# Show how the working tree differs from current upstream HEAD.
# NOTE: this cannot tell a local customization apart from an upstream
# change you have not pulled yet - both show up as a diff. Treat any
# output as "needs a look", not as proof the user edited the file.
git diff cog-upstream/main -- <file>
If a file differs, 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 you apply updates, rebuild the plugin mirror and run the validator. Both scripts ship with COG:
./scripts/build-agent-plugin.sh
./scripts/validate-agent-surface.sh
The mirror in skills/ is generated from .claude/skills/, so skip nothing here. If the validator reports a problem after an update, show it to the user and do not hide it. The update itself still stands. A missing script means the user's copy predates it: say so and continue.
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
05-knowledge/people/README.md and 06-templates/people-profile-template.md are framework files and are updated. 00-inbox/, 01-daily/, 02-personal/, 03-professional/, 04-projects/ and the rest of 05-knowledge/ and 06-templates/ hold user dataFRAMEWORK_FILES are compared with upstream. The repository tracks only .gitkeep files in the content folders, and .gitignore leaves them tracked by default (the lines that would ignore them are commented out, so you can opt in)cog.local.yaml is never updated - it holds the user's vault_path and is not a framework filevault_path points outside the repository, never overwrite the vault copies of 05-knowledge/people/README.md and 06-templates/people-profile-template.md. Copy them from upstream into the vault only when they are missing therecog-update.sh is in the framework file list. A local version older than 3.17.0 cannot restart itself, so the first run installs only the files that old script knows about. When the local version is 3.16.1 or earlier, run ./cog-update.sh a second time to get the new skills, scripts, hooks and root docs, and ignore one syntax-error or command not found line at the end of the first run. Answer the prompts on that first run instead of using --force05-knowledge or 06-templates is a symlink, the updater leaves the two People CRM files in it alone and prints a warning. Set vault_path in cog.local.yaml to manage themgit checkout for surgical file replacement, not git merge or git rebaseWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
49 skills in this plugin
/auto-researchDeep strategic research engine — decomposes questions into parallel research threads, spawns multiple agents, and synthesizes into actionable strategic analysis/best-of-nSelector stage before a verification gate - generate N candidates in parallel, pick the best with a pivot tournament of pairwise judgements, then gate the winner. For high-variance, non-mutating deliverables only/blog-publishWrite and publish a post to your own static blog end to end: content checklist (embedded links, optional TL;DR), per-post ASCII art, an agent-readable markdown twin, deploy, and social distribution. Use when you say "write a blog post", "publish this to my blog", or "push this post to socials".
Claude Code refuses to install this plugin
.claude-plugin/plugin.json: skills: Invalid input, repository: Invalid input: expected string, received object
Checked against Claude Code 2.1.332's install rules. The listing below is what the repository ships; Claude Code cannot install it as published.
Other plugins' skills for the same job