The agent skill
The skill is a folder: SKILL.md plus references and examples. Agents that support skills load it when you ask for a map, a diagram or an explanation of a system.
Install it with npx skills add decimozs/schemap (see Quick start). The installer copies the whole folder below.
skill/├── SKILL.md the steps the agent follows├── bin/schemap.mjs the CLI as one file: elkjs and the viewer inlined├── references/│ ├── authoring-contract.md how to model a system│ ├── schema.md every field│ └── schemap.schema.json JSON Schema for editors and agents└── examples/ one map per kindThe steps
Section titled “The steps”- Pick the kind by what the edges mean.
- Gather facts: from the code for repository maps, or only what the user said.
- Write the complete
map.jsonin.schemap/<slug>/, following the authoring contract. - Validate with
validate --json. - Repair only what the diagnostics name, using an allowed fix at the named place. Stop and report if two rounds don’t reduce the errors.
- Deliver with
deliver --open. - Embed when asked, with
--md-dirset to the markdown file’s directory. - Check evidence for repository maps: every cited file must exist.
- Report the file paths, the receipt and any warnings left.
Running the CLI
Section titled “Running the CLI”The agent runs node <skill-dir>/bin/schemap.mjs, the CLI that ships with the skill. It needs Node.js 22.12 or later and nothing else. If SCHEMAP_BIN is set, it runs node "$SCHEMAP_BIN" instead, to try another build. A failure with no JSON on stdout means the CLI never ran (Node missing or too old); the agent reports that instead of editing the map.
What the agent never does
Section titled “What the agent never does”- Write coordinates or styling: layout and look are schemap’s job.
- Copy secrets, hostnames or IPs from config: nodes are named by role.
- Start over when asked for an edit: it edits the same
map.jsonand keeps ids stable. - Add a
themeunless you ask for your own colours.