rust skills
14 skills. Source of truth: skills/rust/.
actor-model
Tokio-native actor model pattern for Prometheus AGS projects. Implements actors as tokio tasks communicating via mpsc channels with a typed message enum, enabling safe concurrent state management without shared locks. Used in UAR session management, pk-librarian event broadcasting, and parking-lot scheduler design. Use when a component needs to own state exclusively while serving concurrent callers.
v1.0.0 · rust patterns · source
async-patterns
Canonical async Rust patterns for Prometheus AGS projects. Covers tokio task spawning, Arc<RwLock<T>> vs parking_lot::Mutex selection, blocking guard prevention, broadcast channels, graceful shutdown, and structured concurrency. Use whenever writing async code in any Prometheus Fabric crate.
v1.0.0 · rust patterns · source
axum-patterns
Axum 0.8 router, middleware, extractor, and state injection patterns for Prometheus AGS projects. Enforces the canonical Axum structure: typed state via Extension/State extractors, Tower middleware composition, structured error types, and Axum-native SSE for MCP servers. Use when building any Axum HTTP service, MCP server, or API gateway in the Prometheus stack.
v1.0.0 · rust patterns · source
error-handling
Canonical Rust error handling for Prometheus AGS projects. Enforces the thiserror/anyhow boundary: thiserror for library crate errors (typed, composable), anyhow for application code (ergonomic, context-rich). Includes #[cold] error path annotation, no unwrap/expect in non-test code, and structured error propagation via the ? operator.
v1.0.0 · rust patterns · source
karpathy-tokenizer
Train GPT-style BPE tokenizers with rustbpe (Karpathy), export to tiktoken for fast Rust inference, and integrate with agent-tokenizer for prompt-budget enforcement.
v1.0.0 · rust patterns · source
librefang-wasm-skill
Generate a LibreFang WASM-ABI-compliant skill in Rust. Produces a cdylib crate that exports the required Guest ABI (alloc, execute, memory) and a host_call bridge wrapping LibreFang's capability-checked host functions (fs_, net_fetch, kv_, agent_*, time_now, env_read, shell_exec). Includes a skill.toml manifest matching librefang-skills' SkillManifest schema. Use when building a portable, sandboxed skill that runs inside a librefang/bossfang Agent OS instance via WasmSkillSandbox, or when packaging a Prometheus native-agent for upload to a bossfang URL.
v1.0.0 · librefang bossfang wasm wasmtime wasi agent-os skill packaging · source
mcp-server
Canonical Axum MCP server pattern for Prometheus AGS projects. Implements the MCP protocol as JSON-RPC 2.0 over HTTP POST /mcp with optional SSE event stream at GET /events. Covers tool registration, handler dispatch, SSE fan-out via broadcast, and stdio transport for Claude Desktop integration. Use when building any new MCP-enabled service in the Prometheus stack.
v1.0.0 · rust patterns · source
performance
Production-grade Rust performance primitives for Prometheus AGS projects. Covers jemalloc global allocator, #[cold]/#[inline(never)] for error paths, MaybeUninit for zero-cost initialization, std::mem::take for ownership without clone, Arc placement discipline, parking_lot over std::sync, and SIMD-aware buffer patterns. Apply when writing hot paths, server binaries, or inference-adjacent code.
v1.0.0 · rust patterns · source
prometheus-rust-auditor
Staged autonomous Rust code quality remediation pipeline for Prometheus AGS projects. Runs Clippy enforcement, formatting checks, dependency policy, workspace inventory, partition-based architectural invariant audits, and CI generation. Use when auditing a Rust workspace, remediating code quality issues, or generating CI workflows.
v1.0.0 · rust auditor clippy quality invariants ci workspace cargo · source
prometheus-rust-workspace
Route Rust and Cargo work to the minimum relevant installed skills and enforce phase-gated, serialized Cargo verification. Use when working with .rs files, Cargo.toml, Cargo.lock, compiler or Clippy diagnostics, Rust architecture, async Rust, unsafe Rust, Rust MCP servers, or Rust reviews. Do NOT use for non-Rust code or tasks that do not touch a Cargo workspace.
v1.0.0 · source
rust-async-patterns
Master Rust async programming with Tokio, async traits, error handling, and concurrent patterns. Use when building async Rust applications, implementing concurrent systems, or debugging async code.
rust-best-practices
Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook. Use this skill when: (1) writing new Rust code or functions, (2) reviewing or refactoring existing Rust code, (3) deciding between borrowing vs cloning or ownership patterns, (4) implementing error handling with Result types, (5) optimizing Rust code for performance, (6) writing tests or documentation for Rust projects.
v1.1.1 · source
rust-mcp-server-generator
Generate a complete Rust Model Context Protocol server project with tools, prompts, resources, and tests using the official rmcp SDK
workspace-structure
Canonical Rust workspace layout for Prometheus AGS multi-crate projects. Enforces resolver=2, workspace-level dependency versions, domain-driven crate separation (*-core / *-store / *-librarian / *-mcp / *-cli), feature flag discipline, and release profile settings. Use when scaffolding any new Prometheus Rust workspace.
v1.0.0 · rust patterns · source