# Improve Rust Services for Guts

Rust teams need consistent patterns for safe async services, errors, tests, and package metadata. This skill gives focused guidance for Guts projects that use Commonware primitives.

## Install

```bash
npx skillstore add abdelstark/rust-development
```

## Metadata

- - Status: approved
- - Slug: abdelstark-rust-development
- - Version: 1.0.0
- - Author: AbdelStark
- - GitHub username: AbdelStark
- - License: MIT
- - Repository: https://github.com/AbdelStark/guts/tree/main/.claude/skills/rust-development
- - Ref: main
- - Supported tools: Claude, Codex, Claude Code
- - Risk level: low
- - Risk factors: external\_commands, network
- - Quality score: 78
- - Quality tier: bronze
- - Public page: https://skillstore.pages.dev/skills/abdelstark-rust-development
- - Manifest: https://skillstore.pages.dev/api/skills/abdelstark-rust-development/manifest

## Capabilities

- Recommends idiomatic Rust structure for libraries, services, modules, and public exports.
- Guides error handling with thiserror for libraries and anyhow for applications.
- Shows async service patterns using Tokio channels and structured request replies.
- Provides testing guidance for async Rust code using tokio test patterns.
- Documents Commonware crate choices for cryptography, p2p, consensus, storage, and codec needs.
- Suggests Cargo.toml metadata, lint settings, and dependency organization for workspace projects.

## Use Cases

- Standardize a Rust Service: Apply consistent module layout, error types, async request handling, tests, and lint rules before merging a service.
- Review Commonware Integration: Check that a Guts component uses the intended Commonware crates for signing, networking, storage, serialization, and consensus.
- Prepare a Library for Release: Improve public docs, Cargo metadata, workspace dependencies, lint configuration, and test coverage for a Rust library.

## Prompt Templates

### Review Basic Rust Style

```
Review this Rust module for idiomatic style, public documentation, error handling, and tests. Use the rust-development skill guidance.
```

### Design Error Handling

```
Help me design error handling for this Rust library. Recommend thiserror variants, Result aliases, conversions, and user-facing messages.
```

### Improve Async Service Flow

```
Review this async Rust service. Focus on structured concurrency, channel usage, request replies, ownership, and testability.
```

### Audit Guts Commonware Usage

```
Audit this Guts component for Commonware integration, Cargo configuration, lint settings, async patterns, tests, and performance risks.
```

## Limitations

- It is tailored to the Guts project and may need adaptation for other Rust codebases.
- It provides guidance and examples, not an executable build or test harness.
- It does not replace security review for cryptographic protocols or consensus logic.
- It assumes familiarity with Rust, Cargo, Tokio, and workspace dependency management.

## Best Practices

- Run formatting, linting, and tests in the intended repository before applying generated changes.
- Use explicit error types for libraries and keep public errors documented.
- Keep async services testable by isolating channels, commands, and response paths.

## Anti Patterns

- Do not add unsafe Rust unless a clear need and review plan exist.
- Do not hide shared mutable state behind async tasks when channels model the workflow better.
- Do not treat example cryptography code as a complete protocol design.

## Security Audit

- - Safe to publish: true
- - Audited at: 2026-06-28T03:44:11.807\+00:00
- - Summary: Static analysis reported many command, network, sensitive-file, weak-crypto, reconnaissance, and heuristic issues. Review found these are Markdown examples, Rust identifiers, Cargo metadata, and legitimate development guidance, with no evidence of malicious intent or prompt injection.

## Stats

- - Views: 265
- - Downloads: 12
- - Favorites: 0
- - Popularity score: 0
