Agent skill

Rocky AI Workflow

by rocky-data in rocky-data/rocky

How an AI agent should author or modify a Rocky data model. An agent skill from rocky-data/rocky.

Apache-2.0Auto-check passedDatabases

Install Rocky AI Workflow

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

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

GitHub CLI
$ gh skill install rocky-data/rocky rocky-ai-workflow --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-ai-workflow .claude/skills/rocky-ai-workflow && 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-ai-workflow
GitHub stars
304
Token cost
~2.4k tokens
SKILL.md length
1,416 words
Files
1
Skills in repo
22
Repo updated
First seen
Licence
Apache-2.0

At a glance

How an AI agent should author or modify a Rocky data model. An agent skill from rocky-data/rocky.

  • Works in 6 steps: Inspect the schema. Run rocky compile… → Sample the data — do not trust the… → Write the model. Author the SQL and its… → …
  • Evolving a model on behalf of a user — covers the inspect → sample → write SQL → compile-loop → plan → propose → review → apply workflow
  • SKILL.md covers Author SQL, not the DSL, The loop, Shipping safely: propose →… and Working under a product spec, plus 4 more sections
  • Calls duckdb

What it does

Rocky AI Workflow is an agent skill from rocky-data/rocky. How an AI agent should author or modify a Rocky data model. Use when building, fixing, or evolving a model on behalf of a user — covers the inspect → sample → write SQL → compile-loop → plan → propose → review → apply workflow, the reconcile discipline (check the data, not just the schema), and the AI-authored-plan safety gate. SQL-first.

Its SKILL.md is about 2.4k 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 Databases, covering SQL. It works with SQL. 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

  • Evolving a model on behalf of a user — covers the inspect → sample → write SQL → compile-loop → plan → propose → review → apply workflow
  • The reconcile discipline (check the data
  • Not just the schema)
  • The AI-authored-plan safety gate

Example prompts

  • “/rocky-ai-workflow”

Workflow steps

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

  1. Inspect the schema. Run rocky compile --output json. The result gives you every existing model and source table with its typed columns…
  2. Sample the data — do not trust the schema alone. This is the step that separates a model that compiles from a model that is correct…
  3. Write the model. Author the SQL and its .toml sidecar (materialization strategy, target). Keep it minimal and readable.
  4. Compile-loop on diagnostics. Run rocky compile --output json and read diagnostics: each carries a code (e.g. E001, W003), a message, a…
  5. Preview the SQL. Read your model's generated SQL before you ship it. rocky emit-sql renders it offline: no live source schema, no compute…
  6. Test. Run rocky test to compile, seed and materialize the models, and to run any [[test]] fixture blocks. Then run rocky test…

What it can do on your machine

Read from SKILL.md and the folder at commit 365aebf. 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:

    • duckdb

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

  • Network

    No URLs in SKILL.md.

    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 AI Workflow loads about 2.4k tokens when it runs. Until then it costs about 90 tokens; SKILL.md has 1,416 words of instructions outside code blocks.

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

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 365aebf, republished under its Apache-2.0 licence (© rocky-data). 1,416 words, ~2,396 tokens.

Download SKILL.mdSave it as .claude/skills/rocky-ai-workflow/SKILL.md (or your agent's skills folder).
name
rocky-ai-workflow
description
How an AI agent should author or modify a Rocky data model. Use when building, fixing, or evolving a model on behalf of a user — covers the inspect → sample → write SQL → compile-loop → plan → propose → review → apply workflow, the reconcile discipline (check the data, not just the schema), and the AI-authored-plan safety gate. SQL-first.

Authoring Rocky models as an agent

This is the workflow for an AI agent that has been asked to build or change a Rocky model. It assumes you can run the rocky CLI (or call the equivalent tools) and read its --output json. For the config format see the rocky-config skill; for the full command surface see the rocky skill. This skill is specifically about how to converge on a correct model and how to ship it safely.

The shape of the job: you propose, Rocky's compiler verifies, an approval marker gates the apply. Your edits are not trusted because they compiled — they're trusted because the typed substrate checked them and the apply is gated on a marker naming that plan.

Author SQL, not the DSL

Write models as raw SQL (models/<name>.sql + a <name>.toml sidecar for materialization). SQL is first-class in Rocky and you are fluent in it. The .rocky DSL exists and is fully supported, but it is a niche surface — reach for it only when the user explicitly asks. Defaulting to SQL gets you correct models faster.

The loop

  1. Inspect the schema. Run rocky compile --output json. The result gives you every existing model and source table with its typed columns. Use this to learn what's available to select from and what the upstream types are — never guess column names.

  2. Sample the data — do not trust the schema alone. This is the step that separates a model that compiles from a model that is correct. Before you write a filter or a cast, look at real rows. On the DuckDB playground that's a direct query (duckdb <path> "SELECT * FROM <table> USING SAMPLE 20 ROWS") or rocky shell; against a warehouse, sample through the adapter. Check the things a schema can't tell you:

    • Literal values. Does status actually contain 'completed', or 'COMPLETE', or 'C'? A WHERE status = 'completed' that returns zero rows compiles perfectly.
    • Units and scale. Is amount in dollars or cents? Is a timestamp UTC or local?
    • Null rates and domains. How often is a column null? What are its distinct values?
  3. Write the model. Author the SQL and its .toml sidecar (materialization strategy, target). Keep it minimal and readable.

  4. Compile-loop on diagnostics. Run rocky compile --output json and read diagnostics: each carries a code (e.g. E001, W003), a message, a source span, the model, and often a suggestion. Fix against the diagnostic, recompile, repeat until clean. The compiler is your fast feedback loop — lean on it instead of reasoning about correctness in your head.

  5. Preview the SQL. Read your model's generated SQL before you ship it. rocky emit-sql renders it offline: no live source schema, no compute warehouse. It prints the models in dependency order and reports on stderr any it could not render. Over MCP the nearest tool is plan_preview. It renders offline too, but it drops what it cannot render without naming it. rocky plan is a different command, not this step. It needs a replication pipeline, connects to the source to discover tables, and prints replication SQL. It refuses a transformation-only project. Bare rocky plan never prints a transformation model's SQL; rocky plan --model <name> does, through that same preview core. In replication SQL an incremental table previews the 1970 sentinel watermark, not the real one. A MERGE on any dialect but Databricks previews a canonical shape, not the column list the runner resolves at execute time. And rocky apply recompiles the project rather than replaying the file. Confirm the SQL you read matches your intent.

  6. Test. Run rocky test to compile, seed and materialize the models, and to run any [[test]] fixture blocks. Then run rocky test --declarative to evaluate the declared assertions (uniqueness, not-null, accepted values, ranges) — plain rocky test does not run those. Add or strengthen assertions that encode what you learned from sampling — they become the contract that protects the model from future drift.

Shipping safely: propose → review → apply

Never apply an AI-authored change directly. A bare rocky apply of an AI-authored plan is refused by design — an agent can confidently write a model that drops a column or rewrites a result, so the apply waits on a review step. The engine checks that an approval marker parses and names that exact plan. It does not check who wrote the marker, so treat the review as yours to surface, not yours to satisfy.

The path:

  1. Propose. Generate the plan that materializes your change (it is recorded as an AI-authored plan with a plan_id). A propose can also bind the plan to a product identity — product_id plus spec_digest, both together or neither. A product-bound plan refuses a bare rocky apply; the applier must pass rocky apply <plan-id> --expect-spec-digest <digest> with the digest of the approved spec. When you do not work for a product runner, omit both fields.
  2. Review. Run rocky review <plan-id>. This compiles your working tree against the base ref and runs the semantic breaking-change classifier, then reports the delta — added/removed/retyped columns, anything downstream consumers depend on. Read it.
  3. Approve. rocky review <plan-id> --approve writes the approval marker. Approving over breaking changes is allowed. The marker is written even when the classifier could not run: if either tree fails to compile, findings are absent and breaking_change_count falls back to 0. So a marker is not evidence a delta was computed — raise the findings explicitly.
  4. Apply. Only after the approval marker exists does rocky apply <plan-id> execute.

Your job ends at propose and at surfacing the review report clearly. The approval is a human decision; do not approve on the user's behalf unless they explicitly tell you to.

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

Working under a product spec

Some projects declare products in products/<name>.toml and drive fulfillment through rocky product <verb>. When you author for one:

  • The spec's artifacts are not yours to edit. models/<model>.contract.toml and the spec-owned sidecar blocks ([[sources]], [tags].product, [classification], [freshness], the generated [[tests]]) are lowered from the spec and byte-verified against a manifest. Hand-editing them is detected as tampering. Your surface is the SQL, plus tests you append through the draft tools.
  • rocky product verify <name> tells you (and the runner) whether the frozen propose_only posture is in place before any drafting starts; rocky product status <name> reports the lowering, approval, and state without writing.
  • A product-bound propose carries product_id + spec_digest of the approved revision, and the apply requires --expect-spec-digest. If the spec moves after your draft, the generation is superseded — expect a refusal, not a merge of generations.

Reading the machine-readable surface

  • Every command takes --output json, backed by a typed schema. That JSON — not the human text — is your contract. Parse it.
  • Compile diagnostics carry code / span / suggestion: act on the suggestion.
  • Run errors carry a failure_kind (Transient, AuthFailed, QueryRejected, QuotaExceeded, …) and sometimes a cooldown_seconds. Branch on why something failed: retry a Transient, stop and surface an AuthFailed.

Let the compiler hold the invariants

When you learn something durable about the data while sampling — a column is never null, a status takes a fixed set of values, a key is unique — encode it as a contract (required/protected columns) or a check (assertion), not just as a WHERE clause. That moves the invariant into the typed substrate, so the human reviews the invariant and the compiler enforces it on every future run. This is the whole point of authoring on Rocky rather than emitting bare SQL: the guardrails are part of the artifact.

Metadata is a governed write too

Freshness expectations and column classifications live in the model's sidecar (models/<model>.toml). To author them as an agent, use the draft_metadata MCP tool — never string-append to the sidecar. It takes a structured patch: a freshness block (expected_lag_seconds, optional time_column and severity), a classifications map (column → tag, e.g. email = "pii"), or both. The tool parses the sidecar as TOML and merges the patch (freshness replaces the whole table; classifications merges per column), compiles with the write, and checks your policy rules against the model as patched — a patch that adds the first pii tag is judged by that tag. A denied patch restores the prior sidecar exactly. A sidecar the tool cannot parse is never overwritten. Note the trade: comments in the sidecar are dropped when it is re-serialized.

Anti-patterns

  • Writing a filter from the column name without sampling the values. (The reconcile bug.)
  • Treating "it compiled" as "it's correct."
  • Applying without review, or approving your own AI-authored plan.
  • Reaching for the .rocky DSL when SQL would do.
  • Reading the human-text output when the JSON is right there.

© 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-ai-workflow of rocky-data/rocky.

Open the folder on GitHubat commit 365aebf

Compare with similar skills

Rocky AI Workflow 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 AI Workflow compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Rocky AI Workflow this skillrocky-data/rocky304—~2.4kAutomated safety check: PassApache-2.0
Evolving The Data ModelTriliumNext/Trilium38k—~2.1kAutomated safety check: PassAGPL-3.0
Orchardcore Data MigrationOrchardCMS/OrchardCore8.2k—~1.7kAutomated safety check: PassBSD-3-Clause
SQL Optimization Patternsynulihao/AgentSkillOS61811 repos~3.3kAutomated safety check: PassNone
SQL PortabilityHL7/sql-on-fhir151—~512Automated safety check: PassCustom licence
StmoSAP/project-foxhound1802 repos~1.8kAutomated safety check: PassGPL-3.0

Similar skills

  • Evolving The Data Model

    TriliumNext/Trilium

    A skill your agent uses when adding a DB migration or a new column/field to a Becca entity in Trilium ("add a migration", "new column on notes/attributes", "ALTER TABLE", "add a field to…

    38k GitHub stars~2.1k tokensUpdated today
    DatabasesAuto-check passed
  • Orchardcore Data Migration

    OrchardCMS/OrchardCore

    Creates and updates OrchardCore data migrations (DataMigration classes with CreateAsync/UpdateFromX).

    8.2k GitHub stars~1.7k tokensUpdated today
    DatabasesAuto-check passed
  • SQL Optimization Patterns

    ynulihao/AgentSkillOS

    Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries.

    618 GitHub starsUsed in 11 repos~3.3k tokens
    DatabasesAuto-check passed
  • SQL Portability

    HL7/sql-on-fhir

    Analyse whether a SQL query is portable across database implementations using sqlglot transpilation.

    151 GitHub stars~512 tokensUpdated 4 days ago
    DatabasesAuto-check passed
  • Stmo

    SAP/project-foxhound

    Official

    Manage Redash queries and dashboards on Mozilla's STMO (sql.telemetry.mozilla.org) using stmo-cli.

    180 GitHub starsUsed in 2 repos~1.8k tokens
    DatabasesAuto-check passed
  • DB Migrations

    kurealnum/dotfiles

    A skill your agent uses when generating or regenerating Drizzle migration files, changing database schema tables or columns, resolving migration sequence conflicts after rebase, reviewing migration…

    290 GitHub stars~820 tokensUpdated 6 mo ago
    DatabasesAuto-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 today
    Auto-check passed
  • Databricks

    rocky-data/rocky

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

    304 GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Rocky Codegen

    rocky-data/rocky

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

    304 GitHub stars~1.9k tokensUpdated today
    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 today
    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 today
    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 today
    Auto-check passed

Works with

Categories

Questions about Rocky AI Workflow

What does Rocky AI Workflow do?

How an AI agent should author or modify a Rocky data model. An agent skill from rocky-data/rocky. Rocky AI Workflow is an agent skill from rocky-data/rocky. How an AI agent should author or modify a Rocky data model.

When should I use Rocky AI Workflow?

Rocky AI Workflow fits situations like: evolving a model on behalf of a user — covers the inspect → sample → write SQL → compile-loop → plan → propose → review → apply workflow; the reconcile discipline (check the data; not just the schema); the AI-authored-plan safety gate.

How do I install Rocky AI Workflow in Claude Code?

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

How do I install Rocky AI Workflow in Codex?

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

Can I use Rocky AI Workflow 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-ai-workflow -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-ai-workflow, .gemini/skills/rocky-ai-workflow, .github/skills/rocky-ai-workflow and .opencode/skills/rocky-ai-workflow in your project.

What does Rocky AI Workflow need to run?

Going by SKILL.md and its folder, Rocky AI Workflow needs the command-line tools its instructions call (duckdb).

Does Rocky AI Workflow access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Rocky AI Workflow 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 AI Workflow use?

Rocky AI Workflow 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 AI Workflow use?

About 2.4k tokens (SKILL.md is roughly 9.6k 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 AI Workflow?

Skills that share tags, products or a category with Rocky AI Workflow: Evolving The Data Model (TriliumNext/Trilium, 38k stars), Orchardcore Data Migration (OrchardCMS/OrchardCore, 8.2k stars), SQL Optimization Patterns (ynulihao/AgentSkillOS, 618 stars) and SQL Portability (HL7/sql-on-fhir, 151 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Rocky AI Workflow?

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 10, 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.