rust
1
总安装量
1
周安装量
#45809
全站排名
安装命令
npx skills add https://github.com/jamals86/kalamdb --skill rust
Agent 安装分布
amp
1
opencode
1
kimi-cli
1
codex
1
antigravity
1
Skill 文档
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.
- Donât mix multiple models in one file (one model per file).
- Avoid repeated cargo check loops; batch fixes and rerun once.
When uncertain about where a change belongs, scan for existing abstractions (StorageBackend, EntityStore, schema_registry, live). Use or extend them instead of creating new parallel logic.