← ClaudeAtlas

rust-code-structurelisted

Structure or refactor Rust structs, enums, functions, methods, constructors, builders, state models, and repeated parameter groups so ownership and invariants are explicit. Use when Rust code contains primitive soup, boolean or stringly typed state, Option-heavy pseudo-variants, god structs, misplaced behavior, or unclear lifecycle data. Do not use for crate/module layout or for choosing traits, generics, trait objects, lifetimes, and public error abstractions as the primary outcome; prefer rust-project-architecture or rust-abstraction-design.
genaptic/skillsets · ★ 1 · AI & Automation · score 70
Install: claude install-skill genaptic/skillsets
## Outcome Produce cohesive Rust types and functions whose shape makes valid states, ownership, invariants, and behavior placement clear without imposing repository-specific bans on language features. ## Compatibility Portable across Claude Code, Codex, and OpenCode. Follow the target repository's selected Rust toolchain, edition, MSRV, lint policy, API stability, and serialization compatibility. Edition 2024 examples require Rust 1.85 or newer. Network access is optional and never needed for the core workflow; report any unverified version-sensitive claim. Native-client compatibility remains unverified without a dated exact-SHA report. ## Inputs - The behavior to add, refactor, or review and its observable acceptance criteria. - Existing domain types, call sites, state transitions, serialization/wire formats, and tests. - Repository conventions for public API, naming, ownership, error handling, and compatibility. - Constraints on allocation, borrowing, concurrency, persistence, and downstream callers. ## Safety - Preserve serialized representations, public constructors, match exhaustiveness, and external API compatibility unless change is explicitly authorized and migrated. - Do not mechanically replace every free function, type alias, `Option`, boolean, or clone. Treat each as a design choice whose correctness depends on semantics and repository policy. - Avoid broad rewrites. Change one responsibility or invariant at a time and keep tests executable. - Do not in