Co-Pilot
Updated a month ago

rust-skills

Aactionbook
0.5k
zhanghandong/rust-skills
82
Agent Score

πŸ’‘ Summary

Rust Skills is an AI-powered assistant that enhances Rust development through a meta-cognition framework.

🎯 Target Audience

Rust developers seeking advanced assistanceSoftware engineers in FinTech and ML domainsStudents learning Rust programmingTechnical leads overseeing Rust projectsOpen-source contributors to Rust libraries

πŸ€– AI Roast: β€œPowerful, but the setup might scare off the impatient.”

Security AnalysisMedium Risk

Risk: Medium. Review: shell/CLI command execution; outbound network access (SSRF, data egress); filesystem read/write scope and path traversal. Run with least privilege and audit before enabling in production.

Rust Skills

δΈ­ζ–‡ | ζ—₯本θͺž

AI-powered Rust development assistant with meta-cognition framework

Version License: MIT 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<TradeRecord> as shared immutable value
β”‚       ↓
└── Recommendation: Redesign as Arc<T>, not clone()

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:

# 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:

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.

# 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.

# 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:

# Copy example config cp /path/to/rust-skills/.claude/settings.example.json .claude/settings.local.json

Or create manually:

mkdir -p .claude cat > .claude/settings.local.json << 'EOF' { "permissions": { "allow": [ "Bash(agent-browser *)" ] } } EOF

See .claude/settings.example.json for reference.

Other Platforms

Dependent Skills

Rust Skills relies on these external tools for full functionality:

| Tool | Description | GitHub | |------|-------------|--------| | actionbook | MCP server for website action manuals. Used by agents to fetch structured web content (Rust releases, crate info, documentation). | actionbook/actionbook | | agent-browser | Browser automation tool for fetching real-time web data. Fallback when actionbook is unavailable. | vercel-labs/agent-browser |

Meta-Cognition Framework

Core Concept

Don't answer directly. Trace through cognitive layers first.

Layer 3: Domain Constraints (WHY)
β”œβ”€β”€ Domain rules determine design choices
└── Example: Financial systems require immutable, auditable data

Layer 2: Design Choices (WHAT)
β”œβ”€β”€ Design patterns and architectural decisions
└── Example: Use Arc<T> for shared immutable data

Layer 1: Language Mechanics (HOW)
β”œβ”€β”€ Rust language features and compiler rules
└── Example: E0382 is a symptom of ownership design issues

Routing Rules

| User Signal | Entry Layer | Trace Direction | Primary Skill | |-------------|-------------|-----------------|---------------| | E0xxx errors | Layer 1 | Trace UP ↑ | m01-m07 | | "How to design..." | Layer 2 | Bidirectional | m09-m15 | | "[Domain] app development" | Layer 3 | Trace DOWN ↓ | domain-* | | Performance issues | Layer 1β†’2 | Up then Down | m10-performance |

Skills Overview

Core Skills

  • rust-router - Master router for all Rust questions (invoked first)
  • rust-learner - Fetch latest Rust/crate version info
  • coding-guidelines - Coding conventions lookup

Layer 1: Language Mechanics (m01-m07)

| Skill | Core Question | Triggers | |-------|---------------|----------| | m01-ownership | Who should own this data? | E0382, E0597, move, borrow | | m02-resource | What ownership pattern fits? | Box, Rc, Arc, RefCell | | m03-mutability | Why does this data need to change? | mut, Cell, E0596, E0499 | | m04-zero-cost | Compile-time or runtime polymorphism? | generic, trait, E0277 | | m05-type-driven | How can types prevent invalid states? | newtype, PhantomData | | m06-error-handling | Expected failure or bug? | Result, Error, panic, ? | | m07-concurrency | CPU-bound or I/O-bound? | async, Send, Sync, thread |

Layer 2: Design Choices (m09-m15)

