Diesel Guard
ayarotsky/diesel-guard
Lints Diesel and SQLx Postgres migrations for unsafe schema changes that lock tables or cause downtime, and authors custom Rhai checks.
Writing criterion benchmarks for the Rocky engine and wiring them to the perf-gated CI workflow.
$ npx skills add rocky-data/rocky --skill rust-bench-criterion -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install rocky-data/rocky rust-bench-criterion --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/engine/.claude/skills/rust-bench-criterion .claude/skills/rust-bench-criterion && 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 "rust-bench-criterion" agent skill from https://github.com/rocky-data/rocky/tree/main/engine/.claude/skills/rust-bench-criterion into .claude/skills/rust-bench-criterion/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-bench-criterion", 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/engine/.claude/skills/rust-bench-criterionType 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 rust-bench-criterion -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install rocky-data/rocky rust-bench-criterion --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/engine/.claude/skills/rust-bench-criterion .agents/skills/rust-bench-criterion && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "rust-bench-criterion" agent skill from https://github.com/rocky-data/rocky/tree/main/engine/.claude/skills/rust-bench-criterion into .agents/skills/rust-bench-criterion/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-bench-criterion", 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 rust-bench-criterion -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install rocky-data/rocky rust-bench-criterion --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/engine/.claude/skills/rust-bench-criterion .cursor/skills/rust-bench-criterion && 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 "rust-bench-criterion" agent skill from https://github.com/rocky-data/rocky/tree/main/engine/.claude/skills/rust-bench-criterion into .cursor/skills/rust-bench-criterion/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-bench-criterion", 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 engine/.claude/skills/rust-bench-criterion--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 rust-bench-criterion -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install rocky-data/rocky rust-bench-criterion --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/engine/.claude/skills/rust-bench-criterion .gemini/skills/rust-bench-criterion && 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 "rust-bench-criterion" agent skill from https://github.com/rocky-data/rocky/tree/main/engine/.claude/skills/rust-bench-criterion into .gemini/skills/rust-bench-criterion/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-bench-criterion", 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 rust-bench-criterionInstalls 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 rust-bench-criterion -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/engine/.claude/skills/rust-bench-criterion .github/skills/rust-bench-criterion && 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 "rust-bench-criterion" agent skill from https://github.com/rocky-data/rocky/tree/main/engine/.claude/skills/rust-bench-criterion into .github/skills/rust-bench-criterion/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-bench-criterion", 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 rust-bench-criterion -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 rust-bench-criterion --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/engine/.claude/skills/rust-bench-criterion .opencode/skills/rust-bench-criterion && 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 "rust-bench-criterion" agent skill from https://github.com/rocky-data/rocky/tree/main/engine/.claude/skills/rust-bench-criterion into .opencode/skills/rust-bench-criterion/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-bench-criterion", 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.
rust-bench-criterionWriting criterion benchmarks for the Rocky engine and wiring them to the perf-gated CI workflow.
Rust Bench Criterion is an agent skill from rocky-data/rocky. Writing criterion benchmarks for the Rocky engine and wiring them to the perf-gated CI workflow. Use when adding a new benchmark, debugging a bench CI alert, or deciding whether a change needs the perf PR label.
Its SKILL.md is about 2.5k 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. It works with Rust and 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.
4 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 46be77e. 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:
cargoFrom 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.
Rust Bench Criterion loads about 2.5k tokens when it runs. Until then it costs about 59 tokens; SKILL.md has 1,077 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 46be77e, republished under its Apache-2.0 licence (© rocky-data). 1,077 words, ~2,542 tokens.
.claude/skills/rust-bench-criterion/SKILL.md (or your agent's skills folder).There are three criterion benches in the engine, and the workflow runs all three:
| Crate | Bench | File | In engine-bench.yml? |
|---|---|---|---|
rocky-cli | compile | benches/compile.rs | yes |
rocky-core | state_store | benches/state_store.rs | yes |
rocky-core | dag_execute | benches/dag_execute.rs | yes |
Decided (#1947, 2026-09-17): dag_execute is not redundant with compile's dag_resolution group — dag_resolution benches the synchronous graph algorithms (topological_sort + execution_layers); dag_execute benches DagExecutor::execute itself (the tokio runtime, the semaphore, JoinSet intra-layer fan-out). Different surfaces, so it's wired in with sample_size(10) to keep it cheap. As with the other two, this buys "it still compiles and runs on CI hardware" — see the no-comparison-step note below — not a perf gate. The correctness property this bench demonstrates (parallel beats sequential) is separately pinned by a real, non-flaky assertion: max_concurrency_bounds_intra_layer_fan_out in rocky-core/src/dag_executor.rs's test module counts peak concurrent nodes via an AtomicUsize high-water mark instead of timing anything, and runs on every cargo test, not just perf-labeled PRs.
compile.rs has four groups:
cold_compile — full compile() over synthetic projects of 10 / 100 / 1,000 models (plus 10,000 in release mode only — debug builds with DuckDB C++ would take ~30 s per iter and dominate CI).dag_resolution — topological_sort + execution_layers on diamond-shaped DAGs of 10 / 100 / 500 / 1000 nodes.sql_generation — generate_create_table_as_sql and generate_insert_sql for 10 / 100 / 500 replication plans.binary_startup — subprocess startup time for cargo run -p rocky -- --version.CI wiring — .github/workflows/engine-bench.yml:
on:
pull_request:
types: [labeled, synchronize]
paths:
- 'engine/crates/**'
- 'engine/Cargo.toml'
- 'engine/Cargo.lock'
- '.github/workflows/engine-bench.yml'
jobs:
bench:
if: contains(github.event.pull_request.labels.*.name, 'perf')
# ...
steps:
- name: Run benchmarks
run: |
cargo bench --bench compile -p rocky-cli -- --output-format bencher | tee bench-output.txt
cargo bench --bench state_store -p rocky-core -- --output-format bencher | tee -a bench-output.txt
cargo bench --bench dag_execute -p rocky-core -- --output-format bencher | tee -a bench-output.txt
- name: Upload benchmark results
uses: actions/upload-artifact@...
with:
name: bench-output
path: engine/bench-output.txt
if-no-files-found: errorThere is no comparison step, and there never has been one that worked. The workflow's own comment says why: it runs only on perf-labeled PRs, with no push trigger, so there is no main-branch baseline to compare against. github-action-benchmark needs a gh-pages history branch, and this repo has none. The run uploads raw bencher output as a downloadable artifact and stops there.
The rules you actually need to know:
perf label is on the PR. Adding a bench doesn't automatically run it on PR. To exercise it, add the perf label.cargo bench invocations — compile -p rocky-cli, state_store -p rocky-core, dag_execute -p rocky-core. A new [[bench]] is not picked up until you add another invocation for it; adding a [[bench]] target to a Cargo.toml alone does nothing in CI.bench-output artifact and read it, or you run the bench locally on both revisions yourself. Treat the CI run as evidence the bench still COMPILES AND RUNS, not as a perf gate.cargo run works from the working directory — it's advisory, not load-bearing; don't panic if it reports noisy numbers.Add the dep. In the crate's Cargo.toml:
[dev-dependencies]
criterion = { version = "0.5", features = ["html_reports"] }
tempfile = "3" # if you need fixtures
[[bench]]
name = "my_bench"
harness = falseharness = false is required for criterion (it supplies its own main).
Create crates/<crate>/benches/my_bench.rs. The canonical shape, modelled on benches/compile.rs:
//! Short doc of what this measures and how to run it.
//!
//! Run with: `cargo bench --bench my_bench -p <crate>`
use criterion::{BenchmarkId, Criterion, criterion_group, criterion_main};
fn bench_happy_path(c: &mut Criterion) {
let mut group = c.benchmark_group("happy_path");
group.sample_size(10); // ← drop from the default 100 for expensive iters
for size in [10, 100, 1_000] {
let input = build_input(size);
group.bench_with_input(
BenchmarkId::new("variant_name", size),
&input,
|b, input| {
b.iter(|| {
my_function(input);
});
},
);
}
group.finish();
}
criterion_group!(benches, bench_happy_path);
criterion_main!(benches);
fn build_input(size: usize) -> Input { /* ... */ }Decide what scales to measure. Rocky's pattern is to sweep an n dimension (models, rows, nodes) with a few 10× steps (10 / 100 / 1000). Steps > 10× are rare. If one step takes > 30 s on a debug build, gate it behind cfg!(debug_assertions) so it only runs in release — see the 10_000 gate in bench_cold_compile.
Reduce sample_size for expensive iters. The default 100 samples × ~30 s per iter = 50 minutes. group.sample_size(10) is the right call for anything that touches DuckDB, the full compiler, or a real filesystem fixture.
Name groups and IDs for a reader, not for history. Nothing stores results between runs, so renaming a group loses nothing and costs nothing — there is no baseline to break. Criterion's own target/criterion/ directory is local and per-checkout, so it is not history either: deleting engine/target destroys no CI perf record, because none is kept. Name them clearly because a human reads them in the artifact.
Test locally before adding the perf label.
cd engine
cargo bench --bench my_bench -p <crate>Criterion writes HTML reports to target/criterion/<group>/<id>/report/index.html — open those to confirm the numbers look sane before pushing.
The CI workflow currently hardcodes three invocations (--bench compile -p rocky-cli, --bench state_store -p rocky-core, --bench dag_execute -p rocky-core). If you add a bench in, say, rocky-sql, the workflow won't invoke it. You have two options:
cargo bench ... | tee -a bench-output.txt line to the Run benchmarks step's run: block so its output lands in the same uploaded artifact (there is no github-action-benchmark step to duplicate — see the no-comparison-step note above). Review with Hugo since it extends the perf budget.rocky-cli/benches/compile.rs — acceptable if the bench is logically "compile-adjacent" and you can drive it through the existing compile entrypoint. Not acceptable for benchmarks that need to import from a crate rocky-cli doesn't already depend on.perf-labelled PRRocky's benchmarks are not free — the CI job builds DuckDB with swap and takes substantial time. Add the perf label when:
cold_compile / dag_resolution / sql_generation hot paths.rocky-core/src/{dag,ir,sql_gen,mmap,intern}.rs.You do not need the label for:
The github-action-benchmark action posts a comment when a group/ID exceeds 120% of its stored baseline. Triage order:
sample_size(10) amplifies it.mean / median / p95 often tells a different story from the bencher summary.cargo flamegraph --bench compile -p rocky-cli -- --bench <group>/<id> is the usual entry point (requires cargo-flamegraph installed).fail-on-alert: false means the comment is advisory. Don't ignore it. A silently-accepted regression accumulates across multiple PRs into a real perf cliff.
rust-clippy-triage — clippy warnings on bench code count the same as anywhere else. Benches are --all-targets.rust-async-tokio — benchmarking async code needs tokio::runtime::Runtime::new().unwrap().block_on(...) around the .iter().rust-dep-hygiene — adding criterion to a new crate uses [dev-dependencies], which are not inherited from [workspace.dependencies] in the same way as runtime deps; pin the version in the sub-crate as benches/compile.rs does.© 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 engine/.claude/skills/rust-bench-criterion of rocky-data/rocky.
Open the folder on GitHubat commit 46be77e
Rust Bench Criterion 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 |
|---|---|---|---|---|---|---|
| Rust Bench Criterion this skillrocky-data/rocky | 304 | — | ~2.5k | Automated safety check: Pass | Apache-2.0 | |
| Diesel Guardayarotsky/diesel-guard | 121 | — | ~3.1k | Automated safety check: Pass | MIT | |
| SeekDB Code Reviewoceanbase/seekdb | 3.1k | — | ~2.1k | Automated safety check: Pass | Apache-2.0 | |
| Webapp Buildersidequery/sidemantic | 129 | — | ~5.5k | Automated safety check: Pass | AGPL-3.0 | |
| Querying Tempotempoxyz/tidx | 107 | — | ~3.1k | Automated safety check: Pass | MIT | |
| Paro Optimizerzunor/paro | 105 | — | ~979 | Automated safety check: Pass | Apache-2.0 |
ayarotsky/diesel-guard
Lints Diesel and SQLx Postgres migrations for unsafe schema changes that lock tables or cause downtime, and authors custom Rhai checks.
oceanbase/seekdb
Reviews seekdb pull requests and diffs for real defects in correctness, resources, concurrency, security and tests, reporting only Blocker or Major findings.
sidequery/sidemantic
Build interactive analytics webapps, demos, dashboards, or embedded app surfaces from Sidemantic semantic models using copyable component primitives and deterministic query inspection.
tempoxyz/tidx
Query indexed Tempo chain data via tidx HTTP API and CLI. An agent skill from tempoxyz/tidx.
zunor/paro
Design, refactor and diagnose Paro's staged optimizer, using EXPLAIN COMPILE for planning and EXPLAIN ANALYZE for execution.
zunor/paro
Run Paro engineering performance gates and exploratory cold/warm, cross-engine or operator comparisons.
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.
Categories
Writing criterion benchmarks for the Rocky engine and wiring them to the perf-gated CI workflow. Rust Bench Criterion is an agent skill from rocky-data/rocky. Writing criterion benchmarks for the Rocky engine and wiring them to the perf-gated CI workflow.
Rust Bench Criterion fits situations like: adding a new benchmark; debugging a bench CI alert; deciding whether a change needs the perf PR label.
Run `npx skills add rocky-data/rocky --skill rust-bench-criterion -a claude-code`. Or copy the skill folder (engine/.claude/skills/rust-bench-criterion in rocky-data/rocky) into .claude/skills/rust-bench-criterion in your project. Claude Code loads it when a task matches its description.
Run `npx skills add rocky-data/rocky --skill rust-bench-criterion -a codex`. Or copy the skill folder (engine/.claude/skills/rust-bench-criterion in rocky-data/rocky) into .agents/skills/rust-bench-criterion 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 rust-bench-criterion -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/rust-bench-criterion, .gemini/skills/rust-bench-criterion, .github/skills/rust-bench-criterion and .opencode/skills/rust-bench-criterion in your project.
Going by SKILL.md and its folder, Rust Bench Criterion needs the command-line tools its instructions call (cargo).
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.
Rust Bench Criterion 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.5k tokens (SKILL.md is roughly 10k 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 Rust Bench Criterion: Diesel Guard (ayarotsky/diesel-guard, 121 stars), SeekDB Code Review (oceanbase/seekdb, 3.1k stars), Webapp Builder (sidequery/sidemantic, 129 stars) and Querying Tempo (tempoxyz/tidx, 107 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 8, 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.