rust-refactor-helper
π―Skillfrom zhanghandong/rust-skills
Helps developers systematically refactor Rust code by analyzing ownership, borrowing, and architectural patterns, providing intelligent, context-aware recommendations for code restructuring that re...
Installation
npx skills add https://github.com/zhanghandong/rust-skills --skill rust-refactor-helperSkill Details
Overview
# Rust Skills
[δΈζ](./README-zh.md) | [ζ₯ζ¬θͺ](./README-ja.md)
> AI-powered Rust development assistant with meta-cognition framework
[](https://github.com/ZhangHanDong/rust-skills/releases)
[](https://opensource.org/licenses/MIT)
[](https://github.com/anthropics/claude-code)
What is Rust Skills?
Rust Skills is a Claude Code plugin that transforms how AI assists with Rust development. Instead of giving surface-level answers, it traces through cognitive layers to provide domain-correct architectural solutions.
The Problem
Traditional AI assistance for Rust:
```
User: "My trading system reports E0382"
AI: "Use .clone()" β Surface fix, ignores domain constraints
```
The Solution
Rust Skills with meta-cognition:
```
User: "My trading system reports E0382"
AI (with Rust Skills):
βββ Layer 1: E0382 = ownership error β Why is this data needed?
β β
βββ Layer 3: Trade records are immutable audit data β Should share, not copy
β β
βββ Layer 2: Use Arc
β β
βββ Recommendation: Redesign as Arc
```
Features
- Meta-Cognition Framework: Three-layer cognitive model (Domain β Design β Mechanics)
- Real-time Information: Fetch latest Rust versions and crate info via background agents
- Dynamic Skills: Auto-generate skills from your Cargo.toml dependencies
- Domain Extensions: FinTech, ML, Cloud-Native, IoT, Embedded, Web, CLI support
- Coding Guidelines: Complete Rust coding conventions and best practices
Installation
Method 1: Marketplace (Recommended)
Install from Claude Code Plugin Marketplace in two steps:
```bash
# Step 1: Add the marketplace
/plugin marketplace add ZhangHanDong/rust-skills
# Step 2: Install the plugin
/plugin install rust-skills@rust-skills
```
> Note: Step 1 only adds the marketplace (plugin source). Step 2 actually installs the rust-skills plugin with all features enabled.
Method 2: NPX
Install using npx:
```bash
npx skills add ZhangHanDong/rust-skills
```
> β οΈ Note: NPX installs skills only. Rust-skills is a plugin architecture that relies on agents, commands, and hooks for full functionality. For the complete experience, use Method 1 (Marketplace) or Method 3 (Full Plugin).
Method 3: Full Plugin
This method enables all features including hooks for automatic meta-cognition triggering.
```bash
# Clone the repository
git clone https://github.com/ZhangHanDong/rust-skills.git
# Launch with plugin directory
claude --plugin-dir /path/to/rust-skills
```
Method 4: Skills Only
This method only installs skills without hooks. You need to manually invoke skills.
```bash
# Clone and copy skills
git clone https://github.com/ZhangHanDong/rust-skills.git
cp -r rust-skills/skills/* ~/.claude/skills/
```
> β οΈ Note: Without hooks, meta-cognition won't trigger automatically. You must manually call /rust-router or specific skills.
Feature Comparison
| Feature | Marketplace | NPX | Full Plugin | Skills Only |
|---------|-------------|-----|-------------|-------------|
| All 31 Skills | β | β | β | β |
| Auto meta-cognition trigger | β | β | β | β |
| Hook-based routing | β | β | β | β |
| Background agents | β | β | β | β |
| Easy updates | β | β | β | β |
Permission Configuration
Background agents require permission to run agent-browser. Configure in your project:
```bash
# Copy example config
cp /path/to/rust-skills/.claude/settings.example.json .claude/settings.local.json
```
Or create manually:
```bash
mkdir -p .claude
cat > .claude/settings.local.json << 'EOF'
{
"permissions": {
"allow": [
"Bash(agent-browser *)"
]
}
}
EOF
```
See [.claude/settings.example.json](.claude/settings.example.json) for reference.
Other Platfor
More from this repository10
Provides comprehensive Rust coding best practices and style guidelines, offering automated recommendations for maintaining clean, idiomatic, and performant Rust code across different project domains.
Provides advanced concurrency pattern analysis and generation for Rust projects, helping developers design thread-safe and performant concurrent systems using Rust's ownership and threading primiti...
Guides developers in applying Rust's type system to drive design decisions, ensuring type-level constraints and architectural integrity during software development.
Guides developers through resolving Rust ownership errors by analyzing data usage patterns and recommending appropriate ownership strategies like Arc<T> or shared references.
Analyzes Rust code to identify and optimize zero-cost abstractions, ensuring performance-critical code maintains compile-time efficiency without runtime overhead.
Manages Rust resource allocation and ownership strategies, providing intelligent recommendations for handling memory resources and ownership patterns in Rust projects.
Manages and analyzes Rust object lifecycle patterns, providing insights into ownership, borrowing, and memory management strategies for complex Rust data structures.
Based on the README's description of the Rust Skills project's meta-cognitive approach and domain-specific problem-solving, the "m09-domain" skill likely: Analyzes domain-specific architectural co...
Based on the README, the "rust-learner" skill within the Rust Skills project likely: Guides Rust developers through learning Rust programming by providing contextual, multi-layered cognitive assis...
Generates web application architecture recommendations and Rust web development best practices, focusing on domain-specific web service design patterns and framework integration.