dgv

dgv is a skill for Claude Code, Codex from ShAInyXYZ/Dia-GramV. It costs 159 tokens per session (1,681 once invoked), scanned A, original, MIT.

A diagramming workflow for planning a system's architecture before writing code. It represents components and their connections with typed nodes and links, then checks the diagram for mistakes.

In plain words
What is it for?
Use it to map applications, modules, APIs, programs, databases, and bridges, or to review an existing codebase's structure.
Why use it?
A written plan can hide broken connections, missing services, or incompatible communication methods; the diagram and checks expose these problems early.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions CLAUDE.md.

Good fit Use it to map applications, modules, APIs, programs, databases, and bridges, or to review an existing codebase's structure.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/shainyxyz/dia-gramv/skill
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 ShAInyXYZ/Dia-GramV --skill skill
Clone the repo
git clone --depth 1 https://github.com/ShAInyXYZ/Dia-GramV

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 dgv

README.md
[![agentmods](https://agentmods.dev/badge/skills/shainyxyz/dia-gramv/skill/github.svg)](https://agentmods.dev/skills/shainyxyz/dia-gramv/skill)
Your own site
<a href="https://agentmods.dev/skills/shainyxyz/dia-gramv/skill"><img src="https://agentmods.dev/badge/skills/shainyxyz/dia-gramv/skill/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 dgv

Your own site · 80×15
<a href="https://agentmods.dev/skills/shainyxyz/dia-gramv/skill"><img src="https://agentmods.dev/badge/skills/shainyxyz/dia-gramv/skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 159 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,681 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.00159 $0.01681
Opus 5 $0.00079 $0.00840
Sonnet 5 $0.00032 $0.00336
Haiku 4.5 $0.00016 $0.00168

Measured 10d ago against content hash 6ec7ab25eb85, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

dgv 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 10d ago.

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.

skill/SKILL.md · 46 lines

How it starts

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

Dia-GramV (DGV)

One diagram per system, stored as dgv/<name>.dgv.json in the project. The agent authors it through MCP tools; the developer sees it live in the viewer and can drag, edit, and save from there. The file is the single source of truth — both sides read and write it.

Why it exists: a plan written in prose hides incompatibilities (a module calling a DB over HTTP, a service that nobody starts, a bridge with one side, an API nobody calls, an import cycle). DGV makes every component a typed node with ports, every relation a typed edge with a protocol, and lints the whole thing so those mistakes surface before code — instead of after a day of tokens.

Workflow (always this order)

  1. dgv_catalog once per session — the allowed node kinds, edge kinds, protocols. Never invent a kind.
  2. dgv_list / dgv_read — is there already a diagram for this system? Read it before reading code: it is the map, and it is cheaper than the tree. Extend it; do not create a second one for the same system.
  3. dgv_create (new) then dgv_apply in a few large batches, not one node per call:
    • frames first (boundaries: machine, process, service group, remote), then nodes with frame, then edges.
    • every node: kind, label, short sublabel, tech, and path — the file or directory that implements it (a glob or a list is fine). No path on things that are not code here: devices, externals, stores. Add ports on anything that is called (api, service, db, model, sidecar): { id, protocol, dir, shape } where shape says what crosses it ("JSON /api/v1", "text[] → float[][]").
    • every edge: kind (sync | async | data | import | deploy | control), protocol, label (what happens), targetPort when the target declares ports, payload when the shape matters.
    • never send position — DGV places new nodes; call dgv_layout after a batch.
  4. Read the lint report dgv_apply returns. Fix every error by changing only the named subject using one of its fixes. Warnings are advice: fix them when they reveal a real gap (orphans, unspecified contracts, one-sided bridges). When a warning is intentional, set ack: "<why>" on that element via dgv_apply — it becomes info and the reason travels with the diagram. Never ack something you have not verified.
  5. Flag what lint cannot see. A diagram can lint clean and still be wrong. When you read it and spot an incoherence — a process with an exec edge in and nothing else, so every settings change is a restart; the same module imported by three programs that each load it again; a spawned child with no death-pact; a store written by two producers with no shared schema — dgv_flag it on the element: title (one line, what is wrong), note (what you saw, why it matters), fix (the concrete change), kind issue | idea | question. The viewer shows it as a bubble on that card until it is resolved, and lint lists it (flag/issue = warning). Flag the element, not the diagram; never flag what a lint rule already reports; never flag what you have not verified in the code. When you fix it — or the user says it is intentional — dgv_resolve. Open flags appear as ⚑ in dgv_read and at session start: treat them as the to-do list of the architecture.
  6. dgv_layout then dgv_open — tell the user the URL. They may rearrange and save; re-read with dgv_read before your next edit so you never overwrite their layout.
  7. dgv_export format=markdown when the plan is agreed → paste into the project's docs / CLAUDE.md so the build follows it.
  8. While building and before you stop: dgv_drift. Fix drift/missing first (the code moved: update path; the node is gone: remove it, or status: todo if it is not written yet). For drift/unclaimed, add a node or widen a path — or put the directory in meta.driftIgnore with good reason. Then set status on what you built or changed. A diagram that is not updated is worse than none: the next session will trust it. Every dgv_apply, dgv_flag and dgv_resolve is recorded in the diagram's history (dgv_history, also the tail of dgv_read): who (agent or viewer) changed what on which element. Read it when the user asks what changed, or when the file differs from what you remember — the viewer's saves show up there as viewer.

Read the full file on GitHub · 46 lines

Files

What ships with it

3 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. 10d ago First seen · 46 lines · 159 tokens per session scan A 6ec7ab25eb85

Subscribe to this mod's changes

dgv is a skill published in the GitHub repository ShAInyXYZ/Dia-GramV (6 stars, last pushed 10d ago), licensed MIT. It adds 159 tokens to every session and 1,681 once invoked, about $0.0008 per session on Opus 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-08-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens