rust
Use this skill for Rust tasks in KalamDB, including core services, storage, SQL handlers, system tables, and job executors.
Step-by-step guidance:
- Read AGENTS.md first for project-wide rules, especially model separation, AppContext usage, dependency rules, and storage boundaries.
- Identify the target crate in backend/crates and keep changes scoped to the correct layer (core, store, filestore, auth, api).
- Prefer type-safe IDs and enums (NamespaceId, TableId, UserId, Role, TableType) instead of raw strings.
- Use Arc for shared state and avoid cloning large data. Prefer DashMap for concurrent maps.
- Keep errors typed (Result<T, KalamDbError>) and avoid panics. Log with log macros.
- For async code, use tokio and async/await; avoid blocking in async context.
- When adding dependencies, update root Cargo.toml under [workspace.dependencies] and reference with { workspace = true }.
Common patterns:
- AppContext-first APIs: take Arc rather than passing multiple services.
- Avoid importing within functions; place use statements at the top of the file.
- If converting Option to UserId, import UserId at file top and use UserId::from instead of inline map.
- When handling storage, keep RocksDB specifics in kalamdb-store and filesystem operations in kalamdb-filestore.
Edge cases to watch:
- Avoid leaking raw strings for enums or IDs in API/SQL paths.
More from jamals86/kalamdb
rust-skills
>
22vercel-composition-patterns
React composition patterns that scale. Use when refactoring components with
21raft
Raft replication in KalamDB: log replication, leader election, snapshots, membership changes, and safety rules. Keywords: raft, consensus, leader, follower, log, snapshot, term.
20datafusion
DataFusion integration: logical/physical plans, execution context, table providers, schema memoization, and SQL handler routing. Keywords: DataFusion, Arrow, logical plan, physical plan, table provider, schema registry.
19vercel-react-best-practices
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
19mvcc
MVCC in KalamDB: versioned records, visibility rules, snapshot reads, compaction, and transaction lifecycles. Keywords: mvcc, snapshot, visibility, commit, abort, tombstone, vacuum.
18