okcode: Skill for Claude Code

.agents/skills/architecture-diagram/SKILL.md

architecture-diagram is a skill for Claude Code, Codex from OpenKnots/okcode. It costs 12 tokens per session (1,329 once invoked), scanned A, original, MIT.

A guide for generating architecture diagrams as PNG images with Python and matplotlib. Architecture diagrams show system components, layers, dependencies, or how data moves between parts.

In plain words
What is it for?
Use it for system overviews, request and event flows, package-dependency diagrams, data-flow illustrations, and comparisons of architectural options.
Why use it?
It provides a consistent way to turn a system design or package relationship into documentation that is easier to understand visually.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is OpenKnots/okcode's own configuration. It tells Claude Code and Codex how to work on okcode itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything okcode configures →

Reuse

Borrowing it

Nothing to install: this file belongs to OpenKnots/okcode. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/OpenKnots/okcode/main/.agents/skills/architecture-diagram/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/OpenKnots/okcode

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 architecture-diagram

README.md
[![agentmods](https://agentmods.dev/badge/skills/openknots/okcode/architecture-diagram/github.svg)](https://agentmods.dev/skills/openknots/okcode/architecture-diagram)
Your own site
<a href="https://agentmods.dev/skills/openknots/okcode/architecture-diagram"><img src="https://agentmods.dev/badge/skills/openknots/okcode/architecture-diagram/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 architecture-diagram

Your own site · 80×15
<a href="https://agentmods.dev/skills/openknots/okcode/architecture-diagram"><img src="https://agentmods.dev/badge/skills/openknots/okcode/architecture-diagram.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 12 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,329 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.00012 $0.01329
Opus 5.5 $0.00005 $0.00532
Sonnet 5.5 $0.00002 $0.00266
Haiku 4.5 $0.00001 $0.00133

Measured 2mo ago against content hash 69f5b653624c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

architecture-diagram 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 2mo 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.

.agents/skills/architecture-diagram/SKILL.md · 130 lines

How it starts

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

Architecture Diagram Generator

When to use this skill

  • When the user asks for an architecture diagram, system diagram, or component visualization.
  • When updating READMEs that would benefit from visual architecture documentation.
  • When comparing architectural alternatives visually (like the telemetry-architecture-comparison pattern).
  • When the user wants to visualize data flow, package dependencies, or tech stack layers.

What this skill does

Generates publication-quality PNG architecture diagrams using Python + matplotlib. Diagrams use a consistent visual language: colored rounded boxes for components, styled arrows for data flow, dashed boundaries for service groups, and score badges for comparisons.

Implementation

Step 1: Identify the diagram type

Determine which diagram pattern fits the request:

Pattern When to use Example
High-level architecture Full system overview with all components high-level-architecture.png
Request/event flow Show how data moves through a pipeline server-request-flow.png
Package dependencies Show import/dependency relationships package-dependencies.png
Event flow Show event sourcing or pub/sub patterns orchestration-event-flow.png
Tech stack Layered technology overview tech-stack.png
Architecture comparison Compare N alternatives with scores telemetry-style comparison grid

Step 2: Use or extend the generator script

The diagram generator lives at scripts/generate-architecture-diagrams.py. It provides reusable primitives:

from generate_architecture_diagrams import (
    draw_box,      # Rounded colored rectangle with label + sublabel
    draw_arrow,    # Styled arrow with optional label and curve
    draw_boundary, # Dashed service/group boundary
    draw_badge,    # Colored score circle
    new_fig,       # Create a new figure with standard theme
    save,          # Save to assets/diagrams/
    THEME,         # Consistent color palette
    Box, Arrow,    # Dataclasses for components
)

Read the full file on GitHub · 130 lines

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. 2mo ago First seen · 130 lines · 12 tokens per session scan A 69f5b653624c

Subscribe to this mod's changes

architecture-diagram is a skill published in the GitHub repository OpenKnots/okcode (24 stars, last pushed 5mo ago), licensed MIT. It adds 12 tokens to every session and 1,329 once invoked, about $0.0000 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-08-30.