SeekDB Code Review
oceanbase/seekdb
Reviews seekdb pull requests and diffs for real defects in correctness, resources, concurrency, security and tests, reporting only Blocker or Major findings.
Decision tree for thiserror (library crates) vs anyhow (CLI/binary) in the Rocky engine workspace.
$ npx skills add rocky-data/rocky --skill rust-error-handling -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install rocky-data/rocky rust-error-handling --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-error-handling .claude/skills/rust-error-handling && 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-error-handling" agent skill from https://github.com/rocky-data/rocky/tree/main/engine/.claude/skills/rust-error-handling into .claude/skills/rust-error-handling/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-error-handling", 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-error-handlingType 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-error-handling -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install rocky-data/rocky rust-error-handling --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-error-handling .agents/skills/rust-error-handling && 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-error-handling" agent skill from https://github.com/rocky-data/rocky/tree/main/engine/.claude/skills/rust-error-handling into .agents/skills/rust-error-handling/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-error-handling", 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-error-handling -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install rocky-data/rocky rust-error-handling --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-error-handling .cursor/skills/rust-error-handling && 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-error-handling" agent skill from https://github.com/rocky-data/rocky/tree/main/engine/.claude/skills/rust-error-handling into .cursor/skills/rust-error-handling/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-error-handling", 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-error-handling--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-error-handling -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install rocky-data/rocky rust-error-handling --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-error-handling .gemini/skills/rust-error-handling && 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-error-handling" agent skill from https://github.com/rocky-data/rocky/tree/main/engine/.claude/skills/rust-error-handling into .gemini/skills/rust-error-handling/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-error-handling", 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-error-handlingInstalls 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-error-handling -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-error-handling .github/skills/rust-error-handling && 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-error-handling" agent skill from https://github.com/rocky-data/rocky/tree/main/engine/.claude/skills/rust-error-handling into .github/skills/rust-error-handling/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-error-handling", 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-error-handling -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-error-handling --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-error-handling .opencode/skills/rust-error-handling && 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-error-handling" agent skill from https://github.com/rocky-data/rocky/tree/main/engine/.claude/skills/rust-error-handling into .opencode/skills/rust-error-handling/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-error-handling", 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-error-handlingDecision tree for thiserror (library crates) vs anyhow (CLI/binary) in the Rocky engine workspace.
Rust Error Handling is an agent skill from rocky-data/rocky. Decision tree for thiserror (library crates) vs anyhow (CLI/binary) in the Rocky engine workspace. Use when adding a new error type, adding a new From impl, deciding where to attach context, or triaging how an error surfaces to Dagster/JSON output.
Its SKILL.md is about 2.3k 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 Error handling and Data warehousing. It works with Rust and Dagster. 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 0cb7c7b. 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.
No scripts in the folder and no shell commands in SKILL.md (its code samples are rust).
From 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 Error Handling loads about 2.3k tokens when it runs. Until then it costs about 68 tokens; SKILL.md has 998 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 0cb7c7b, republished under its Apache-2.0 licence (© rocky-data). 998 words, ~2,291 tokens.
.claude/skills/rust-error-handling/SKILL.md (or your agent's skills folder).Rocky uses a two-tier error handling strategy. The rule, from engine/CLAUDE.md § Coding Standards:
Use
thiserrorfor library errors,anyhowfor binary/CLI errors.
This skill is the decision tree: when to reach for which, what From impls to derive, how to attach context, and how errors flow out of the binary into Dagster JSON.
| Layer | Crate | Error crate | Why |
|---|---|---|---|
| Library | every library crate — rocky-core, rocky-ir, rocky-sql, rocky-compiler, rocky-lang, rocky-adapter-sdk, the adapter crates (rocky-databricks, rocky-snowflake, rocky-bigquery, rocky-trino, rocky-duckdb, rocky-fivetran, rocky-airbyte, rocky-iceberg), rocky-catalog-core, rocky-cache, rocky-engine, rocky-ai, rocky-observe, rocky-server, rocky-mcp | thiserror | Library errors need to be matchable by callers, namable, and stable. |
| Binary / CLI | rocky-cli, rocky | anyhow | The CLI is the top of the call stack — we don't care about matching errors, we care about printing them with context. |
If a crate imports both thiserror and anyhow, that's usually a smell — check whether the library's error enum is leaking into the binary uselessly, or whether an anyhow::Error is being stashed into a #[error(transparent)] variant.
thiserror patternEvery library crate defines its errors as a named enum with #[derive(Debug, thiserror::Error)]. The #[error("…")] attribute provides the Display impl; #[from] derives From for automatic ? conversion.
Concrete examples already in the codebase:
crates/rocky-core/src/hooks/mod.rs — HookError with variants for command-failed / timeout / aborted / I/O / serialization / webhook (uses #[from] to chain std::io::Error, serde_json::Error, and WebhookError)crates/rocky-core/src/hooks/webhook.rs — WebhookError with variants for request-failed / timeout / HTTP-status / template / HTTP-clientcrates/rocky-core/src/circuit_breaker.rs — CircuitBreakerError with a single variant carrying consecutive_failures, threshold, and last_errorcrates/rocky-databricks/src/{catalog,permissions,workspace}.rs — each module owns a small error enum scoped to its concernsTemplate:
use thiserror::Error;
#[derive(Debug, Error)]
pub enum FooError {
/// Context-bearing message — include the values that make this specific.
#[error("foo failed for {key}: {reason}")]
Failed { key: String, reason: String },
/// Transparent wrap of a child error — use when Foo is a thin shim and
/// the caller should see the child error's Display directly.
#[error(transparent)]
Inner(#[from] BarError),
/// External crate errors go behind `#[from]` so `?` works.
#[error("I/O error: {0}")]
Io(#[from] std::io::Error),
}
pub type Result<T> = std::result::Result<T, FooError>;Rules:
rocky-core has separate errors per subsystem (HookError, WebhookError, CircuitBreakerError, ModelError, etc.).#[error("...")] message starts lowercase, does not end with a period, and includes the values that make this specific instance distinguishable from other instances of the same variant (see the hook command failed: {command} (exit code {exit_code}) style).#[from] for automatic ? conversion when there's only one reasonable way the child error could arise in this variant. If the same child type could come from two different code paths, split them into two variants and use .map_err(...) at the call site instead.#[error(transparent)] only when the wrapper adds zero information — i.e. when it's literally a newtype pass-through.Debug always. Do not derive Clone on errors unless a test harness or a background-task broadcast specifically needs it; cloning errors usually means they're being held past their useful lifetime.#[error("other: {0}")] Other(String) catch-all. That's an anyhow smell leaking into a library — if the library can't name the error, it probably shouldn't be producing it.anyhow patternrocky-cli and the rocky binary use anyhow::Result<T> as the return type for command handlers. Errors are built from:
? (anyhow auto-converts anything Debug + Display + Send + Sync + 'static).context("...") / .with_context(|| format!("...")) to attach extra information at each layeranyhow::bail!("...") / anyhow::ensure!(cond, "...") for inline failuresTemplate:
use anyhow::{Context, Result, bail, ensure};
pub fn run(config_path: &Path) -> Result<RunOutput> {
let config = rocky_core::config::load(config_path)
.with_context(|| format!("failed to load config at {}", config_path.display()))?;
ensure!(!config.pipelines.is_empty(), "config has no pipelines");
let Some(adapter) = config.adapters.get("default") else {
bail!("no default adapter configured");
};
adapter.run()
.context("pipeline run failed")
// ↑ top-level context. Each library-level .context() below adds a layer.
}Rules:
? in a CLI handler throws away the "what were we trying to do" half of the story. Wrap every library call with .context("...") or .with_context(|| ...). Use with_context when the message needs runtime data (it's lazy), plain context when it's a static string (it's cheaper).bail! and ensure! are fine at command-handler level for preconditions that aren't worth their own library error type. Don't use them inside library crates..unwrap() or .expect() outside tests. The CLI should always return an error up to main.rs, which formats it with the full chain.is_rate_limit() on rocky-databricks/src/connector.rs).The CLI emits JSON on stdout for every --output json invocation. When a handler returns Err(anyhow::Error):
rocky binary's entry point (rocky/src/main.rs) prints the error chain to stderr with all .context() layers.RunOutput JSON was still written to stdout).integrations/dagster/ reads the exit code and (for code 2) the partial-success JSON. It has allow_partial=True handling specifically for this case.Implication for error messages: the Dagster integration surfaces your .context("...") strings to the Dagster event log. Make them operator-readable. "failed to load config at /path/rocky.toml" is useful; "load failed" is not.
Implication for library errors: if a library error variant needs to be distinguishable by Dagster (e.g. "transient, retry" vs "permanent, alert"), expose a predicate method on the error enum — don't make Dagster pattern-match on stringified messages. See rocky-databricks/src/connector.rs::is_transient and is_rate_limit for the canonical shape.
| Mistake | Fix |
|---|---|
New library crate imports anyhow::Result in its public API. | Swap to a thiserror enum. anyhow belongs to the CLI. |
.unwrap() in a non-test code path. | Use ? with a proper library error or .context() in the CLI. |
#[error("Failed")] with no context. | Include the runtime values — #[error("failed to parse {file}: {message}")]. |
A From<std::io::Error> impl on an error that has two places I/O can arise. | Split into two variants; use .map_err(...) at each call site so the variant names where the I/O happened. |
Other(String) catch-all variant in a library error. | Delete it. If you genuinely don't know the error type, the caller also doesn't — bubble up the concrete child error instead. |
eprintln!("error: {:?}", e) in the CLI. | Return Err(e) from the handler. main.rs has a single error-printing path that handles the chain formatting. |
rust-doc — public library errors need # Errors sections on the functions that return them.rust-async-tokio — async errors flow through the same two-tier model (library returns Result<_, FooError>, CLI wraps with anyhow).rocky-codegen (monorepo root) — when an error shape ends up in a *Output struct, the codegen cascade produces Pydantic + TypeScript bindings for it.© 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-error-handling of rocky-data/rocky.
Open the folder on GitHubat commit 0cb7c7b
Rust Error Handling 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 Error Handling this skillrocky-data/rocky | 304 | — | ~2.3k | Automated safety check: Pass | Apache-2.0 | |
| 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 | |
| Rust Projectmajiayu000/spellbook | 286 | — | ~2.9k | Automated safety check: Pass | MIT | |
| Adding Ingestion WarningsPostHog/posthog-foss | 721 | — | ~3.7k | Automated safety check: Pass | MIT |
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.
majiayu000/spellbook
Modern Rust project architecture guide for 2025. An agent skill from majiayu000/spellbook.
PostHog/posthog-foss
How to add a new ingestion warning type to the event ingestion pipeline.
divinevideo/divine-mobile
Debug ClickHouse deserialization errors in Rust caused by column ORDER mismatch when using SELECT alias.
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
Decision tree for thiserror (library crates) vs anyhow (CLI/binary) in the Rocky engine workspace. Rust Error Handling is an agent skill from rocky-data/rocky. Decision tree for thiserror (library crates) vs anyhow (CLI/binary) in the Rocky engine workspace.
Rust Error Handling fits situations like: adding a new error type; adding a new From impl; deciding where to attach context; triaging how an error surfaces to Dagster/JSON output.
Run `npx skills add rocky-data/rocky --skill rust-error-handling -a claude-code`. Or copy the skill folder (engine/.claude/skills/rust-error-handling in rocky-data/rocky) into .claude/skills/rust-error-handling in your project. Claude Code loads it when a task matches its description.
Run `npx skills add rocky-data/rocky --skill rust-error-handling -a codex`. Or copy the skill folder (engine/.claude/skills/rust-error-handling in rocky-data/rocky) into .agents/skills/rust-error-handling 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-error-handling -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-error-handling, .gemini/skills/rust-error-handling, .github/skills/rust-error-handling and .opencode/skills/rust-error-handling in your project.
SKILL.md names no scripts, command-line tools or credentials: Rust Error Handling is instructions for the agent only.
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 Error Handling 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.3k tokens (SKILL.md is roughly 9.2k 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 Error Handling: SeekDB Code Review (oceanbase/seekdb, 3.1k stars), Webapp Builder (sidequery/sidemantic, 129 stars), Querying Tempo (tempoxyz/tidx, 107 stars) and Rust Project (majiayu000/spellbook, 286 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 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.