generated-code

A guide to files whose contents are produced by scripts or design tools, rather than written directly by developers.

In plain words
What is it for?
Use it to find the correct source file, regeneration command, and design source when changing icons, translations, styles, or other generated library files.
Why use it?
It prevents fixes from being made in generated files and then lost during the next regeneration. It also distinguishes generated files from similar files that should be edited normally.

Cursor rule for Cursor

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 rules/ocean-industries-concept-lab/openbridge-webcomponents/generated-code
Clone the repo
git clone --depth 1 https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 1,607 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 $0.00000 $0.01607
Opus 5 $0.00000 $0.00804
Sonnet 5 $0.00000 $0.00321
Haiku 4.5 $0.00000 $0.00161

Measured 2d ago against content hash 9c1339325c87, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

generated-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.

.cursor/rules/generated-code.mdc · 102 lines

How it starts

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

Generated Code — What Is, What Isn't

Most files in scope here are produced by a generator. A local edit to one is not a fix: it survives until the next regeneration and is then silently discarded, taking the change with it. Fix the problem at its source instead.

This file also attaches to the look-alikes — src/manual-icon/ above all — precisely so the difference is stated at the point of editing. If you are in a file listed under What is NOT generated, edit it normally.

What is generated, and by what

Path Regenerate with Source of truth
src/icons/** (2000+ components) npm run download:icons The OpenBridge Icons Figma file
src/generated/** (gitignored) npm run build:translations lit localize extraction from msg() calls in source
src/palettes/variables.css obc-figma-plugin cssvariables OpenBridge 6.1 Figma file (variable definitions)
src/mixins/fonts.css obc-figma-plugin font-exports OpenBridge 6.1 Figma file (text styles)
script/figmavariables.json obc-figma-plugin variables map OpenBridge Icons Figma file — not the main design file
packages/openbridge-webcomponents-*/** npm run wrappers The core package's source JSDoc, via lit labs gen
custom-elements.json npm run analyze The core package's source JSDoc, via cem analyze
.github/instructions/** npm run agents:sync docs/agents/*.md
.github/copilot-instructions.md npm run agents:sync docs/agents/*.md
.cursor/rules/** npm run agents:sync docs/agents/*.md
CLAUDE.md (gitignored) npm run agents:sync pointer only — carries no rules of its own
AGENTS.md § 4 routing table npm run agents:sync the globs frontmatter of every docs/agents/*.md

Read the full file on GitHub · 102 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. 2d ago First seen · 102 lines · 0 tokens per session scan A 9c1339325c87

Subscribe to this mod's changes

generated-code is a cursor rule published in the GitHub repository Ocean-Industries-Concept-Lab/openbridge-webcomponents (91 stars, last pushed 3d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,607 tokens. 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.