diagramming-code

diagramming-code is a skill for Codex from OutlineDriven/outline-driven-development. It costs 69 tokens per session (1,143 once invoked), scanned A, original, Apache-2.0.

A code-structure diagram generator that turns relationships in source code into Mermaid diagrams, a text format for diagrams.

In plain words
What is it for?
Use it to create call graphs, class hierarchies, module maps, complexity views, or data-flow diagrams from code.
Why use it?
It makes calls, dependencies, class relationships, containment, complexity, or data flow easier to inspect.

Skill for Codex

Written for Codex: agents/openai.yaml present.

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.

agentmods
npx agentmods add skills/outlinedriven/outline-driven-development/diagramming-code
Any agent
npx skills add OutlineDriven/outline-driven-development --skill diagramming-code
Clone the repo
git clone --depth 1 https://github.com/OutlineDriven/outline-driven-development

Made for: 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 diagramming-code

README.md
[![agentmods](https://agentmods.dev/badge/skills/outlinedriven/outline-driven-development/diagramming-code.svg)](https://agentmods.dev/skills/outlinedriven/outline-driven-development/diagramming-code)
Your own site
<a href="https://agentmods.dev/skills/outlinedriven/outline-driven-development/diagramming-code"><img src="https://agentmods.dev/badge/skills/outlinedriven/outline-driven-development/diagramming-code.svg" alt="Measured on agentmods" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,143 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00069 $0.01143
Opus 5 $0.00034 $0.00571
Sonnet 5 $0.00014 $0.00229
Haiku 4.5 $0.00007 $0.00114

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

Security

Grade A, and why

diagramming-code 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 2d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.devin/skills/diagramming-code/SKILL.md · 59 lines

How it starts

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

Diagramming code

Contract

Field Bound contract
Trigger The user asks for a call graph, class hierarchy, module dependency map, containment view, complexity heatmap, or attack-surface/data-flow view derived from code.
Authority Write only generated Mermaid graph text or an embedded Mermaid diagram to the local response or a named local file. No source, VCS, credential, paid, published, deployed, or remote mutation. Roll back by deleting the emitted artifact.
Side effect Generated Mermaid graph text or an embedded Mermaid diagram in the local response or a named local file.
Done The requested graph type is non-empty or honestly explains why no matching edges exist, is scoped to a readable size, and uses valid Mermaid syntax.

Inputs

  • Target code directory or path (required).
  • Diagram type, one of: call-graph, class-hierarchy, module-deps, containment, complexity, data-flow (required).
  • Focus node (optional; required for call-graph and data-flow on non-trivial codebases).
  • Traversal depth (optional; default 2).
  • Layout direction, TB or LR (optional; default TB; prefer LR for module-deps).
  • Complexity threshold (optional; default 10; only for complexity).
  • Source language or auto (optional; default auto).

Procedure

  1. Confirm the target directory and diagram type. Do not widen to other types or mutate source files. Done when: the target directory and diagram type are confirmed.

  2. Read and search the target code to derive graph edges from its actual structure. Do not invent relationships. Map the request to its diagram type and Mermaid form:

    • call-graph → flowchart; edges from call relationships; arrow style by confidence: --> certain (direct call), -.-> inferred (attribute access on non-self), ..-> uncertain (dynamic dispatch).
    • class-hierarchy → classDiagram; <|-- inherits, <|.. implements.
    • module-deps → flowchart LR; edges from import relationships.
    • containment → classDiagram with member lists; edges from containment relationships.
    • complexity → flowchart with classDef styles; include only nodes meeting the threshold; color scale: low green CC < 5, medium yellow CC 5-10, high red CC > 10.
    • data-flow → flowchart; paths from entrypoints (user input, API endpoints) to sensitive functions; style entrypoints blue. Without focus, target the top 10 complexity hotspots reachable from entrypoints.

Read the full file on GitHub · 59 lines

Files

What ships with it

1 file 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. 2d ago First seen · 59 lines · 69 tokens per session scan A 6c4dd4e75f99

Subscribe to this mod's changes

diagramming-code is a skill published in the GitHub repository OutlineDriven/outline-driven-development (52 stars, last pushed yesterday), licensed Apache-2.0. It adds 69 tokens to every session and 1,143 once invoked, about $0.0003 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-09-03.

Related

Other skills, from other repositories

fin-brief-generator

根据用户输入或已有研究输出(文献综述/想法报告/新颖性报告),自动生成或更新FINBRIEF.md,减少用户填写负担。.

csmar432/finai-research · 42 tokens

doc-review

Use when the user asks to review or critique a prose planning document — a plan, spec, PRD, requirements doc, or design doc.

OutlineDriven/odin-claude-plugin · 32 tokens

autolearn

Compound a solved problem into a durable in-repo learning doc. Use when a verified non-trivial fix lands, the user says "compound this", "document this fix", or "remember this". This is the automatic-capture entry point; for an explicitly requested one-off write-up, use compound.

OutlineDriven/odin-claude-plugin · 65 tokens

askme

Explore intent with Verbalized Sampling before planning. Use when the task is ambiguous, you need maximum clarifying questions, or you want collaborative or adversarial mode via /askme.

OutlineDriven/odin-claude-plugin · 40 tokens

deps-upgrade

Use when dependency upgrades need tiered batches for CVEs, a major release, forced compatibility, scheduled hygiene, a pre-release lockfile audit, or a cadence-driven or vulnerability-triggered sweep. Classifies each update on a risk ladder, verifies it, or defers it with a reason. Not for PR queue triage; use…

OutlineDriven/odin-claude-plugin · 78 tokens

strict-validation-setup

Use when a user invokes a strict-mode validation or verifiable-goals loop setup. Bootstraps strict-mode tooling and per-task GOALS.md scaffolding so an agentic loop can self-verify. Don't use for remote, credential, publish, deploy, or irreversible changes.

OutlineDriven/odin-claude-plugin · 61 tokens