rust-engineer
Skill1 starsChanged 4 months agoApache-2.0View on GitHub
Design, implement, diagnose, refactor, and review Rust through a constraint-driven loop covering the problem, ownership, types, minimal Trait boundaries, real execution paths, compiler feedback, layered verification, and source review. Use for changes to Rust source or Cargo manifests; borrow checker, lifetime, trait-bound, Send/Sync, async, cancellation, unsafe, or FFI problems; public APIs and cross-process contracts; module, crate, workspace, and test organization; dependency selection; performance; observability; and CI evidence.
12 other projects use a version of this.
Adopted by
Most recently taken up by
- musaJawad004/herontheir own version, first seen Sep 6, 2026
- peakdong68/my-skillstheir own version, first seen Aug 29, 2026
- idexal/idexal-skillstheir own version, first seen Aug 26, 2026
- Leo-Atienza/atlas-claudetheir own version, first seen Jul 24, 2026
- LazyIsEfficient/agentic-ostheir own version, first seen Jul 13, 2026
- jshsakura/awesome-opencode-skillstheir own version, first seen Jul 8, 2026
Used with
Projects with it also use build-engineer, react-specialist and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
belokonmSkillbuild-engineer
Expert in monorepo tooling (Turborepo, Nx, Bazel), CI/CD pipelines, and bundler optimization (Webpack/Vite/Rspack).
Also in 3 projects that use this
belokonmSkillreact-specialist
Expert React developer specializing in React 18+, Next.js ecosystem, and modern React patterns. This agent excels at building performant, scalable React applications using hooks, concurrent features, state management solutions like Zustand, and data fetching with TanStack Query.
Also in 3 projects that use this
nilecuiSkillui-designer
Extract design systems from reference UI images and generate implementation-ready UI design prompts. Use when users provide UI screenshots/mockups and want to create consistent designs, generate design systems, or build MVP UIs matching reference aesthetics.
Also in 3 projects that use this
- +9 more from belokonm
Other versions12 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 12
- Jeffallan/claude-skills★ 12ksame name
- jshsakura/awesome-opencode-skills★ 29same name
- codeApe-7/ai-agent-workflowGroup★ 17same name
- LazyIsEfficient/agentic-os★ 17same name
- idexal/idexal-skills★ 13same name
- belokonm/claude-supercode-skills★ 11same name
- nicolasestrem/antigravity-gemini-skills★ 8same name
- Leo-Atienza/atlas-claude★ 4same name
- marttp/my_agent_skills_I_use★ 4same name
- musaJawad004/heron★ 1same name
2 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repositoryOne other file it gives its agents.
- AGENTS.mdAGENTS.md
The file
Show its rules and text
We split this skill into the rules it gives an agent
33 rules. 0 are common, 29 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
29
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Treat Rust as a modeling tool.
- Distinctive: line 20
Use this loop as the primary method:
- Distinctive: line 26
Follow this priority order:
- Distinctive: line 40
FULL: Use when any TRIVIAL condition is false or unproven.
- Distinctive: line 47
Keep context discovery inside problem and constraints.
- Distinctive: line 48
Treat concurrency, async, unsafe, FFI, networking, performance, observability, and production concerns as conditional branches that return …
- Distinctive: line 54
Start tests from caller-visible behavior.
- Very specific: line 56
Follow the repository's module-file convention.
- Distinctive: line 57
Keep concrete adapters private by default.
- Distinctive: line 58
Treat a third-party crate as a capability, ownership, runtime, compatibility, and supply-chain decision.
- Distinctive: line 77
Read references/modeling.md when ownership, lifetimes, type/error design, or Trait boundaries are not obviously local, or compiler feedback …
- Distinctive: line 78
Read references/organization.md when adding, moving, or reviewing modules, crates, workspaces, binaries, tests, examples, benchmarks, …
- Distinctive: line 79
Read references/testing.md when designing or reviewing tests, Trait contracts, integration boundaries, or completion evidence.
- Distinctive: line 80
Read references/systems.md for concurrency, async, cancellation, networking, security, unsafe, FFI, performance, or macros.
- Distinctive: line 81
Read references/ecosystem.md for dependency discovery, comparison, introduction, upgrade, replacement, features, TLS/runtime choices, …
- Distinctive: line 82
Read references/contracts.md for public Rust APIs, Traits, serialized or persisted formats, configuration, database schemas, generated …
- Very specific: line 83
Read references/observability.md for structured events, tracing, metrics, OpenTelemetry, cross-task/process context, lifecycle diagnosis, …
- Distinctive: line 84
Read references/engineering.md for external-system boundaries, cross-responsibility refactoring, production hardening, evidence escalation, …
- Distinctive: line 101
Read the smallest necessary repository rules, worktree state, manifests, toolchain, features, public exports, direct callers, adjacent …
- Distinctive: line 119
Write the desired caller first.
- Distinctive: line 121
Keep local deterministic algorithms concrete when no independent behavior seam exists.
- Distinctive: line 125
Use an enum for a closed set that callers must exhaustively handle.
- Distinctive: line 126
Prefer static dispatch when the implementation is known at compile time.
- Distinctive: line 127
Use dynamic dispatch only for a real runtime requirement.
- Very specific: line 129
Keep the Trait small and caller-oriented.
- Distinctive: line 136
write the narrowest caller-visible unit or contract test that fixes intended behavior.
- Distinctive: line 139
add failure, shutdown, and cleanup required by this path.
- Distinctive: line 140
add integration coverage only when the path truly crosses a component, protocol, process, or storage boundary.
- Distinctive: line 142
Keep library behavior reusable and binaries thin.
- Very specific: line 153
Use complete diagnostics, rustc --explain, minimal experiments, and source when required.
- Distinctive: line 166
Test failure, cancellation, shutdown, and cleanup when they are part of the contract.
- Distinctive: line 170
Read from public surface to implementation:
- Distinctive: line 189
Before answering, map the task back to every requested decision and the relevant loaded checklist.
“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Rust Engineer
Core Method
Treat Rust as a modeling tool. Explain how values are created, moved, borrowed, shared, mutated, and dropped before choosing types, interfaces, or control flow. Treat compiler feedback as evidence that corrects the model, not as friction to silence.
Use this loop as the primary method:
problem and constraints -> value and ownership model -> type and error model -> minimal Trait boundary -> smallest real path -> compiler-guided iteration -> layered verification -> source review -> repeat
Reason from first principles: derive the solution from values, ownership, types, boundaries, and observable facts instead of starting from syntax recipes, directory templates, or fashionable crates. Apply focused learning and deliberate practice only to the model gap exposed by the current task. Maintain a learn -> build -> reflect -> correct cycle through real code, compiler diagnostics, tests, execution evidence, and source review.
Follow this priority order:
- User goal, scope, completion criteria, and authority.
- Repository rules, public contracts, real callers, and existing tests.
- This eight-step loop.
- Conditional references and style preferences.
Rust and its ecosystem evolve. Verify syntax, APIs, lints, crate behavior, and commands against the pinned toolchain, manifests, official documentation, and source.
Select an Execution Mode
Choose exactly one mode at the start.
- TRIVIAL: Use only when the change is local and mechanical; observable behavior, invariants, and error semantics remain unchanged; no public API, Trait, module/crate boundary, manifest, feature, dependency, wire, persistence, or configuration contract changes; ownership escape, lifetimes, concurrency, async, unsafe, FFI, and security boundaries remain unchanged; an existing narrow check proves the result; and no semantic decision is unresolved.
- FULL: Use when any TRIVIAL condition is false or unproven. Non-trivial implementation, diagnosis, refactoring, and review default to FULL.
TRIVIAL compresses the loop; it does not bypass it: confirm scope and invariants -> make the smallest change -> read compiler or test feedback -> inspect the exact diff and narrow verification. For a rename, inspect binding resolution, naming collisions, and macros or generated text that can observe an identifier. Escalate to FULL as soon as behavior, modeling, scope, or evidence changes.
Maintain Execution Discipline
- Execute all eight steps for FULL work. Diagnosis or review may enter at the exposed failure, but return to the underlying model and finish with proportional verification.
- Keep context discovery inside problem and constraints; do not turn it into a parallel workflow.
- Treat concurrency, async, unsafe, FFI, networking, performance, observability, and production concerns as conditional branches that return to the current main step.
- Define a Trait because a stable behavior seam exists, not because multiple implementations already exist. Storage, protocols, command handling, parsers, external services, plugins, and pipelines normally establish such seams even with one implementation.
- Allow a concrete local function or inherent implementation only when all four exemption conditions hold: the collaboration is fully local; no stable higher-level caller depends on it; no composition or replacement decision exists; no shared contract, contract test, or boundary test double is needed; and a Trait would only mirror the concrete API. Record the reason, state that implementation count is not the reason, and name the future boundary change that would invalidate the exemption.
- Decide interface existence separately from dispatch. Prefer generics,
impl Trait, or&impl Traitwhen the implementation is known statically. Usedyn Traitonly for runtime heterogeneity, type erasure, plugins, or dynamic assembly. - Design a Trait from the shortest realistic caller example. Decide methods, receivers, associated types, errors, lifetimes, and composition from caller needs.
- Before publishing a Trait, decide whether downstream implementations are open or sealed, what compatibility that promise creates, whether returned Futures require
Send, and whether dynamic dispatch is required. Verify required dyn compatibility with a minimal compile check against the pinned toolchain instead of asserting it from memory. - Start tests from caller-visible behavior. Let interface, contract tests, and the first implementation evolve together without freezing private details.
- Derive file structure from responsibilities, public surfaces, and dependency direction. Keep one responsibility in the smallest module that can own it. Split crates only for an enforceable boundary, dependency/feature/platform isolation, independent reuse or publication, or measured build isolation.
- Follow the repository's module-file convention. Both
foo.rsandfoo/mod.rslayouts are valid. Never create competing roots for the same module, and never split files only for symmetry or line count. Keep shared contract tests with the module boundary they verify. - Keep concrete adapters private by default. Keep crate roots as deliberate facades and binary entry points as composition, lifecycle, and exit-code owners.
- Treat a third-party crate as a capability, ownership, runtime, compatibility, and supply-chain decision. Start from the real path and current dependency graph; do not use allowlists, denylists, popularity, or novelty as substitutes for evidence.
- Separate source compatibility, parseability, wire compatibility, semantic compatibility, rollout safety, and rollback safety for public API or persisted contract changes.
- Derive telemetry from questions the system must answer. Keep causal trace identity separate from domain identity, control metric cardinality, and preserve evidence boundaries.
- Solve only the real requirement. Do not add layers for symmetry, imagined implementations, easy mocking, or speculative reuse.
Route failures back into the loop:
- compiler failure -> steps 2-4;
- behavior failure -> steps 1, 3, 4, or 5;
- awkward callers, leaking implementation types, generic propagation, or unusable errors -> step 4;
- mixed responsibilities or leaking public exports -> steps 1, 4, 5, or 7 plus organization guidance;
- dependency mismatch, feature growth, runtime conflicts, or unclear teardown -> steps 1, 4, 5, and 8 plus ecosystem guidance;
- incompatible callers, wire data, persisted data, defaults, or migration order -> steps 1, 3, 4, 5, and 7 plus contract guidance;
- broken async context, unbounded metrics, or missing diagnostic ownership -> steps 1, 2, 3, 5, and 7 plus observability guidance;
- concurrency, resource, safety, or performance failure -> steps 1, 2, and 5 plus systems guidance;
- source evidence disproves an assumption -> step 1.
Load References on Demand
- Read references/modeling.md when ownership, lifetimes, type/error design, or Trait boundaries are not obviously local, or compiler feedback exposes a model error.
- Read references/organization.md when adding, moving, or reviewing modules, crates, workspaces, binaries, tests, examples, benchmarks, fixtures, or build scripts.
- Read references/testing.md when designing or reviewing tests, Trait contracts, integration boundaries, or completion evidence.
- Read references/systems.md for concurrency, async, cancellation, networking, security, unsafe, FFI, performance, or macros.
- Read references/ecosystem.md for dependency discovery, comparison, introduction, upgrade, replacement, features, TLS/runtime choices, dependency trees, or supply-chain review.
- Read references/contracts.md for public Rust APIs, Traits, serialized or persisted formats, configuration, database schemas, generated clients, and cross-version readers or writers.
- Read references/observability.md for structured events,
tracing, metrics, OpenTelemetry, cross-task/process context, lifecycle diagnosis, alerting, or production evidence. - Read references/engineering.md for external-system boundaries, cross-responsibility refactoring, production hardening, evidence escalation, or deep dependency source review. Do not load it for routine wrap-up.
References provide decisions for the current step; they do not create parallel workflows.
Execute the Eight-Step Loop
1. Problem and Constraints
Fix facts before designing:
- current behavior, target behavior, and real callers;
- inputs, outputs, observable results, and invariants;
- current crate/module tree, public exports, dependency direction, entry points, and dominant axis of change;
- absence, failure, cancellation, timeout, shutdown, retry, and cleanup semantics;
- performance, security, compatibility, platform, and resource limits;
- the evidence layer required for completion.
Read the smallest necessary repository rules, worktree state, manifests, toolchain, features, public exports, direct callers, adjacent implementation, and relevant tests. Stop discovery once the current behavior and a safe change path are explainable.
2. Value and Ownership Model
Draw the lifecycle of every value that crosses a function, task, thread, cache, process, or FFI boundary:
create -> owner -> move/borrow -> share/mutate -> drop
Identify who validates and owns the value, where ownership moves, how short each borrow can be, whether multiple owners or shared mutation are real, and how normal, error, cancellation, and panic paths release resources. Prefer local ownership, short borrows, explicit moves, and message passing. Treat cloning, reference counting, interior mutability, and locks as semantic and cost decisions.
3. Type and Error Model
Use structs for simultaneously valid data and enums for mutually exclusive states. Use newtypes for semantic distinctions and validated values. Use Option<T> only for absence and Result<T, E> for recoverable failure. Establish invariants at constructors or parse boundaries. Preserve typed, matchable errors at library and domain boundaries; add operational context at application boundaries. Panic only for unrecoverable program invariants.
Borrow input used only during a call; return owned data when results escape. Prefer standard conversions and behavior Traits where they improve ecosystem fit.
4. Minimal Trait Boundary
Write the desired caller first. Then:
- Keep local deterministic algorithms concrete when no independent behavior seam exists.
- Define a minimal Trait for stable system seams even with one implementation.
- Apply the four-part concrete exemption only when every condition is proven.
- Make higher-level flow depend on the Trait; choose and inject adapters at the composition root.
- Use an enum for a closed set that callers must exhaustively handle.
- Prefer static dispatch when the implementation is known at compile time.
- Use dynamic dispatch only for a real runtime requirement.
Keep the Trait small and caller-oriented. Check receiver choice, type-decision ownership, associated types, open/sealed policy, dyn compatibility, errors, lifetimes, Send/Sync, returned-Future bounds, and compatibility cost. Write reusable contract tests for the first implementation.
5. Build the Smallest Real Path
Implement the shortest slice from a real entry point to an observable result in the smallest module or crate that owns it:
- define minimal data, errors, and necessary Trait contracts;
- write the narrowest caller-visible unit or contract test that fixes intended behavior;
- implement the core success path;
- connect the real caller and required boundary;
- add failure, shutdown, and cleanup required by this path;
- add integration coverage only when the path truly crosses a component, protocol, process, or storage boundary.
Keep library behavior reusable and binaries thin. Do not reorganize adjacent code, introduce a framework, or optimize without evidence before the slice closes.
6. Iterate from Compiler Feedback
Classify diagnostics before editing:
- move, borrow, or lifetime -> step 2;
- type mismatch, unreachable state, or error propagation -> step 3;
- trait bound, dyn compatibility, or generic growth -> step 4;
Send/Sync,Pin, or cross-task borrow -> step 2 plus systems guidance.
Use complete diagnostics, rustc --explain, minimal experiments, and source when required. Do not stack clone, unwrap, Box<dyn _>, Arc<Mutex<_>>, or 'static merely to silence the compiler. Compilation proves static constraints, not behavior.
7. Verify in Layers
Select the smallest evidence that proves the stated goal:
- static: format, type check, compile, lint;
- target behavior: unit and contract tests;
- component collaboration: integration tests through public boundaries;
- non-functional: benchmark, profile, Miri, sanitizer, property test, fuzz;
- real execution: target OS, runtime, network, storage, or external service;
- production: real traffic, metrics, failures, and recovery.
Test failure, cancellation, shutdown, and cleanup when they are part of the contract. Never substitute one evidence layer for another.
8. Review Source and Feed Back
Read from public surface to implementation:
- README, documentation, examples, features, crate-root exports, and public API;
- core Traits and behavioral contracts;
- state-owning structs, layout, ownership, and concurrency boundaries;
- one relevant implementation path, verified by a minimal program when behavior matters.
Record the original hypothesis, the source or experiment that confirmed or disproved it, the resulting model change, and the exact version/feature scope. Feed the new fact into step 1.
Enter the Loop by Task
- Implementation: classify TRIVIAL/FULL, then execute the matching loop.
- Compiler error: enter at step 6, return to steps 2-4, then finish steps 5-8.
- Runtime defect: reproduce and fix evidence in step 1, then execute steps 2-8.
- Refactor: lock observable behavior and the real axis of change in step 1, then execute steps 2-8.
- Review: read-only execution of steps 1-7; report correctness, safety, concurrency, contract, and test risks before any summary.
Deliver
Before answering, map the task back to every requested decision and the relevant loaded checklist. Make each conclusion and its evidence explicit; concision is not a reason to omit a compatibility, error, test, cancellation, or evidence-boundary decision that affects the result.
Lead with whether the requested real path is complete. For TRIVIAL work, state why the fast path applied, what changed, and the narrow verification. For FULL work, report the model or boundary change, actual implementation, verification commands, and evidence layer. For read-only design or review, state what was established, what remains unverified, and whether additional evidence is required by the user goal or repository contract. List only failures, skipped checks, and remaining risks that affect the conclusion. Never present static, mocked, or local evidence as real-environment or production proof.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

