Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Rust development best practices for the Guts project - idiomatic code, error handling, async patterns, and commonware integration
.claude/skills/aiskillstore-rust-development/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 0% | 0% |
| case-04 | ✗→✓ | ▲ Improved | -20% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 9% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 7% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 51% | 0% |
You are developing a Rust project using commonware primitives for decentralized infrastructure.
thiserror for library errors, anyhow for applicationsbash# Always run before committing cargo fmt --all cargo clippy --all-targets --all-features -- -D warnings
rustuse thiserror::Error; #[derive(Debug, Error)] pub enum RepositoryError { #[error("repository not found: {0}")] NotFound(String), #[error("permission denied for repository: {0}")] PermissionDenied(String), #[error("storage error: {0}")] Storage(#[from] StorageError), } pub type Result<T> = std::result::Result<T, RepositoryError>;
Use Tokio for async runtime with structured concurrency:
rustuse tokio::sync::{mpsc, oneshot}; // Prefer channels over shared state pub struct Service { tx: mpsc::Sender<Command>, } impl Service { pub async fn query(&self, request: Request) -> Result<Response> { let (tx, rx) = oneshot::channel(); self.tx.send(Command::Query { request, reply: tx }).await?; rx.await? } }
rust// lib.rs - re-export public API pub mod error; pub mod types; pub mod service; pub use error::{Error, Result}; pub use types::*; pub use service::Service;
rust#[cfg(test)] mod tests { use super::*; #[tokio::test] async fn test_feature() { // Arrange let service = Service::new().await; // Act let result = service.do_something().await; // Assert assert!(result.is_ok()); } }
commonware-cryptography: Use for Ed25519 signaturescommonware-p2p: Use for peer-to-peer networkingcommonware-consensus: Use for BFT consensuscommonware-storage: Use for persistent storagecommonware-codec: Use for serializationrustuse commonware_cryptography::{Ed25519, Signer, Verifier}; pub struct Identity { keypair: Ed25519, } impl Identity { pub fn new() -> Self { Self { keypair: Ed25519::generate(), } } pub fn sign(&self, message: &[u8]) -> Signature { self.keypair.sign(message) } }
toml[package] name = "guts-core" version = "0.1.0" edition = "2021" rust-version = "1.75" license = "MIT OR Apache-2.0" description = "Core types and traits for Guts" repository = "https://github.com/AbdelStark/guts" keywords = ["decentralized", "git", "p2p"] categories = ["development-tools"] [dependencies] # Use workspace dependencies thiserror = { workspace = true } tokio = { workspace = true } [dev-dependencies] tokio-test = { workspace = true } [lints.rust] unsafe_code = "deny" missing_docs = "warn" [lints.clippy] all = "warn" pedantic = "warn" nursery = "warn"
Arc for shared ownership across async tasksbytes::Bytes for zero-copy networkingdashmap for concurrent hash mapsflamegraph before optimizing| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 13,085 | 7,571 | -42% | 1 | 1 | 0% | 2,609 | 2,612 | +0% | 0 | 0 | — |
case-02 | fail→fail | 24,820 | 14,616 | -41% | 1 | 1 | 0% | 4,969 | 4,231 | -15% | 0 | 0 | — |
case-03 | pass→pass | 11,610 | 7,477 | -36% | 1 | 1 | 0% | 2,047 | 2,326 | +14% | 0 | 0 | — |
case-04 | fail→pass | 17,471 | 9,239 | -47% | 1 | 1 | 0% | 3,160 | 2,513 | -20% | 0 | 0 | — |
case-05 | pass→pass | 5,569 | 5,235 | -6% | 1 | 1 | 0% | 976 | 1,914 | +96% | 0 | 0 | — |
case-06 | pass→pass | 11,430 | 5,339 | -53% | 1 | 1 | 0% | 2,131 | 2,026 | -5% | 0 | 0 | — |
case-07 | pass→pass | 16,657 | 11,291 | -32% | 1 | 1 | 0% | 3,312 | 3,369 | +2% | 0 | 0 | — |
case-08 | fail→pass | 14,912 | 10,403 | -30% | 1 | 1 | 0% | 2,831 | 3,072 | +9% | 0 | 0 | — |
case-09 | fail→pass | 10,562 | 6,987 | -34% | 1 | 1 | 0% | 2,192 | 2,339 | +7% | 0 | 0 | — |
case-10 | fail→pass | 6,171 | 3,245 | -47% | 1 | 1 | 0% | 1,024 | 1,550 | +51% | 0 | 0 | — |
case-11 | fail→pass | 9,460 | 4,839 | -49% | 1 | 1 | 0% | 1,652 | 1,920 | +16% | 0 | 0 | — |
case-12 | fail→pass | 13,512 | 6,032 | -55% | 1 | 1 | 0% | 2,123 | 2,072 | -2% | 0 | 0 | — |
case-13 | fail→pass | 14,419 | 5,885 | -59% | 1 | 1 | 0% | 2,230 | 2,002 | -10% | 0 | 0 | — |
case-14 | pass→pass | 10,653 | 5,553 | -48% | 1 | 1 | 0% | 1,875 | 2,048 | +9% | 0 | 0 | — |
case-15 | pass→pass | 13,344 | 9,163 | -31% | 1 | 1 | 0% | 2,254 | 2,619 | +16% | 0 | 0 | — |
case-16 | pass→pass | 13,544 | 4,409 | -67% | 1 | 1 | 0% | 2,251 | 1,724 | -23% | 0 | 0 | — |
case-17 | fail→pass | 5,624 | 3,764 | -33% | 1 | 1 | 0% | 1,058 | 1,701 | +61% | 0 | 0 | — |
case-18 | pass→pass | 4,431 | 3,860 | -13% | 1 | 1 | 0% | 901 | 1,778 | +97% | 0 | 0 | — |
case-19 | pass→pass | 6,286 | 5,093 | -19% | 1 | 1 | 0% | 1,135 | 1,910 | +68% | 0 | 0 | — |
case-20 | pass→pass | 7,038 | 5,724 | -19% | 1 | 1 | 0% | 1,297 | 2,050 | +58% | 0 | 0 | — |
case-21 | fail→pass | 12,144 | 5,220 | -57% | 1 | 1 | 0% | 2,225 | 1,963 | -12% | 0 | 0 | — |
case-22 | pass→pass | 14,163 | 11,821 | -17% | 1 | 1 | 0% | 2,827 | 3,264 | +15% | 0 | 0 | — |
case-23 | pass→pass | 11,293 | 8,556 | -24% | 1 | 1 | 0% | 1,960 | 2,749 | +40% | 0 | 0 | — |
case-24 | pass→pass | 10,659 | 9,757 | -8% | 1 | 1 | 0% | 2,111 | 3,007 | +42% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 24 cases were attempted. The headline lift of +42 percentage points is the difference between those two pass rates over the 24 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.