Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

48 Commits

Folders and files

Repository files navigation

Knowledge map

A Claude Code skill for your first months in a new codebase. It reads the MRs (or PRs) you wrote and reviewed, and draws a map of the repo:

  • Areas you know: parts of the product where you wrote or reviewed a merged MR.
  • Blind spots: parts you haven't touched yet.
  • Reviews to pick up: open MRs that touch your Blind spots.

Each box on the map is an Area. The Areas you know are sized by how many of your MRs touched them, with your written and reviewed counts in their own colour. Blind spots sit in a band along the bottom, sized by how many MRs were ever merged into them. Click a box to see your MRs there, where to start reading, and its most changed files (ticked where you've been).

What you need

  • Claude Code
  • Python 3.9 or newer, and git
  • gh logged in for GitHub repos, or glab logged in for GitLab repos (including self-hosted GitLab)

Install

As a plugin, from inside Claude Code:

/plugin marketplace add samedi/knowledge-map
/plugin install knowledge-map@knowledge-map

Or copy the skill folder into your own skills:

cp -r plugins/knowledge-map/skills/knowledge-map ~/.claude/skills/

Use

In the repo you want to learn, run:

/knowledge-map

The first run reads the repo's history and asks Claude to group the code into 15 to 30 Areas, such as "Checkout" or "Billing", and to pick a few files in each where a newcomer should start reading. You get to rename, merge or split them before the map is drawn. Later runs read only new MRs and redraw the map in seconds.

When the code has grown past the Areas, run /knowledge-map rebuild to have them proposed again.

What it reads and where it keeps it

  • Local git gives every MR merged into the default branch and the files it changed.
  • GitHub or GitLab gives the MRs you wrote, the MRs you commented on or approved, and the open MRs. These calls go through your own gh or glab login.

Everything is saved in .knowledge-map/ at the repo root. That folder is added to .git/info/exclude, so it never shows up in git status or gets committed. The page is a single HTML file named after the repo, such as .knowledge-map/shop.html, and it makes no network calls. On GitHub repos it says PRs, on GitLab repos MRs.

Limits

  • Only MRs merged into the default branch count. An MR merged into another branch first doesn't count; the MR that later brings that branch into the default branch does.
  • The merge commit has to name its MR: GitLab's "See merge request !123", GitHub's "Merge pull request #123", or a squash commit ending in "(#123)". Rebase merges without a number can't be read.
  • Being assigned as a reviewer doesn't count as Contact. Commenting on or approving the MR does.

Development

python3 -m unittest discover -s tests

The tests build small invented git repos and serve recorded API answers, so they need no network or login.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages