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…
How an AI agent should author or modify a Rocky data model. An agent skill from rocky-data/rocky.
$ npx skills add rocky-data/rocky --skill rocky-ai-workflow -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install rocky-data/rocky rocky-ai-workflow --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ 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-srcUse ~/.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/
Install the "rocky-ai-workflow" agent skill from https://github.com/rocky-data/rocky/tree/main/.agents/skills/rocky-ai-workflow into .claude/skills/rocky-ai-workflow/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rocky-ai-workflow", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/rocky-data/rocky/tree/main/.agents/skills/rocky-ai-workflowType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add rocky-data/rocky --skill rocky-ai-workflow -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install rocky-data/rocky rocky-ai-workflow --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rocky-data/rocky.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/rocky-ai-workflow .agents/skills/rocky-ai-workflow && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "rocky-ai-workflow" agent skill from https://github.com/rocky-data/rocky/tree/main/.agents/skills/rocky-ai-workflow into .agents/skills/rocky-ai-workflow/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rocky-ai-workflow", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add rocky-data/rocky --skill rocky-ai-workflow -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install rocky-data/rocky rocky-ai-workflow --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rocky-data/rocky.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/rocky-ai-workflow .cursor/skills/rocky-ai-workflow && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "rocky-ai-workflow" agent skill from https://github.com/rocky-data/rocky/tree/main/.agents/skills/rocky-ai-workflow into .cursor/skills/rocky-ai-workflow/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rocky-ai-workflow", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/rocky-data/rocky.git --path .agents/skills/rocky-ai-workflow--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add rocky-data/rocky --skill rocky-ai-workflow -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install rocky-data/rocky rocky-ai-workflow --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rocky-data/rocky.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/rocky-ai-workflow .gemini/skills/rocky-ai-workflow && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "rocky-ai-workflow" agent skill from https://github.com/rocky-data/rocky/tree/main/.agents/skills/rocky-ai-workflow into .gemini/skills/rocky-ai-workflow/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rocky-ai-workflow", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install rocky-data/rocky rocky-ai-workflowInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add rocky-data/rocky --skill rocky-ai-workflow -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/rocky-data/rocky.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/rocky-ai-workflow .github/skills/rocky-ai-workflow && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "rocky-ai-workflow" agent skill from https://github.com/rocky-data/rocky/tree/main/.agents/skills/rocky-ai-workflow into .github/skills/rocky-ai-workflow/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rocky-ai-workflow", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add rocky-data/rocky --skill rocky-ai-workflow -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install rocky-data/rocky rocky-ai-workflow --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rocky-data/rocky.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/rocky-ai-workflow .opencode/skills/rocky-ai-workflow && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "rocky-ai-workflow" agent skill from https://github.com/rocky-data/rocky/tree/main/.agents/skills/rocky-ai-workflow into .opencode/skills/rocky-ai-workflow/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rocky-ai-workflow", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
rocky-ai-workflowHow 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. 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.
6 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 365aebf. It shows what the files ask for, not the result of running them.
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.
Shell commands in SKILL.md call:
duckdbFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
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.
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.
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.
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.
.claude/skills/rocky-ai-workflow/SKILL.md (or your agent's skills folder).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.
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.
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.
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:
status actually contain 'completed', or 'COMPLETE', or 'C'? A WHERE status = 'completed' that returns zero rows compiles perfectly.amount in dollars or cents? Is a timestamp UTC or local?Write the model. Author the SQL and its .toml sidecar (materialization strategy, target). Keep it minimal and readable.
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.
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.
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.
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:
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.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.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.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.
Some projects declare products in products/<name>.toml and drive fulfillment through rocky product <verb>. When you author for one:
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.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.--output json, backed by a typed schema. That JSON — not the human text — is your contract. Parse it.code / span / suggestion: act on the suggestion.failure_kind (Transient, AuthFailed, QueryRejected, QuotaExceeded, …) and sometimes a cooldown_seconds. Branch on why something failed: retry a Transient, stop and surface an AuthFailed.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.
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.
.rocky DSL when SQL would do.© 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
Just SKILL.md in .agents/skills/rocky-ai-workflow of rocky-data/rocky.
Open the folder on GitHubat commit 365aebf
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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Rocky AI Workflow this skillrocky-data/rocky | 304 | — | ~2.4k | Automated safety check: Pass | Apache-2.0 | |
| Evolving The Data ModelTriliumNext/Trilium | 38k | — | ~2.1k | Automated safety check: Pass | AGPL-3.0 | |
| Orchardcore Data MigrationOrchardCMS/OrchardCore | 8.2k | — | ~1.7k | Automated safety check: Pass | BSD-3-Clause | |
| SQL Optimization Patternsynulihao/AgentSkillOS | 618 | 11 repos | ~3.3k | Automated safety check: Pass | None | |
| SQL PortabilityHL7/sql-on-fhir | 151 | — | ~512 | Automated safety check: Pass | Custom licence | |
| StmoSAP/project-foxhound | 180 | 2 repos | ~1.8k | Automated safety check: Pass | GPL-3.0 |
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…
OrchardCMS/OrchardCore
Creates and updates OrchardCore data migrations (DataMigration classes with CreateAsync/UpdateFromX).
ynulihao/AgentSkillOS
Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries.
HL7/sql-on-fhir
Analyse whether a SQL query is portable across database implementations using sqlglot transpilation.
SAP/project-foxhound
Manage Redash queries and dashboards on Mozilla's STMO (sql.telemetry.mozilla.org) using stmo-cli.
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…
rocky-data/rocky
Fivetran REST API reference for Rocky's source adapter. An agent skill from rocky-data/rocky.
rocky-data/rocky
Databricks REST API and SQL reference for Rocky's warehouse adapter.
rocky-data/rocky
Rocky CLI JSON-output schema cascade. An agent skill from rocky-data/rocky.
rocky-data/rocky
Top-level router for Rocky development tasks. An agent skill from rocky-data/rocky.
rocky-data/rocky
Rocky DSL (.rocky file) cross-subproject cascade. An agent skill from rocky-data/rocky.
rocky-data/rocky
Adding a new warehouse or source adapter crate to the Rocky engine.
Works with
Categories
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.
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.
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.
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.
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.
Going by SKILL.md and its folder, Rocky AI Workflow needs the command-line tools its instructions call (duckdb).
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.
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.
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.
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.
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.
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.