agentleFS
zevarixzevarix/rust-coding-standards/skills/rust-performance/SKILL.md

rust-performance

Skill2 starsChanged 21 days agoApache-2.0View on GitHub

Use when Rust code is slow, performance changes need comparison, worker scaling stalls, or CPU, allocation, memory, I/O, binary-size or build-time costs need investigation.

12 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use rust-errors, rust-macros and 7 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.
  • dawidpereiraSkill

    rust-errors

    Rust error handling patterns with Result, Option, thiserror, and anyhow. Use whenever implementing error types, adding error propagation with ?, choosing between panic and Result, or working with .unwrap()/.expect(). Covers library vs application error strategy, error chaining, context, and custom error types. Also use when seeing unwrap abuse or unclear error propagation in code review.

    Also in 4 projects that use this

  • dawidpereiraSkill

    rust-macros

    Rust macros — macro_rules!, proc macros, derive macros, attribute macros, fragment specifiers, repetition, hygiene, cargo expand, when to use macros vs generics. Use when writing or debugging declarative or procedural macros, choosing between macros and other abstractions, understanding expansion errors, or generating repetitive code.

    Also in 5 projects that use this

  • tumfSkill

    rust-cli

    Design and implementation guidance for maintainable Rust CLIs with strong ergonomics, machine-friendly behavior, testable structure, and release automation. Use when creating or refactoring a Rust command-line tool, choosing crates like clap/anyhow/tracing/serde_json, improving command UX, adding JSON output, tightening test/release workflows, or making an existing CLI safer for agents and automation.

    Also in 5 projects that use this

  • adxptivedSkill

    rust-security

    Rust application security, supply-chain hardening, cryptography hygiene, secrets handling, and secure service patterns. Use when: - User asks about secure Rust code, threat modeling, auth, tokens, password hashing, or secrets - User uses crates like argon2, password-hash, ring, rustls, secrecy, zeroize, jsonwebtoken, or biscuit - User handles untrusted input, file paths, uploads, subprocesses, deserialization, or SSRF-prone URLs - User wants cargo audit, cargo deny, dependency policy, SBOMs, or supply-chain checks - User writes unsafe code exposed to untrusted data or FFI boundaries - User builds web APIs that need TLS, CORS, cookies, sessions, CSRF, rate limits, or tenant isolation - User implements OAuth2/OIDC, API key validation, JWT verification, or mTLS

    Also in 4 projects that use this

  • botirkhaltaevSkill

    rust-unsafe-ffi

    Master unsafe Rust, FFI, and foreign function interface programming. Use when writing unsafe Rust code with raw pointers, interfacing with C/C++ libraries, creating bindings with bindgen, implementing zero-cost abstractions, working with uninitialized memory, or understanding the safety/unsafety boundary.

    Also in 3 projects that use this

  • adxptivedSkill

    rust-api-design

    Rust API Design guidelines, naming conventions, and best practices. Use when: - User is designing a library, crate, or public APIs - Implementing patterns like Builder, Typestate, or Extension traits - Designing public structures, enums, or traits - Working with common traits (From/Into, Default, AsRef, Debug, Clone) - Applying #[must_use] or #[non_exhaustive] attributes - Restricting trait implementation via Sealed Traits - Formatting naming structures and lifetime designs

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 10 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the consuming repository's instructions, owning work item and applicable RCS rules.

    line 17
  2. Distinctive:

    Establish comparable evidence: Read existing completed and failed results before scheduling work.

    line 34

“Common” is measured: kept by at least 6 in 10 of the 10 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
<!-- SPDX-FileCopyrightText: 2026 Peder Klockmann (Zevarix) --><!-- SPDX-License-Identifier: MIT OR Apache-2.0 -->

Rust performance

Investigate the user-visible operation through its complete call path. Choose the simplest change that addresses an evidenced cost and preserves the consuming project's correctness contract.

Establish the task

Read the consuming repository's instructions, owning work item and applicable RCS rules. Resolve the project's chosen RCS reference to an actual commit and read the linked documentation at that revision. Use an authorized GitHub read route or an existing checkout; report any unavailable pages. The links below locate canonical documentation rather than a bundled rulebook. Record the actual revisions inspected. Keep architecture, safety, supported platforms and merge/deployment authority with that project. An audit request authorizes investigation; it does not authorize implementation, installation or a benchmark that mutates user data.

Identify the operation, input scale, success metric and required outcomes. Separate initial work from recovery, startup from steady state, and workload time from preparation or post-run inspection.

Investigate and compare

  1. Establish comparable evidence. Read existing completed and failed results before scheduling work. Prove the executed artifact's source and optimized configuration. Select representative inputs and equivalent starting state. Read measurement before a baseline, comparison or performance claim.
  2. Locate the limiting work. Trace orchestration, workers, locks, persistence, native calls and output verification. Count expensive nested operations per item and per batch. Distinguish on-CPU work, blocked time, I/O and instrumentation overhead. Read profiling to select a platform-appropriate measurement.
  3. Form a falsifiable hypothesis. State the call path, frequency, observed cost, reuse boundary, proposed mechanism and result that would reject it. Separate confirmed costs from plausible causes. Read optimization when selecting an experiment. Identify behavior changes explicitly; a faster operation with different integrity or recovery guarantees is a different contract.
  4. Change and qualify one cause. Within authorized implementation scope, preserve required behavior and use targeted tests plus a representative whole-operation comparison. Keep builds and heavy analysis outside timed runs. Record resource and maintenance tradeoffs as well as elapsed time.

Interpret the evidence

Inclusive spans contain child work. Worker intervals and summed lock waits can overlap; they are not additive wall time or a promise of removable latency. A local benchmark improvement does not establish an application improvement. Report a single comparison as an observation with uncertainty.

Retain small, neutral and adverse observations. A proven reduction in calls, allocation or complexity can be useful even when elapsed-time evidence is noisy; label those separate findings and apply the project's retention criteria. Do not invent a speedup or declare an unmeasured target impossible.

Report

Present: artifact and workload provenance; baseline and candidate protocol; raw-result location and sample counts; absolute and relative observations; profile interpretation; correctness evidence; secondary costs; limitations; and the next experiment or retention decision.

For each proposed optimization, give the source path/symbol, evidence, expected mechanism, uncertainty and smallest experiment. Publish only sanitized summaries and redistributable examples; keep raw project data, profiles and machine details in the consuming project's approved location.

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.