agentleFS
pesappesap/skills/rust-pesap/SKILL.md

rust-pesap

Skill1 starsChanged 3 months agoMITView on GitHub

Apply the repository's established conventions first. When the repository does not define a convention, use the standards below. - Prefer crate:: paths over super:: for clarity. - Do not use unwrap, expect, or panic-prone paths in production code. - Use strong domain types, enums, and newtypes instead of stringly-typed state. - Avoid global mutable state; pass context explicitly. - Treat warnings as errors and fix them rather than hiding them. - Keep unsafe isolated, minimal, and documented with the invariants…

The file

Show its rules and text

We split this skill into the rules it gives an agent

22 rules. About 0 are common, 12 are distinctive, and 10 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈12

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 10

    Very specific

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

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

    Prefer crate:: paths over super:: for clarity.

    line 19
  2. Very specific:

    Do not use unwrap, expect, or panic-prone paths in production code.

    line 20
  3. Distinctive:

    Use strong domain types, enums, and newtypes instead of stringly-typed state.

    line 21
  4. Distinctive:

    Avoid global mutable state.

    line 22
  5. Distinctive:

    Treat warnings as errors and fix them rather than hiding them.

    line 23
  6. Very specific:

    Keep unsafe isolated, minimal, and documented with the invariants that make it sound.

    line 24
  7. Distinctive:

    Do not add end-to-end tests unless the user or repository explicitly requires them.

    line 26
  8. Distinctive:

    Do not broaden dependency or lockfile changes unnecessarily.

    line 28
  9. Distinctive:

    Do not use release-profile builds unless requested or needed to investigate a performance issue.

    line 29
  10. Distinctive:

    Add focused tests for observable behavior and error paths.

    line 39
  11. Very specific:

    Use Result with typed, contextual errors such as thiserror where suitable.

    line 48
  12. Very specific:

    Prefer ?, if let, and let-chains for explicit fallibility.

    line 49
  13. Distinctive:

    Do not hide failures behind fallbacks, ignored results, broad suppression, or panic-prone shortcuts.

    line 50
  14. Distinctive:

    Use repository-defined commands first.

    line 56
  15. Very specific:

    Use cargo nextest run for focused execution when the repository supports it.

    line 66
  16. Very specific:

    Use snapshots such as insta only when nearby tests already use them.

    line 67
  17. Distinctive:

    Never assume warnings or Clippy findings are pre-existing.

    line 70
  18. Distinctive:

    Read nearby code and match its established test and module patterns.

    line 74
  19. Distinctive:

    Prefer top-level imports and descriptive names.

    line 75
  20. Very specific:

    Keep mod tests {} at the bottom of a module when tests are colocated and the repository follows that convention.

    line 76
  21. Very specific:

    Prefer #[expect(...)] over #[allow(...)] when a lint suppression is truly necessary, and document why.

    line 78
  22. Very specific:

    Use linked Rust doc references such as [TypeName] where appropriate.

    line 80

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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 pesap

Apply the repository's established conventions first. When the repository does not define a convention, use the standards below.

Non-negotiable defaults

  • Prefer crate:: paths over super:: for clarity.
  • Do not use unwrap, expect, or panic-prone paths in production code.
  • Use strong domain types, enums, and newtypes instead of stringly-typed state.
  • Avoid global mutable state; pass context explicitly.
  • Treat warnings as errors and fix them rather than hiding them.
  • Keep unsafe isolated, minimal, and documented with the invariants that make it sound. Explain why safe Rust is insufficient and how tests cover the risk.
  • Do not add end-to-end tests unless the user or repository explicitly requires them.
  • Do not broaden dependency or lockfile changes unnecessarily.
  • Do not use release-profile builds unless requested or needed to investigate a performance issue.

Workflow

  1. Inspect the crate, workspace, nearby tests, Cargo configuration, and local instructions before editing.
  2. Clarify the behavior and contract. Model domain types before implementing logic.
  3. Implement the smallest change that preserves the contract.
  4. Add focused tests for observable behavior and error paths. Prefer integration tests when behavior crosses module or CLI boundaries.
  5. Validate with the narrowest relevant commands, then run the repository's broader required checks.
  6. For performance-sensitive changes, benchmark or profile the hot path and report the comparison and trade-offs.

Error and failure handling

  • Use Result with typed, contextual errors such as thiserror where suitable.
  • Prefer ?, if let, and let-chains for explicit fallibility.
  • Do not hide failures behind fallbacks, ignored results, broad suppression, or panic-prone shortcuts.
  • Preserve useful context when mapping errors.

Testing and validation defaults

Use repository-defined commands first. If none exist, the fallback commands are:

cargo fmt --all
cargo test
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings

Additional defaults:

  • Use cargo nextest run for focused execution when the repository supports it.
  • Use snapshots such as insta only when nearby tests already use them.
  • For Unix-hosted Windows-target changes, run the appropriate cargo xwin clippy ... validation when available.
  • Never assume warnings or Clippy findings are pre-existing; verify them.

Style and maintenance

  • Read nearby code and match its established test and module patterns.
  • Prefer top-level imports and descriptive names.
  • Keep mod tests {} at the bottom of a module when tests are colocated and the repository follows that convention.
  • Prefer #[expect(...)] over #[allow(...)] when a lint suppression is truly necessary, and document why.
  • Use linked Rust doc references such as [TypeName] where appropriate.
  • Question assumptions at boundaries and make ownership, lifetime, and safety reasoning visible.

Output

  • Summary of code and test changes.
  • Validation commands and exact results.
  • Performance notes for hot paths.
  • Risks, assumptions, and unresolved gaps.

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.