| Skill | Core Question | Triggers | |-------|---------------|----------| | m09-domain | What role does this concept play? | DDD, entity, value object | | m10-performance | Where's the bottleneck? | benchmark, profiling | | m11-ecosystem | Which crate fits this task? | crate selection, dependencies | | m12-lifecycle | When to create, use, cleanup? | RAII, Drop, lazy init | | m13-domain-error | Who handles this error? | retry, circuit breaker | | m14-mental-model | How to think about this correctly? | learning Rust, why | | m15-anti-pattern | Does this pattern hide design issues? | code smell, common mistakes |

Layer 3: Domain Constraints (domain-*)

| Skill | Domain | Core Constraints | |-------|--------|------------------| | domain-fintech | FinTech | Audit trail, precision, consistency | | domain-ml | Machine Learning | Memory efficiency, GPU acceleration | | domain-cloud-native | Cloud Native | 12-Factor, observability, graceful shutdown | | domain-iot | IoT | Offline-first, power management, security | | domain-web | Web Services | Stateless, latency SLA, concurrency | | domain-cli | CLI | UX, config precedence, exit codes | | domain-embedded | Embedded | No heap, no_std, real-time |

Commands

| Command | Description | |---------|-------------| | /rust-features [version] | Get Rust version features | | /crate-info <crate> | Get crate information | | /docs <crate> [item] | Get API documentation | | /sync-crate-skills | Sync skills from Cargo.toml dependencies | | /update-crate-skill <crate> | Update specific crate skill | | /clean-crate-skills | Clean local crate skills |

Dynamic Skills

Generate skills on-demand from your project dependencies:

# Enter your Rust project cd my-rust-project # Sync all dependencies /sync-crate-skills # Skills are created at ~/.claude/skills/{crate}/

Features

  • On-demand generation: Created from Cargo.toml dependencies
  • Local storage: ~/.claude/skills/
  • Version tracking: Each skill records crate version
  • Workspace support: Parses all workspace members

How It Works

User Question
     β”‚
     β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚           Hook Layer                     β”‚
β”‚  400+ keywords trigger meta-cognition    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
     β”‚
     β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚           rust-router                    β”‚
β”‚  Identify entry layer + domain           β”‚
β”‚  Decision: dual-skill loading            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
     β”‚
     β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
     β–Ό              β–Ό              β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Layer 1  β”‚  β”‚ Layer 2  β”‚  β”‚ Layer 3  β”‚
β”‚ m01-m07  β”‚  β”‚ m09-m15  β”‚  β”‚ domain-* β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
     β”‚
     β–Ό
Domain-correct architectural solution

Documentation

Contributing

Contributions are welcome! Please read our contributing guidelines before submitting PRs.

Acknowledgments

  • @pinghe - context: fork support suggestion (#4)
  • [@DoiiarX](https://github
5-Dim Analysis
Clarity8/10
Novelty9/10
Utility9/10
Completeness8/10
Maintainability7/10
Pros & Cons

Pros

  • Provides domain-specific architectural solutions
  • Utilizes a unique meta-cognition framework
  • Supports various domains like FinTech and ML
  • Real-time information fetching capabilities

Cons

  • Installation can be complex for beginners
  • Full functionality requires multiple setup steps
  • Dependency on external tools for complete features
  • May overwhelm new users with its depth

Related Skills

pytorch

S
toolCode Lib
92/ 100

β€œIt's the Swiss Army knife of deep learning, but good luck figuring out which of the 47 installation methods is the one that won't break your system.”

agno

S
toolCode Lib
90/ 100

β€œIt promises to be the Kubernetes for agents, but let's see if developers have the patience to learn yet another orchestration layer.”

nuxt-skills

S
toolCo-Pilot
90/ 100

β€œIt's essentially a well-organized cheat sheet that turns your AI assistant into a Nuxt framework parrot.”

Disclaimer: This content is sourced from GitHub open source projects for display and rating purposes only.

Copyright belongs to the original author actionbook.