agentleFS
lgzarturolgzarturo/codeconductor/.agents/skills/rust-engineering/SKILL.md

rust-engineering

Skill0 starsChanged 25 days agoMITView on GitHub

Rust engineering baseline: Cargo workspaces and features, error types, unsafe, public API, lints and verification. Trigger: When editing .rs files, Cargo.toml or Cargo.lock in a Rust package.

7 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use python-engineering and go-engineering.

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.
  • yariv1025Skill

    python-engineering

    Production Python engineering patterns covering architecture, observability, testing, performance/concurrency, and core practices. Use when designing Python systems, implementing async/sync APIs, setting up monitoring, structuring tests, optimizing performance, or following Python best practices.

    Also in 4 projects that use this

  • caseyngSkill

    go-engineering

    Senior Go engineering standards for production code. Module structure, error handling, interface design, concurrency, context propagation, testing, security, observability. Includes gomobile-specific constraints for cross-language bindings. Compose with code-integrity-guardrail go for verification. Trigger on: any Go implementation task, any gomobile binding, any Go component in pipeline.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Do not add anyhow/thiserror unless already used or approved.

    line 55

“Common” is measured: kept by at least 6 in 10 of the 5 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Rust engineering

Activation

Apply to any .rs, Cargo.toml or Cargo.lock change. Rules are defaults; a repository rule with the same id wins over this skill.

Inputs

  • Nearest Cargo.toml (package, [features], [lints]) and workspace root.
  • rust-toolchain.toml, clippy.toml, rustfmt.toml when present.
  • The repository's existing error type and module layout.

Procedure

  1. Locate the package. Condition: a change spans crates. Action: resolve the owning package per file and run checks with -p <package>. Exception: a workspace-wide refactor named in the Task Card. Verify: cargo metadata --no-deps --format-version 1 lists the package.
  2. Errors. Condition: a function can fail. Action: return Result with the crate's existing error type; add context where the error crosses a module boundary. Exception: tests and examples may unwrap/expect. Verify: cargo clippy -- -D clippy::unwrap_used on touched non-test code, or a grep of the diff.
  3. Public API. Condition: a pub item changes. Action: treat as a breaking change unless it only adds; update docs and CHANGELOG. Exception: crate is publish = false and private to the workspace. Verify: cargo doc --no-deps and, for published crates, cargo semver-checks if installed.
  4. unsafe. Condition: unsafe is needed. Action: smallest block, a // SAFETY: comment stating the invariant, a safe wrapper. Exception: none for new unsafe without an owner approval in the Task Card. Verify: Miri when the toolchain has it, else a test of the invariant.
  5. Features (cargo.feature-unification). Condition: a dependency or feature changes. Action: remember Cargo unifies features across the build; never rely on a feature being off. Features must be additive. Exception: mutually exclusive features guarded by compile_error!. Verify: cargo check -p <package> and cargo check --workspace --all-targets.
  6. Lockfile. Condition: a dependency changes. Action: commit Cargo.lock for binaries; justify each new dependency. Exception: libraries that gitignore the lockfile. Verify: cargo check --locked.

Decisions and exceptions

  • Match the repository's formatting, naming and error style; do not import personal preferences. Edition and MSRV come from Cargo.toml, not this skill.
  • Do not add anyhow/thiserror unless already used or approved.
  • Dependency added "just in case": reject; prefer std.

Evidence

Report each command run with its exit code, per package: cargo fmt --check, cargo clippy --all-targets -- -D warnings, cargo test -p <package>. A check that was not run is reported as not run, never as passed.

References

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.