# Kmg sidebar update

> Kmg sidebar update is an open-source agent skill for developer tools. Keeps a docs sidebar navigation in sync when a docs file is moved or renamed. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/technomensch/knowledge-graph/tree/main/skills/kmg-sidebar-update
- **Repository:** https://github.com/technomensch/knowledge-graph
- **GitHub stars:** 6
- **License:** MIT
- **Skill name:** kmg-sidebar-update
- **Collection:** https://github.com/technomensch/knowledge-graph
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

This skill handles the bookkeeping that follows a docs file move or rename in a Docusaurus-style documentation site. It extracts the old and new paths, locates the matching entry in sidebars.js, and swaps the document id while keeping the existing label unless a new one is given.

After the sidebar change, the skill searches the docs folder for Markdown and MDX files that still reference the old path and offers to update those references in place. It also covers edge cases such as moves between sidebar categories, duplicate entries, label changes, and autogenerated sidebars, asking the user before making those decisions.

The skill works through grep and file edits in the repository and expects a sidebars.js file and a docs/ directory. The source is a Claude Code plugin from the knowledge-management-graph marketplace.

## When your agent uses it

> Fires when a docs file is moved or renamed to keep sidebar navigation in sync

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/technomensch/knowledge-graph/tree/HEAD/skills/kmg-sidebar-update)
- [License: MIT](https://github.com/technomensch/knowledge-graph/tree/HEAD/skills/kmg-sidebar-update)

## Features

- **Sidebar entry lookup:** Finds the sidebar line that references the document's old path and shows its category context.
- **Document id update:** Replaces the stale doc id in sidebars.js with the new path while preserving the label.
- **Internal link scan:** Searches docs Markdown and MDX files for references to the old path and offers to fix them.
- **Category move handling:** Asks whether a moved entry should go to a different sidebar category block.
- **Completion summary:** Reports the sidebar change and the number of internal links updated.

## Good for

- Update the sidebar after renaming a guide in docs/
- Move a document into a new folder and keep navigation working
- Find internal links that still point to a document's old path
- Check whether a renamed page has a matching sidebar entry

## Install

### Claude Code

This skill ships in the `kmgraph` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add technomensch/knowledge-graph
/plugin install kmgraph@knowledge-management-graph
```

Or copy only this skill to `~/.claude/skills/kmg-sidebar-update`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/technomensch/knowledge-graph.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/kmg-sidebar-update &&
cp -R "$tmp/skills/kmg-sidebar-update" ~/.claude/skills/kmg-sidebar-update &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/kmg-sidebar-update` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/kmg-sidebar-update` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/technomensch/knowledge-graph.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/kmg-sidebar-update &&
cp -R "$tmp/skills/kmg-sidebar-update" ~/.agents/skills/kmg-sidebar-update &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/kmg-sidebar-update` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/kmg-sidebar-update` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/technomensch/knowledge-graph.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/kmg-sidebar-update &&
cp -R "$tmp/skills/kmg-sidebar-update" ~/.cursor/skills/kmg-sidebar-update &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/kmg-sidebar-update` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/technomensch/knowledge-graph.git --path skills/kmg-sidebar-update
```

Or copy the folder to `~/.gemini/skills/kmg-sidebar-update` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/kmg-sidebar-update`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/technomensch/knowledge-graph.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/kmg-sidebar-update &&
cp -R "$tmp/skills/kmg-sidebar-update" ~/.copilot/skills/kmg-sidebar-update &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/kmg-sidebar-update` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/technomensch/knowledge-graph.git
```

Then copy `knowledge-graph/skills/kmg-sidebar-update` into your agent's skills folder as `kmg-sidebar-update`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When does Kmg sidebar update trigger?

It fires when a docs file is moved or renamed, for example through a git mv command in the conversation, an Edit or Write targeting a docs/ path, or a user request to move, rename or relocate a document.

### Does Kmg sidebar update apply to files outside docs/?

No. The skill states it does not apply to non-docs files, such as commands, skills or templates, or to files outside docs/.

### What happens if the file has no sidebar entry?

The skill reports that no sidebar entry was found and offers to add one for the new path, then stops without scanning for links.

### Does Kmg sidebar update change the sidebar label?

It keeps the existing label unless the user provides a new one, and it asks before changing the label when a rename suggests a different one.

### How do I install Kmg sidebar update in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/kmg-sidebar-update to use it in all your projects, or to .claude/skills/kmg-sidebar-update in one project. Or install the kmgraph plugin, which includes it: /plugin marketplace add technomensch/knowledge-graph, then /plugin install kmgraph@knowledge-management-graph.

### Does Kmg sidebar update run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Kmg sidebar update?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Kmg sidebar update?

The closest alternatives to Kmg sidebar update are Manage navigation, Docs sync edho ferdian, Kmg doc update router, Sync SDK skill and Doc gardening.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Manage navigation](https://ai-powered.com/skills/manage-navigation): Manage navigation is an open-source agent skill for developer tools.
- [Docs sync edho ferdian](https://ai-powered.com/skills/docs-sync-edho-ferdian): Docs sync edho ferdian is an open-source agent skill for developer tools.
- [Kmg doc update router](https://ai-powered.com/skills/kmg-doc-update-router): Kmg doc update router is an open-source agent skill for developer tools.
- [Sync SDK skill](https://ai-powered.com/skills/sync-sdk-skill): Sync SDK skill is an open-source agent skill for developer tools.
- [Doc gardening](https://ai-powered.com/skills/doc-gardening): Doc gardening is an open-source agent skill for developer tools.
- [Managing readme docs](https://ai-powered.com/skills/managing-readme-docs): Managing readme docs is an open-source agent skill for developer tools.
- [Refresh docs](https://ai-powered.com/skills/refresh-docs-ajyadav013): Refresh docs is an open-source agent skill for developer tools.
- [Sync docs](https://ai-powered.com/skills/sync-docs): Sync docs is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/kmg-sidebar-update
