tygen

tygen is a skill for Claude Code from cognitedata/builder-skills. It costs 53 tokens per session (2,237 once invoked), scanned A, original, Apache-2.0.

An experimental, opt-in tool that generates TypeScript type files for one versioned CDF data model in a Dune or Flows app. CDF is Cognite Data Fusion; the generated types describe the model but do not provide a client or data-changing APIs.

In plain words
What is it for?
Use it to generate model types and typed view references for a specified data-model version. Do not use it to query CDF or create, update, or delete model data.
Why use it?
It can make code refer to the selected data model with checked TypeScript types, while making clear that it does not replace the app's existing SDK or API code. It must only be used when the TyGen alpha flag is explicitly enabled.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to generate model types and typed view references for a specified data-model version. Do not use it to query CDF or create, update, or delete model data.

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

Made for: Claude Code.

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 tygen

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/cognitedata/builder-skills/tygen"><img src="https://agentmods.dev/badge/skills/cognitedata/builder-skills/tygen.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,237 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.00053 $0.02237
Opus 5.5 $0.00021 $0.00895
Sonnet 5.5 $0.00011 $0.00447
Haiku 4.5 $0.00005 $0.00224

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

Security

Grade A, and why

tygen 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 8d 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.

skills/tygen/SKILL.md · 135 lines

How it starts

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

TyGen

TyGen generates a typed client from one version of a CDF data model. Use it to read instances with short property names and result types that follow the request, instead of the nested properties[space]['View/version'] objects of the native @cognite/sdk.

Availability

TyGen is experimental and is not part of the normal app workflow. Before suggesting, running, or editing code that depends on generated output, verify that COGNITE_ALPHA_ENABLE_TYGEN is explicitly set to true for the command environment. If it is not enabled, explain that TyGen is an opt-in alpha capability and continue with the native @cognite/sdk types and APIs already used by the app.

If you introduce TyGen as an option, confirm the user wants to use it before running it. An explicit request to generate types is sufficient confirmation. Do not enable the flag, add it to a repository, or change deployment configuration without the user's explicit approval.

Without the flag the CLI reports unknown command 'tygen'. That means the flag is not set, not that the CLI is too old.

Generate

From the app directory (it has an app.json):

npx @cognite/cli@latest tygen generate --data-model mySpace:myModel:v1
  • In an interactive terminal, omit --data-model to pick a versioned model from the project. --interactive controls browser authentication, independently of the model picker.
  • The command uses the app configuration and the saved cognite auth login session. Use --base-url and --project to generate outside an app directory.
  • When the data-model reference is unknown, cognite api datamodels list lists the models. It requires the separate COGNITE_ALPHA_ENABLE_API=true flag; check that it is already enabled before running it.
  • Output goes to src/generated_types/<externalId>/: index.ts (the entry point), types.ts, views.ts, tygen-views.ts, tygen-interface.ts, methods/ and internal/. Do not write application code there, and do not edit generated files.
  • Generating again into the same folder replaces it. To keep two versions of a model side by side, generate the second with -o src/generated_types/<externalId>-<version>.
  • Commit the generated output. After a data-model change, regenerate, inspect the diff, and run the app's typecheck and tests.

Read the full file on GitHub · 135 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. 8d ago Changed · +68 lines · +17 tokens per session d3305007fe52
  2. 1mo ago First seen · 67 lines · 36 tokens per session scan A 497ef447b2c1

Subscribe to this mod's changes

tygen is a skill published in the GitHub repository cognitedata/builder-skills (6 stars, last pushed yesterday), licensed Apache-2.0. It adds 53 tokens to every session and 2,237 once invoked, about $0.0002 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-10-03.

Related

tygen compared with skills from other repositories

tygen next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
tygencognitedata/builder-skillsSkill6yesterdayApache-2.0A53Claude Code
no-bare-castsprisma/ormSkill48ktodayApache-2.0A52Claude Code, Codex
aws-sst-developmentsickn33/agentic-awesome-skillsSkill49ktodayMITA26Claude Code
league-akari-shard-developmentLeagueAkari/LeagueAkariSkill4.7k5d agoMITA58Claude Code, Codex
dd-code-generationDataDog/pupSkill1.0kyesterdayApache-2.0A16Claude Code
fast-typescript-checkinternet-development/www-sacredSkill1.6k3d agoMITA84Claude Code, Codex
typescript-magicianmcollina/skillsSkill2.0k10d agoMITA108Claude Code, Codex