Agent skill

Update Claude Md

by MikalaiBarysevich in MikalaiBarysevich/CleverSwitch

Analyze all changes in the current git branch and update CLAUDE.md if architectural or important changes warrant it.

GPL-3.0Auto-check passedAgent Workflows

Install Update Claude Md

skills CLI
$ npx skills add MikalaiBarysevich/CleverSwitch --skill update-claude-md -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install MikalaiBarysevich/CleverSwitch update-claude-md --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/MikalaiBarysevich/CleverSwitch.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/update-claude-md .claude/skills/update-claude-md && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
update-claude-md
GitHub stars
117
Token cost
~1.2k tokens
SKILL.md length
539 words
Files
1
Skills in repo
2
Repo updated
First seen
Licence
GPL-3.0

At a glance

Analyze all changes in the current git branch and update CLAUDE.md if architectural or important changes warrant it.

  • Works in 5 steps: Detect the parent branch and gather… → Classify changes → Draft the update → …
  • The user asks to update CLAUDE.md
  • SKILL.md covers Why this matters, Step 1: Detect the parent…, Step 2: Classify changes and Step 3: Draft the update, plus 2 more sections
  • Calls git

What it does

Update Claude Md is an agent skill from MikalaiBarysevich/CleverSwitch. Analyze all changes in the current git branch and update CLAUDE.md if architectural or important changes warrant it. Use this skill when the user asks to update CLAUDE.md, sync docs with branch changes, review what changed architecturally, or before creating a PR to ensure documentation is current. Also trigger when the user says things like "update docs for this branch", "does CLAUDE.md need updating", or "what architectural changes did we make".

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering Agent instruction files and Git workflow. It works with Linux and macOS. The repository describes itself as: A CLI tool to synchronize host switching across multiple Logitech devices. The licence is GPL-3.0.

When your agent uses it

  • The user asks to update CLAUDE.md
  • Sync docs with branch changes
  • Review what changed architecturally
  • Before creating a PR to ensure documentation is current

Example prompts

  • “update docs for this branch”
  • “does CLAUDE.md need updating”
  • “what architectural changes did we make”
  • “/update-claude-md”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Detect the parent branch and gather changes
  2. Classify changes
  3. Draft the update
  4. Present changes before applying
  5. Verify the result

What it can do on your machine

Read from SKILL.md and the folder at commit de0a4f4. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Update Claude Md loads about 1.2k tokens when it runs. Until then it costs about 117 tokens; SKILL.md has 539 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~117
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from MikalaiBarysevich/CleverSwitch at commit de0a4f4, republished under its GPL-3.0 licence (© MikalaiBarysevich). 539 words, ~1,243 tokens.

