Agent skill

Rocky Codegen

by rocky-data in rocky-data/rocky

Rocky CLI JSON-output schema cascade. An agent skill from rocky-data/rocky.

Apache-2.0Auto-check passedDevelopment

Install Rocky Codegen

skills CLI
$ npx skills add rocky-data/rocky --skill rocky-codegen -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install rocky-data/rocky rocky-codegen --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/rocky-data/rocky.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/rocky-codegen .claude/skills/rocky-codegen && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
rocky-codegen
GitHub stars
304
Token cost
~1.9k tokens
SKILL.md length
733 words
Files
1
Skills in repo
22
Repo updated
First seen
Licence
Apache-2.0

At a glance

Rocky CLI JSON-output schema cascade. An agent skill from rocky-data/rocky.

  • Works in 5 steps: Add (or edit) the typed struct in… → Register it in… → Run just codegen. → …
  • Editing any Output struct in engine/crates/rocky-cli/src/output.rs (or commands/doctor.rs)
  • SKILL.md covers When to use this skill, The three-step pipeline, Canonical workflow and What just codegen actually does, plus 5 more sections
  • Calls just, git and cargo

What it does

Rocky Codegen is an agent skill from rocky-data/rocky. Rocky CLI JSON-output schema cascade. Use when editing any Output struct in engine/crates/rocky-cli/src/output.rs (or commands/doctor.rs), adding a new CLI command schema, or when a change could affect schemas/.schema.json, sdk/python/src/rockysdk/typesgenerated/, or editors/vscode/src/types/generated/. Also use when CI reports codegen-drift.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Project scaffolding. It works with Visual Studio Code, Python, Git and Rust. The repository describes itself as: A SQL transformation engine that type-checks your whole pipeline and catches breaking changes before they run — branches, replay, column-level lineage, compile-time contracts… The licence is Apache-2.0.

When your agent uses it

  • Editing any Output struct in engine/crates/rocky-cli/src/output.rs (or commands/doctor.rs)
  • Adding a new CLI command schema
  • A change could affect schemas/.schema.json
  • Sdk/python/src/rockysdk/typesgenerated/

Example prompts

  • “/rocky-codegen”

