Rust Optimise

🌐Community
by pproenca · vlatest · Repository

Automatically refactors Rust code to improve performance and reduce resource usage based on pproenca's expertise.

Install on your platform

We auto-selected Claude Code based on this skill’s supported platforms.

1

Run in terminal (recommended)

terminal
claude mcp add rust-optimise npx -- -y @trustedskills/rust-optimise
2

Or manually add to ~/.claude/settings.json

~/.claude/settings.json
{
  "mcpServers": {
    "rust-optimise": {
      "command": "npx",
      "args": [
        "-y",
        "@trustedskills/rust-optimise"
      ]
    }
  }
}

Requires Claude Code (claude CLI). Run claude --version to verify your install.

About This Skill

What it does

This skill provides automated refactoring suggestions and guidance to optimize Rust code for performance and reduce resource usage. It leverages a set of 42 best practices, categorized by priority (critical to low impact), covering areas like memory allocation, ownership, data structure selection, and asynchronous programming. The tool helps identify and eliminate performance bottlenecks in Rust applications.

When to use it

  • Optimizing existing Rust code for improved speed or reduced memory footprint.
  • Selecting appropriate data structures based on algorithmic complexity requirements.
  • Working with iterators efficiently to minimize unnecessary allocations.
  • Developing asynchronous code using runtimes like Tokio.
  • Reviewing code for common performance anti-patterns.

Key capabilities

  • Provides refactoring suggestions based on 42 Rust optimization rules.
  • Categorizes rules by priority (Critical, High, Medium-High, Medium, Low).
  • Covers key areas including: memory allocation, ownership & borrowing, data structure selection, iterator patterns, asynchronous programming, algorithm complexity, compile-time optimization and micro-optimizations.
  • Offers specific recommendations such as avoiding unnecessary clones, preallocating vector capacity, and using appropriate data structures (e.g., HashSet for membership tests).

Example prompts

  • "Analyze this Rust code snippet for potential performance improvements."
  • "Suggest ways to reduce memory allocations in this function."
  • "What's the best data structure to use for efficient key-value lookups?"
  • "Review this async Tokio code and identify any bottlenecks."

Tips & gotchas

  • The skill prioritizes rules based on impact, so focus on "Critical" recommendations first.
  • This is a coding assistant specifically for Rust development; it doesn't handle general development tasks or integrate with multi-cloud platforms.

Tags

🛡️

TrustedSkills Verification

Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.

Security Audits

Gen Agent Trust HubPass
SocketPass
SnykPass

Details

Version
vlatest
License
Author
pproenca
Installs
32

🌐 Community

Passed automated security scans.