Download SKILL.mdSave it as .claude/skills/update-claude-md/SKILL.md (or your agent's skills folder).
name
update-claude-md
description
Analyze all changes in the current git branch and update CLAUDE.md if architectural or important changes warrant it. Use this skill when the user asks to update CLAUDE.md, sync docs with branch changes, review what changed architecturally, or before creating a PR to ensure documentation is current. Also trigger when the user says things like "update docs for this branch", "does CLAUDE.md need updating", or "what architectural changes did we make".
disable-model-invocation
true

Update CLAUDE.md from Branch Changes

Analyze changes in the current branch and update CLAUDE.md to reflect any architectural or important changes that Claude needs to know about in future sessions.

Why this matters

CLAUDE.md is loaded into every conversation. It's the primary way Claude understands project architecture, conventions, and gotchas. When it's stale, Claude makes wrong assumptions. When it's bloated, Claude ignores important rules. The goal is to keep it accurate, concise, and useful.

Step 1: Detect the parent branch and gather changes

Find the parent branch — the branch the current one was forked from. Walk the first-parent history looking for the first commit that belongs to another local branch:

bash
current=$(git rev-parse --abbrev-ref HEAD)

# Walk first-parent commits, find the first one tagged with another branch name
parent=""
for sha in $(git rev-list --first-parent HEAD); do
  branches=$(git branch --contains "$sha" --format='%(refname:short)' | grep -v "^${current}$" | head -1)
  if [ -n "$branches" ]; then
    parent="$branches"
    break
  fi
done

# Fallback: if nothing found, use main
parent="${parent:-main}"
echo "Parent branch: $parent"

Then gather the full scope of changes:

bash
git diff $parent...HEAD --name-status
git diff $parent...HEAD --stat
git log $parent..HEAD --oneline
git diff $parent...HEAD

Read the current CLAUDE.md to understand what's already documented.

Step 2: Classify changes

Go through each changed file and classify it. Only the first category needs CLAUDE.md updates:

Warrants update — things Claude can't figure out by reading current code:

  • New or removed subscribers, topics, event types, or changes to pub-sub wiring
  • New config sections, settings, or CLI arguments
  • Changes to device lifecycle or setup flow (app_setup.py)
  • New platform-specific behavior or guards
  • New external dependencies or required CLI tools
  • Changed build/test/lint commands or coverage thresholds
  • New architectural patterns, conventions, or gotchas
  • Changes to how existing systems interact (e.g., subscriber now listens on a different topic)

Does NOT warrant update — Claude can infer these from code:

  • Implementation details within established patterns
  • Bug fixes that don't change architecture
  • New fields on dataclasses unless they change behavior flow
  • Test additions or changes
  • Refactors that preserve existing patterns
  • Config parsing changes following the existing pattern
Show full SKILL.md (272 more words)Show less

Step 3: Draft the update

When updating CLAUDE.md, follow these principles:

Edit existing sections, don't append. If the subscriber list changed, update it in place. If a config section was removed, delete its mention. Never create a "Recent changes" or changelog section — CLAUDE.md describes current state, not history.

Remove stale content. Outdated information actively misleads Claude — it's worse than a gap. If something was removed or changed, delete or rewrite the old description.

Keep it scannable. Each line should pass the test: "Would removing this cause Claude to make mistakes?" If not, don't add it. A bloated CLAUDE.md causes Claude to ignore important rules.

What belongs vs what doesn't:

IncludeExclude
Bash commands Claude can't guessAnything derivable from reading code
Code style rules differing from defaultsStandard language conventions
Testing instructions and preferred runnersDetailed API documentation
Architectural decisions specific to projectFile-by-file codebase descriptions
Developer environment quirksFrequently changing information
Common gotchas or non-obvious behaviorsSelf-evident practices

Match existing tone and structure. Write in the same style as the current CLAUDE.md — same heading levels, detail level, and formatting.

Step 4: Present changes before applying

Present a summary to the user before editing:

  • What sections will be added, updated, or removed
  • Why each change is needed (what mistake would Claude make without it?)
  • Any content being removed and the reason

Wait for user approval before making edits.

Step 5: Verify the result

After editing, re-read the full CLAUDE.md and verify:

  • Every line is still accurate
  • Nothing is redundant with what Claude can see in code
  • The file is still concise and scannable
  • Removed content is fully cleaned up (no dangling references)

© MikalaiBarysevich, GPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/update-claude-md of MikalaiBarysevich/CleverSwitch.

Open the folder on GitHubat commit de0a4f4

Compare with similar skills

Update Claude Md next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Update Claude Md compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Update Claude Md this skillMikalaiBarysevich/CleverSwitch117—~1.2kAutomated safety check: PassGPL-3.0
SetupProrise-cool/Claude-Code-Multi-Agent306—~3kAutomated safety check: NotesNone
Git ConfigProrise-cool/Claude-Code-Multi-Agent306—~4.4kAutomated safety check: NotesNone
Gui ToolsProrise-cool/Claude-Code-Multi-Agent306—~2.4kAutomated safety check: NotesNone
Line EndingsProrise-cool/Claude-Code-Multi-Agent306—~3.1kAutomated safety check: NotesNone
Tapd Iteration InitTencentBlueKing/bk-bcs840—~1.3kAutomated safety check: PassCustom licence

Similar skills

  • Setup

    Prorise-cool/Claude-Code-Multi-Agent

    Complete guide to installing Git and performing basic configuration across all platforms (Windows, macOS, Linux, WSL).

    306 GitHub stars~3k tokensUpdated 25 days ago
    DevelopmentAuto-check: notes
  • Git Config

    Prorise-cool/Claude-Code-Multi-Agent

    Comprehensive Git configuration guide covering global settings, aliases, performance tuning, credential management, maintenance, .gitattributes, clone shortcuts, and troubleshooting.

    306 GitHub stars~4.4k tokensUpdated 25 days ago
    DevelopmentAuto-check: notes
  • Gui Tools

    Prorise-cool/Claude-Code-Multi-Agent

    Provides guidance for installing, configuring, and choosing Git graphical interface clients (GitKraken, Sourcetree, GitHub Desktop) across platforms.

    306 GitHub stars~2.4k tokensUpdated 25 days ago
    DevelopmentAuto-check: notes
  • Line Endings

    Prorise-cool/Claude-Code-Multi-Agent

    Comprehensive guide to Git line ending configuration for cross-platform development teams.

    306 GitHub stars~3.1k tokensUpdated 25 days ago
    DevelopmentAuto-check: notes
  • Tapd Iteration Init

    TencentBlueKing/bk-bcs

    迭代执行流水线启动器。分三个阶段执行:信息检查(验证 git 环境、获取迭代信息、 解析迭代分支)→ 恢复检测(已有状态文件时判定恢复策略)→ 新流程初始化(创建分支、 迭代目录和 iteration-state.json)。

    840 GitHub stars~1.3k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Cortex Mem MCP

    sopaco/cortex-mem

    Persistent memory enhancement for AI agents. An agent skill from sopaco/cortex-mem.

    313 GitHub stars~2.8k tokensUpdated 2 mo ago
    Agent WorkflowsAuto-check passed

More from MikalaiBarysevich/CleverSwitch

  • Release Notes

    MikalaiBarysevich/CleverSwitch

    Generate GitHub release notes for unreleased CleverSwitch tags in the established repo format.

    117 GitHub stars~975 tokensUpdated 5 days ago
    Auto-check passed

Works with

Categories

Questions about Update Claude Md

What does Update Claude Md do?

Analyze all changes in the current git branch and update CLAUDE.md if architectural or important changes warrant it. Update Claude Md is an agent skill from MikalaiBarysevich/CleverSwitch.md if architectural or important changes warrant it.

When should I use Update Claude Md?

Update Claude Md fits situations like: the user asks to update CLAUDE.md; sync docs with branch changes; review what changed architecturally; before creating a PR to ensure documentation is current.

How do I install Update Claude Md in Claude Code?

Run `npx skills add MikalaiBarysevich/CleverSwitch --skill update-claude-md -a claude-code`. Or copy the skill folder (.claude/skills/update-claude-md in MikalaiBarysevich/CleverSwitch) into .claude/skills/update-claude-md in your project. Claude Code loads it when a task matches its description.

How do I install Update Claude Md in Codex?

Run `npx skills add MikalaiBarysevich/CleverSwitch --skill update-claude-md -a codex`. Or copy the skill folder (.claude/skills/update-claude-md in MikalaiBarysevich/CleverSwitch) into .agents/skills/update-claude-md in your project. Codex loads it when a task matches its description.

Can I use Update Claude Md in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add MikalaiBarysevich/CleverSwitch --skill update-claude-md -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/update-claude-md, .gemini/skills/update-claude-md, .github/skills/update-claude-md and .opencode/skills/update-claude-md in your project.

What does Update Claude Md need to run?

Going by SKILL.md and its folder, Update Claude Md needs the command-line tools its instructions call (git).

Does Update Claude Md access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Update Claude Md safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Update Claude Md use?

Update Claude Md is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Update Claude Md use?

About 1.2k tokens (SKILL.md is roughly 5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Update Claude Md?

Skills that share tags, products or a category with Update Claude Md: Setup (Prorise-cool/Claude-Code-Multi-Agent, 306 stars), Git Config (Prorise-cool/Claude-Code-Multi-Agent, 306 stars), Gui Tools (Prorise-cool/Claude-Code-Multi-Agent, 306 stars) and Line Endings (Prorise-cool/Claude-Code-Multi-Agent, 306 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Update Claude Md?

MikalaiBarysevich (a GitHub user) maintains it in MikalaiBarysevich/CleverSwitch, which has 117 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on October 5, 2026.

Source: MikalaiBarysevich/CleverSwitch on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.