Requirements

  • Python 3

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Add (or edit) the typed struct in engine/crates/rocky-cli/src/output.rs (or commands/.rs) deriving JsonSchema
  2. Register it in engine/crates/rocky-cli/src/commands/export_schemas.rs::schemas().
  3. Run just codegen.
  4. For the dagster consumer: re-export the new type from integrations/dagster/src/dagster_rocky/types.py (in the re-export section near the…
  5. For the vscode consumer: no extra wiring — src/types/rockyJson.ts is already a 100% type-alias shim over src/types/generated/index.ts.

What it can do on your machine

Read from SKILL.md and the folder at commit 0cb7c7b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • just
    • git
    • cargo

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Rocky Codegen loads about 1.9k tokens when it runs. Until then it costs about 94 tokens; SKILL.md has 733 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~94
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from rocky-data/rocky at commit 0cb7c7b, republished under its Apache-2.0 licence (© rocky-data). 733 words, ~1,880 tokens.

Download SKILL.mdSave it as .claude/skills/rocky-codegen/SKILL.md (or your agent's skills folder).
name
rocky-codegen
description
Rocky CLI JSON-output schema cascade. Use when editing any `*Output` struct in `engine/crates/rocky-cli/src/output.rs` (or `commands/doctor.rs`), adding a new CLI command schema, or when a change could affect `schemas/*.schema.json`, `sdk/python/src/rocky_sdk/types_generated/`, or `editors/vscode/src/types/generated/`. Also use when CI reports `codegen-drift`.

Rocky codegen cascade

Rocky's CLI --output json is the interface contract with every consumer (Dagster, VS Code, shell scripts). Every command is backed by a typed Rust struct that derives JsonSchema, and the Pydantic + TypeScript bindings are autogenerated from those schemas. Drift is enforced in CI.

If you edit a Rust output struct and forget to regenerate, the codegen-drift workflow will fail the PR.

When to use this skill

  • Editing a *Output struct in engine/crates/rocky-cli/src/output.rs or engine/crates/rocky-cli/src/commands/doctor.rs
  • Adding a new field to any type that appears inside a CLI output
  • Adding a brand new CLI command that needs a JSON schema
  • Investigating a codegen-drift.yml CI failure

The three-step pipeline

engine/crates/rocky-cli/src/output.rs       (Rust source of truth)
        │
        ▼  cargo run -- export-schemas schemas/
schemas/*.schema.json                        (committed)
        │
        ├──▶  sdk/python/src/rocky_sdk/types_generated/   (Pydantic v2)
        └──▶  editors/vscode/src/types/generated/                       (TypeScript)

Canonical workflow

From the monorepo root:

bash
# 1. Edit the Rust struct
$EDITOR engine/crates/rocky-cli/src/output.rs

# 2. Run the full codegen pipeline
just codegen

# 3. Review the diff — you should see changes in 3 places:
git status
#   engine/crates/rocky-cli/src/output.rs        ← your edit
#   schemas/<command>.schema.json                 ← regenerated
#   sdk/python/src/rocky_sdk/types_generated/…    ← regenerated
#   editors/vscode/src/types/generated/…          ← regenerated

# 4. Commit all of it in ONE commit
git add engine/ schemas/ sdk/ integrations/ editors/
git commit -m "feat(engine): add <field> to <command>Output"

Never commit a Rust output change without the regenerated bindings. The codegen-drift CI workflow (.github/workflows/codegen-drift.yml) runs just codegen and fails if git diff is non-empty.

What just codegen actually does

Three recipes in justfile, runnable individually:

RecipeWhat it does
just codegen-rustcargo run --release --bin rocky -- export-schemas schemas/ — rebuilds engine in release mode (shared with regen-fixtures), then writes the JSON schemas to schemas/ (run `ls schemas/*.schema.json
just codegen-sdkRuns datamodel-codegen over schemas/*.schema.json into sdk/python/src/rocky_sdk/types_generated/. Self-heals the curated __init__.py barrel via git checkout.
just codegen-vscodeRuns json2ts per schema into editors/vscode/src/types/generated/. Self-heals the curated index.ts barrel via git checkout.

Both codegen-sdk and codegen-vscode intentionally overwrite the output directory and then git checkout HEAD -- <barrel> to restore the curated re-export files. Do not hand-edit files under types_generated/ or types/generated/ other than those two barrels — the next codegen run nukes them.

Adding a new CLI command schema

  1. Add (or edit) the typed struct in engine/crates/rocky-cli/src/output.rs (or commands/<name>.rs) deriving JsonSchema:
    rust
    #[derive(Debug, Serialize, Deserialize, JsonSchema)]
    pub struct MyCommandOutput { ... }
  2. Register it in engine/crates/rocky-cli/src/commands/export_schemas.rs::schemas().
  3. Run just codegen.
  4. For the dagster consumer: re-export the new type from integrations/dagster/src/dagster_rocky/types.py (in the re-export section near the bottom), then add a dispatch entry in parse_rocky_output(), add a RockyResource method in resource.py, and a fixture + test (see integrations/dagster/AGENTS.md for the 9-step checklist).
  5. For the vscode consumer: no extra wiring — src/types/rockyJson.ts is already a 100% type-alias shim over src/types/generated/index.ts.

scripts/regen_fixtures.sh (aka just regen-fixtures) captures live rocky --output json output against the playground POCs into integrations/dagster/tests/fixtures_generated/. This is a drift-detection corpus — test_generated_fixtures.py re-validates the captured JSON against the current Pydantic models. The dagster parsing tests themselves load hand-crafted Python dicts from integrations/dagster/tests/scenarios.py, exposed as *_json pytest fixtures via conftest.py.

When to regen fixtures:

  • After a schema change that affects the shape of an output (new fields, renamed fields, changed types).
  • Before committing, run just regen-fixtures and check that test_generated_fixtures.py still passes. If it doesn't, the captured shape no longer matches the Pydantic models — usually means the codegen step was skipped.

Prerequisite: the release binary at engine/target/release/rocky must exist (just codegen already builds it).

Show full SKILL.md (271 more words)Show less

Common pitfalls

  • Editing a generated file by hand — will be wiped on next codegen. Always edit the Rust source.
  • Forgetting the JsonSchema derive — cargo build passes but export-schemas silently skips the type. Check the schemas/ diff.
  • Adding a new type but not registering it in export_schemas.rs::schemas() — the schema never gets emitted.
  • Committing partial regeneration — always run full just codegen, not just one of the sub-recipes.
  • CI drift failure on a PR that did NOT touch output.rs — usually means someone bumped datamodel-code-generator or json2ts; re-run just codegen locally and commit the deterministic diff.

Local belt-and-braces: the pre-commit hook

There's a repo-root git hook at .git-hooks/pre-commit that runs the codegen check locally, so drift is caught before you push instead of after a failed CI run. Enable once:

bash
just install-hooks
# or manually:
git config core.hooksPath .git-hooks

The hook only fires when the staged change includes one of:

  • engine/crates/rocky-cli/src/output.rs
  • engine/crates/rocky-cli/src/commands/doctor.rs
  • engine/crates/rocky-cli/src/commands/export_schemas.rs

When triggered, it runs just codegen and fails the commit if the regenerated bindings produce a non-empty git diff. Skip with ROCKY_SKIP_CODEGEN_HOOK=1 git commit … in emergencies — but the CI workflow will still catch drift on the PR.

Note on core.hooksPath: it's a repo-wide setting (stored in .git/config, so it doesn't get shared across clones). If you've previously enabled hooks inside integrations/dagster/ via git config core.hooksPath .git-hooks, that points at the same root-level path (hooksPath is repo-relative) — running just install-hooks at the root is the same operation.

Reference files

  • engine/AGENTS.md — "JSON Output Schema" section lists all command output structs.
  • integrations/dagster/AGENTS.md — "Adding support for a new Rocky CLI command" 9-step checklist.
  • .github/workflows/codegen-drift.yml — the CI check that enforces this.
  • .git-hooks/pre-commit — the local mirror of the CI check.
  • justfile — the codegen* recipes (lines ~63-126) + install-hooks.

© rocky-data, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/rocky-codegen of rocky-data/rocky.

Open the folder on GitHubat commit 0cb7c7b

Compare with similar skills

Rocky Codegen next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Rocky Codegen compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Rocky Codegen this skillrocky-data/rocky304—~1.9kAutomated safety check: PassApache-2.0
Project Initathola/claude-night-market342—~1.2kAutomated safety check: PassMIT
Core API Changelibnativeapi/nativeapi157—~2.5kAutomated safety check: PassMIT
RustPython Stdlib UpgradeRustPython/RustPython22k—~876Automated safety check: PassMIT
Vscode981377660LMT/algorithm-study2781 repos~290Automated safety check: PassNone
Light Project StructureLight0305/Light-skills640—~3kAutomated safety check: NotesMIT

Similar skills

  • Project Init

    athola/claude-night-market

    Scaffolds new projects with git, CI/CD workflows, pre-commit hooks, and build config.

    342 GitHub stars~1.2k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Core API Change

    libnativeapi/nativeapi

    Carry a change to the C++ public API in core/ all the way downstream — design check, header edit, six platform implementations, C ABI + Rust/Dart/C/JS/Python regeneration, per-binding verification…

    157 GitHub stars~2.5k tokensUpdated today
    MobileAuto-check passed
  • RustPython Stdlib Upgrade

    RustPython/RustPython

    Upgrades a Python standard library module from CPython into RustPython with update_lib, then triages and marks the tests that still fail.

    22k GitHub stars~876 tokensUpdated today
    DevelopmentAuto-check passed
  • Vscode

    981377660LMT/algorithm-study

    VS Code integration for viewing diffs and comparing files. An agent skill from 981377660LMT/algorithm-study.

    278 GitHub starsUsed in 1 repo~290 tokens
    DevelopmentAuto-check passed
  • Light Project Structure

    Light0305/Light-skills

    Audits, scaffolds and safely migrates research project folder structures, keeping existing repositories read-only until you approve exact moves from a plan.

    640 GitHub stars~3k tokensUpdated 3 mo ago
    DevelopmentAuto-check: notes
  • Elodin Dev

    elodin-sys/elodin

    Develop and contribute to the Elodin codebase. An agent skill from elodin-sys/elodin.

    547 GitHub stars~896 tokensUpdated today
    DevelopmentAuto-check passed

More from rocky-data/rocky

All 22 skills in this repo
  • Fivetran

    rocky-data/rocky

    Fivetran REST API reference for Rocky's source adapter. An agent skill from rocky-data/rocky.

    304 GitHub stars~914 tokensUpdated yesterday
    Auto-check passed
  • Databricks

    rocky-data/rocky

    Databricks REST API and SQL reference for Rocky's warehouse adapter.

    304 GitHub stars~2k tokensUpdated yesterday
    Auto-check passed
  • Rocky Dev

    rocky-data/rocky

    Top-level router for Rocky development tasks. An agent skill from rocky-data/rocky.

    304 GitHub stars~2.1k tokensUpdated yesterday
    Auto-check passed
  • Rocky Dsl Change

    rocky-data/rocky

    Rocky DSL (.rocky file) cross-subproject cascade. An agent skill from rocky-data/rocky.

    304 GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • Rocky New Adapter

    rocky-data/rocky

    Adding a new warehouse or source adapter crate to the Rocky engine.

    304 GitHub stars~2k tokensUpdated yesterday
    Auto-check passed
  • Rocky New CLI Command

    rocky-data/rocky

    End-to-end checklist for adding a new Rocky CLI subcommand across the engine, JSON schema export, Dagster Pydantic types, Dagster resource wiring, and VS Code extension command.

    304 GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Rocky Codegen

What does Rocky Codegen do?

Rocky CLI JSON-output schema cascade. An agent skill from rocky-data/rocky. Rocky Codegen is an agent skill from rocky-data/rocky. Rocky CLI JSON-output schema cascade.

When should I use Rocky Codegen?

Rocky Codegen fits situations like: editing any Output struct in engine/crates/rocky-cli/src/output.rs (or commands/doctor.rs); adding a new CLI command schema; A change could affect schemas/.schema.json; sdk/python/src/rockysdk/typesgenerated/.

How do I install Rocky Codegen in Claude Code?

Run `npx skills add rocky-data/rocky --skill rocky-codegen -a claude-code`. Or copy the skill folder (.agents/skills/rocky-codegen in rocky-data/rocky) into .claude/skills/rocky-codegen in your project. Claude Code loads it when a task matches its description.

How do I install Rocky Codegen in Codex?

Run `npx skills add rocky-data/rocky --skill rocky-codegen -a codex`. Or copy the skill folder (.agents/skills/rocky-codegen in rocky-data/rocky) into .agents/skills/rocky-codegen in your project. Codex loads it when a task matches its description.

Can I use Rocky Codegen in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add rocky-data/rocky --skill rocky-codegen -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/rocky-codegen, .gemini/skills/rocky-codegen, .github/skills/rocky-codegen and .opencode/skills/rocky-codegen in your project.

What does Rocky Codegen need to run?

Going by SKILL.md and its folder, Rocky Codegen needs the command-line tools its instructions call (just, git and cargo). Our summary lists: Python 3.

Does Rocky Codegen access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Rocky Codegen safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Rocky Codegen use?

Rocky Codegen is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Rocky Codegen use?

About 1.9k tokens (SKILL.md is roughly 7.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Rocky Codegen?

Skills that share tags, products or a category with Rocky Codegen: Project Init (athola/claude-night-market, 342 stars), Core API Change (libnativeapi/nativeapi, 157 stars), RustPython Stdlib Upgrade (RustPython/RustPython, 22k stars) and Vscode (981377660LMT/algorithm-study, 278 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Rocky Codegen?

rocky-data (a GitHub organization) maintains it in rocky-data/rocky, which has 304 GitHub stars. The repository holds 22 skills in this directory. The repository was last updated on October 7, 2026.

Source: rocky-data/rocky on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.