rebuild-package-diagrams

rebuild-package-diagrams is a skill for Claude Code, Codex from BlackBeltTechnology/pi-agent-dashboard. It costs 94 tokens per session (5,109 once invoked), scanned A, original, MIT.

A diagram-building workflow for a reverse-spec package: a data-model diagram, business-process diagrams, and a browsable HTML catalogue. A reverse spec is documentation reconstructed from an existing system.

In plain words
What is it for?
Use it to render entity relationships, represent use cases as BPMN process diagrams, and build a browsable catalogue from the package.
Why use it?
It checks that diagrams use only entities, fields, rules, and references present in the source package. This helps prevent invented relationships or process steps.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to render entity relationships, represent use cases as BPMN process diagrams, and build a browsable catalogue from the package.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/blackbelttechnology/pi-agent-dashboard/rebuild-package-diagrams
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add BlackBeltTechnology/pi-agent-dashboard --skill rebuild-package-diagrams
Clone the repo
git clone --depth 1 https://github.com/BlackBeltTechnology/pi-agent-dashboard

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for rebuild-package-diagrams

README.md
[![agentmods](https://agentmods.dev/badge/skills/blackbelttechnology/pi-agent-dashboard/rebuild-package-diagrams/github.svg)](https://agentmods.dev/skills/blackbelttechnology/pi-agent-dashboard/rebuild-package-diagrams)
Your own site
<a href="https://agentmods.dev/skills/blackbelttechnology/pi-agent-dashboard/rebuild-package-diagrams"><img src="https://agentmods.dev/badge/skills/blackbelttechnology/pi-agent-dashboard/rebuild-package-diagrams/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rebuild-package-diagrams

Your own site · 80×15
<a href="https://agentmods.dev/skills/blackbelttechnology/pi-agent-dashboard/rebuild-package-diagrams"><img src="https://agentmods.dev/badge/skills/blackbelttechnology/pi-agent-dashboard/rebuild-package-diagrams.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 94 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,109 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00094 $0.05109
Opus 5.5 $0.00038 $0.02044
Sonnet 5.5 $0.00019 $0.01022
Haiku 4.5 $0.00009 $0.00511

Measured 5d ago against content hash 27a28a6ee30d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

rebuild-package-diagrams scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

The scan reads SKILL.md. This mod also ships 15 executable files (assets/ifml-js/ifml-navigated-viewer.production.min.js, scripts/arch.mjs, scripts/behaviour.mjs, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/eng-disciplines/.pi/skills/rebuild-package-diagrams/SKILL.md · 281 lines

How it starts

The opening of the file, as written. The whole thing — 281 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Rebuild package diagrams

Turn the text of a reverse-spec-for-rebuild package into two visual views without inventing anything:

  • ER view — domain entities of model.md with keys and cardinality.
  • Process view — actor-triggered use cases of capabilities/<cap>/spec.md as BPMN 2.0.

The agent does the judgement (which entities are domain, which cardinality, which requirements form a use case). A deterministic script is the gate: it refuses any entity, field or rule id that is not in the package, any relation without evidence and any BPMN node without a resolvable ref.

Inputs

PKG = a rebuild package directory holding model.md, rules.md, quirks.md, gaps.md, capabilities/<cap>/spec.md (the reverse-spec-for-rebuild layout). Output goes to PKG/diagrams/ unless the user names another place. The source package is never edited.

D = node <this skill dir>/scripts/diagrams.mjs — subcommands extract-model, render-er, check-trace, check-use-cases, build-site (Node ≥ 20, no deps; exit 2 = bad usage/input). Parsers/gates live in scripts/lib.mjs, the catalog assembly in scripts/site.mjs, the page in templates/catalog.html, templates/catalog.css, templates/catalog.js.

Optional peers: mmdc (Mermaid CLI) for PNG/SVG; the bpmn-package-explorer skill for BPMN layout, validation and the canvas viewer. Without them the .mmd/.bpmn sources are still produced and checked.

Procedure — ER view

  1. $D extract-model PKG/model.md > PKG/diagrams/model.json. Each entity carries capabilities, identity, persistence, persistent (heuristic: persistence line names a table/row/collection/DB), fields[] and relationships text.
  2. Classify every entity (read identity + persistence, not only the flag) per references/er-mapping.md: domain (persisted business data or the in-memory aggregate that owns it), config, ui, test, technical. Only domain goes on the main diagram. Write the classification table to PKG/diagrams/er-scope.md (entity · class · one-line reason) so the user can overrule it.
  3. Group domain entities into 4–8 clusters (one per subject area; capabilities are a good first cut). Clusters keep each diagram readable (≤ ~15 entities).
  4. Author PKG/diagrams/er/<cluster>.json and one overview.json (≤ ~25 hub entities, no attributes — a 40-box overview with attributes is unreadable) in the er.json schema of references/er-mapping.md: keys (PK/FK/UK) and a few business-defining fields per entity; relations with cardinality, label, confidence, evidence. Evidence = a verbatim substring of either endpoint's Relationships: text, or the exact name of a field on either endpoint.
  5. $D render-er PKG/diagrams/er/<x>.json PKG/diagrams/model.json > PKG/diagrams/er/<x>.mmd for each file. Exit 1 lists every violation — fix the JSON, never the check. Relations not confirmed render dashed.
  6. Render images when mmdc exists: mmdc -i x.mmd -o x.png -b white -s 2 (see Pitfalls for the Chrome path).

Read the full file on GitHub · 281 lines

Files

What ships with it

60 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 281 lines · 94 tokens per session scan A 27a28a6ee30d

Subscribe to this mod's changes

rebuild-package-diagrams is a skill published in the GitHub repository BlackBeltTechnology/pi-agent-dashboard (319 stars, last pushed yesterday), licensed MIT. It adds 94 tokens to every session and 5,109 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-11.