generate-er-diagram

generate-er-diagram is a skill for Claude Code, Codex from GoogleCloudPlatform/cortex-framework. It costs 34 tokens per session (1,017 once invoked), scanned A, original, Apache-2.0.

A tool for creating Entity-Relationship diagrams, which show data entities, their key fields, and the links between them, from Cortex data products. It can produce Mermaid, Graphviz DOT, or draw.io XML output.

In plain words
What is it for?
Use it to generate a diagram after choosing an output format and locating the target data product.
Why use it?
It turns data-product definitions into a visual model, making the structure and relationships easier to inspect or share.

Skill for Claude CodeCodex

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

Good fit Use it to generate a diagram after choosing an output format and locating the target data product.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/googlecloudplatform/cortex-framework/generate_er_diagram
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 GoogleCloudPlatform/cortex-framework --skill generate_er_diagram
Clone the repo
git clone --depth 1 https://github.com/GoogleCloudPlatform/cortex-framework

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 generate-er-diagram

README.md
[![agentmods](https://agentmods.dev/badge/skills/googlecloudplatform/cortex-framework/generate_er_diagram/github.svg)](https://agentmods.dev/skills/googlecloudplatform/cortex-framework/generate_er_diagram)
Your own site
<a href="https://agentmods.dev/skills/googlecloudplatform/cortex-framework/generate_er_diagram"><img src="https://agentmods.dev/badge/skills/googlecloudplatform/cortex-framework/generate_er_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 generate-er-diagram

Your own site · 80×15
<a href="https://agentmods.dev/skills/googlecloudplatform/cortex-framework/generate_er_diagram"><img src="https://agentmods.dev/badge/skills/googlecloudplatform/cortex-framework/generate_er_diagram.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,017 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00034 $0.01017
Opus 5.5 $0.00014 $0.00407
Sonnet 5.5 $0.00007 $0.00203
Haiku 4.5 $0.00003 $0.00102

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

Security

Grade A, and why

generate-er-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 3mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/generate_er_diagram.py), 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.

.agents/skills/generate_er_diagram/SKILL.md · 69 lines

How it starts

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

Generating Entity-Relationship (ER) Diagrams

This skill allows agents to automatically generate clean, structured Entity-Relationship (ER) diagrams from one or more Cortex data products. The diagrams represent data models, primary keys, and relationships inferred from the data product's manifest, annotations, and definitions.


Core Operating Behaviors

When asked to generate an ER diagram for a data product:

  1. Establish Output Format (CRITICAL):

    • You MUST check if the user has specified the desired format for the ER diagram (e.g., dot, mermaid, draw.io, or all).
    • If the format is not specified, you MUST explicitly ask the user:

      "Which format would you like to use for the ER diagram?

      1. Mermaid diagram (.mmd) - Best for quick markdown integration (also creates a .md file for immediate visual preview)
      2. Graphviz dot notation (.dot) - Best for custom graph rendering
      3. draw.io XML (.drawio) - Best for importing directly into draw.io as an interactive layout
      4. All formats - Generates Mermaid, DOT, and draw.io diagrams concurrently"
    • Wait for the user's choice before executing the generator.
  2. Locate target data product:

    • Determine the name or folder of the data product to analyze. If it is not specified, look inside src/data_modules/<namespace>/<source>/products/ for available products.
  3. Execute the generator script:

    • Use the virtualenv Python interpreter to run the tool:
      cortex-framework-core/.venv/bin/python external-skills/.agents/skills/generate_er_diagram/scripts/generate_er_diagram.py -p <data_product_path_or_name> -f <mermaid|dot|drawio> [options]
      
    • Optional Flags:
      • --include-siblings: Include sibling data products in the same namespace to map cross-product relationships. (Disabled by default to prevent oversized diagrams).
      • --all-foundation-fields: Render all fields for foundation tables (by default only keys and relationship-participating fields are shown to avoid clutter).
      • --all-data-product-fields: Render all fields for data product tables (by default only keys and relationship-participating fields are shown to avoid clutter).
    • Note: If the user selects All formats, execute the generator command three times sequentially, once for each format option (mermaid, dot, drawio).

Read the full file on GitHub · 69 lines

Files

What ships with it

2 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. 3mo ago First seen · 69 lines · 34 tokens per session scan A b13931966929

Subscribe to this mod's changes

generate-er-diagram is a skill published in the GitHub repository GoogleCloudPlatform/cortex-framework (18 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 34 tokens to every session and 1,017 once invoked, about $0.0001 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-31.

Related

generate-er-diagram compared with skills from other repositories

generate-er-diagram next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
generate-er-diagramGoogleCloudPlatform/cortex-frameworkSkill181mo agoApache-2.0A34Claude Code, Codex
bigquery-migration-metadata-extractorgoogle/skillsSkill25ktodayApache-2.0A188Claude Code, Codex
bigquery-migration-data-exportergoogle/skillsSkill25ktodayApache-2.0A142Claude Code, Codex
bigquery-observabilitygoogle/skillsSkill25ktodayApache-2.0A144Claude Code, Codex
bigquery-migration-sql-translatorgoogle/skillsSkill25ktodayApache-2.0A132Claude Code, Codex
bigquery-udfsgoogle/skillsSkill25ktodayApache-2.0A132Claude Code, Codex
bigquery-migration-data-loadergoogle/skillsSkill25ktodayApache-2.0A177Claude Code, Codex