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…
In this repository14 other files it gives its agents.
- audit-pi-sessionSkill
- bash-scriptSkill
- cli-uxSkill
- code-quality-gateSkill
- docs-pesapSkill
- external-reviewSkill
- githubSkill
- gitlabSkill
- good-apiSkill
- prekSkill
- pythonSkill
- tdd-pesapSkill
- torcSkill
- uvSkill
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
- Very specific: line 19
Prefer crate:: paths over super:: for clarity.
- Very specific: line 20
Do not use unwrap, expect, or panic-prone paths in production code.
- Distinctive: line 21
Use strong domain types, enums, and newtypes instead of stringly-typed state.
- Distinctive: line 22
Avoid global mutable state.
- Distinctive: line 23
Treat warnings as errors and fix them rather than hiding them.
- Very specific: line 24
Keep unsafe isolated, minimal, and documented with the invariants that make it sound.
- Distinctive: line 26
Do not add end-to-end tests unless the user or repository explicitly requires them.
- Distinctive: line 28
Do not broaden dependency or lockfile changes unnecessarily.
- Distinctive: line 29
Do not use release-profile builds unless requested or needed to investigate a performance issue.
- Distinctive: line 39
Add focused tests for observable behavior and error paths.
- Very specific: line 48
Use Result with typed, contextual errors such as thiserror where suitable.
- Very specific: line 49
Prefer ?, if let, and let-chains for explicit fallibility.
- Distinctive: line 50
Do not hide failures behind fallbacks, ignored results, broad suppression, or panic-prone shortcuts.
- Distinctive: line 56
Use repository-defined commands first.
- Very specific: line 66
Use cargo nextest run for focused execution when the repository supports it.
- Very specific: line 67
Use snapshots such as insta only when nearby tests already use them.
- Distinctive: line 70
Never assume warnings or Clippy findings are pre-existing.
- Distinctive: line 74
Read nearby code and match its established test and module patterns.
- Distinctive: line 75
Prefer top-level imports and descriptive names.
- Very specific: line 76
Keep mod tests {} at the bottom of a module when tests are colocated and the repository follows that convention.
- Very specific: line 78
Prefer #[expect(...)] over #[allow(...)] when a lint suppression is truly necessary, and document why.
- Very specific: line 80
Use linked Rust doc references such as [TypeName] where appropriate.
≈ “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.
Files
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 oversuper::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
unsafeisolated, 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
- Inspect the crate, workspace, nearby tests, Cargo configuration, and local instructions before editing.
- Clarify the behavior and contract. Model domain types before implementing logic.
- Implement the smallest change that preserves the contract.
- Add focused tests for observable behavior and error paths. Prefer integration tests when behavior crosses module or CLI boundaries.
- Validate with the narrowest relevant commands, then run the repository's broader required checks.
- For performance-sensitive changes, benchmark or profile the hot path and report the comparison and trade-offs.
Error and failure handling
- Use
Resultwith typed, contextual errors such asthiserrorwhere 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 warningsAdditional defaults:
- Use
cargo nextest runfor focused execution when the repository supports it. - Use snapshots such as
instaonly 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.
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.

