product-map
Skill191 starsChanged 8 months agoMITView on GitHub
Create and maintain a repository's DiffKit product map, the .diffkit folder that describes the product as plain-language areas and says which code belongs to each. Use when asked to set up, update or fix the product map, and after any change that adds, moves, renames or removes a feature, screen, module or folder in a repository that has a .diffkit folder.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- Thoven-CORP/agent-skillstheir own version, first seen Nov 29, 2026
- nuthinking/skillstheir own version, first seen Nov 3, 2026
- PackmindHub/packmindtheir own version, first seen Sep 21, 2026
- friendlyin/jim-skillstheir own version, first seen Jun 21, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- PackmindHub/packmind★ 323same name
- friendlyin/jim-skills★ 2same name
- Thoven-CORP/agent-skills★ 1same name
- nuthinking/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repositoryOne other file it gives its agents.
- AGENTS.mdAGENTS.md
The file
Show its rules and text
We split this skill into the rules it gives an agent
21 rules. 0 are common, 9 are distinctive, and 12 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
9
Distinctive
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 28
The format is closed: Only the fields, icons and step kinds listed in references/format.md exist.
- Very specific: line 31
Nothing that can be looked up: No counts, sizes, dates, line numbers, function names or lists of files.
- Very specific: line 42
All in this skill's scripts/ folder.
- Distinctive: line 54
Do this in the same pull request as the code change.
- Very specific: line 56
Run node <skill>/scripts/changed.mjs.
- Very specific: line 62
New files no area covers: Add a pattern to the paths of the area each belongs to, at folder level.
- Very specific: line 68
Run node <skill>/scripts/check.mjs --fix until it exits 0.
- Distinctive: line 77
Ask these three questions together, with your question tool if you have one.
- Distinctive: line 78
If you cannot ask, or the user told you to proceed on your own, take the defaults and say which you took.
- Very specific: line 81
What to map: Default: the whole repository.
- Distinctive: line 84
Check the map in CI?: Default: yes. Adds a workflow that validates the map on every pull request.
- Distinctive: line 86
Refresh it every week?: Default: no. Adds a scheduled workflow where a coding agent updates the map and opens a pull request.
- Very specific: line 93
Run survey.mjs. Propose areas from its output: things a user or a new contributor would recognise, named in plain language ("Checkout", …
- Very specific: line 103
Run check.mjs --fix. Add patterns or ignore entries until few files are left outside the map, and fix everything it reports.
- Distinctive: line 105
Add the note below to AGENTS.md (create it if there is none.
- Distinctive: line 108
Add the workflows the user chose, as described in references/automation.md.
- Distinctive: line 110
Commit on a new branch and open a pull request titled "Add a product map".
- Very specific: line 138
Patterns at folder level: Write apps/billing/, not a list of files.
- Very specific: line 141
Work in parallel when you can: If you can start subagents, give each one 3 to 6 areas, the survey output and this skill.
- Distinctive: line 145
Very large or unfamiliar repositories: Start with one area per top-level app or package, get the checker passing, then split only the areas …
- Very specific: line 151
When DiffKit says the map needs fixing, run check.mjs --fix: it prints the same problems.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Product map
DiffKit shows a repository as a product: its areas in plain language, how each
works and where its code lives. The repository owns that description as small
files in .diffkit/.
.diffkit/
map.json the overview: pitch, groups of areas, outside systems, tour
areas/
<area-id>.json one area: what it is, how it works, which folders are its ownThe files hold only what someone has to say. DiffKit works out the rest when the map is opened: sizes, pull requests, people, and the files in each area that change the most.
Rules that do not bend
- The format is closed. Only the fields, icons and step kinds listed in references/format.md exist. Anything else makes DiffKit reject the whole map. Do not add a field because it seems useful.
- Nothing that can be looked up. No counts, sizes, dates, line numbers, function names or lists of files. An area names its folders with a few patterns and DiffKit finds everything inside them.
- Keep it short. An area file is about a hundred lines. If one grows past that, it is describing code instead of the product.
- Only what you opened. Describe nothing from its file name alone.
- The checker decides when you are done. The work is finished only when
check.mjs --fixexits 0. Never commit a map it rejects.
Tools
All in this skill's scripts/ folder. They need Node 18 or later and no
install. Run them from the repository root.
| Script | What it is for |
survey.mjs | A bounded inventory of the repository: folders by size, packages, likely entry points, most changed files. Same length for any repository size. |
scaffold.mjs | Writes map.json and new area files in the exact accepted shape. Use it instead of typing the structure. |
changed.mjs | Says which areas a change touched, which mentioned files are gone, and which new files no area covers. |
check.mjs --fix | Puts keys in the format's order, then validates exactly as DiffKit does and checks the map against the code. |
Keep it current (the usual job)
Do this in the same pull request as the code change.
- Run
node <skill>/scripts/changed.mjs. If it says no update is needed, stop: there is nothing to do. - Files that are gone. Fix every path it lists first.
- Areas whose code changed. Open only those area files. Update the
summary,flowandfeatureswhere what they say is now wrong. Leave what your change did not affect exactly as it is. - New files no area covers. Add a pattern to the
pathsof the area each belongs to, at folder level. Generated or vendored files go inignoreinmap.jsoninstead. - A new product area gets
scaffold.mjs area …. Add one only for something a user or a new contributor would name as its own thing, not for a new folder. - Run
node <skill>/scripts/check.mjs --fixuntil it exits 0.
Most changes need no map edit at all: a bug fix, a refactor, a new file in a folder an area already covers.
Set it up
Ask first
Ask these three questions together, with your question tool if you have one. If you cannot ask, or the user told you to proceed on your own, take the defaults and say which you took.
- What to map. Default: the whole repository. In a monorepo, offer the
apps and packages
survey.mjslists and let the user leave some out; put the ones left out inignore. - Check the map in CI? Default: yes. Adds a workflow that validates the map on every pull request. It needs no secret.
- Refresh it every week? Default: no. Adds a scheduled workflow where a coding agent updates the map and opens a pull request. Options: Claude Code, Codex, or no. It needs an API key stored as a repository secret, so never choose it for the user.
Then build it
- Run
survey.mjs. Propose areas from its output: things a user or a new contributor would recognise, named in plain language ("Checkout", "Search", "Billing sync"), not after folders. Aim for 6 to 30. Group them into 2 to 5 bands. scaffold.mjs init --pitch "…", then onescaffold.mjs area …per area with its name, tagline, summary, paths and its band and group.- Fill in each area file:
flow,features,dependsOn,outside. Follow "Large repositories" below for how much to read. - In
map.json, add theoutsidesystems the areas name and atourof 4 to 8 stops that walks a newcomer through the product. - Run
check.mjs --fix. Add patterns orignoreentries until few files are left outside the map, and fix everything it reports. - Add the note below to
AGENTS.md(create it if there is none; also add it toCLAUDE.mdif the repository has one that does not importAGENTS.md). - Add the workflows the user chose, as described in references/automation.md.
- Commit on a new branch and open a pull request titled "Add a product map". In its description, say what you set up and what the user still has to do (for a weekly refresh: add the secret).
The AGENTS.md note
## Product map
`.diffkit/` describes this product as areas: `map.json` is the overview and
each file in `areas/` covers one area and lists the folders that belong to it.
When a change adds, moves, renames or removes a feature, screen, module or
folder, update the matching area file in the same pull request. The
`product-map` skill has the steps, the format and a checker
(`npx skills add stylessh/diffkit --skill product-map`).Large repositories
The map describes a product, not every file, so the work must not grow with the repository.
- Do not walk the tree.
survey.mjsis the inventory. Do not list directories or read files to find out what exists. - Read a fixed amount per area. For each area, open its entry points and
the files
survey.mjslists as most changed inside it: about 10 to 15 files, never the whole folder. That is enough for a flow of 3 to 6 steps and 3 to 8 features. - Patterns at folder level. Write
apps/billing/**, not a list of files. A handful of patterns per area is normal; dozens means the area is drawn along the wrong line. - Work in parallel when you can. If you can start subagents, give each
one 3 to 6 areas, the survey output and this skill. Each writes only its
own area files, so they never conflict. Write
map.jsonyourself once they are done. - Very large or unfamiliar repositories. Start with one area per top-level app or package, get the checker passing, then split only the areas that carry most of the changes.
Fix it
When DiffKit says the map needs fixing, run check.mjs --fix: it prints the
same problems. Fix only those and run it again until it exits 0.
Writing rules
- Plain language. No jargon the product's own users would not know, and no
internal code names in
name,taglineorsummary. - Short. A
summaryis one or two sentences; a flow step'snoteand a feature'ssummaryare one each. - Per area: a
flowof 3 to 6 steps and 3 to 8features. - A flow step or a feature may name one file with
path, and only when there is an obvious one to open first. Most need none.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

