rust-core
Comprehensive Rust development expertise covering core principles, patterns, error handling, async programming, testing, and performance optimization. Use when working on Rust projects requiring guidance on: (1) Language fundamentals (ownership, lifetimes, borrowing), (2) Architectural decisions and design patterns, (3) Web development (Axum, Actix-web, Rocket), (4) AI/LLM integration, (5) CLI/TUI applications, (6) Desktop development with Tauri, (7) Async/await and concurrency, (8) Error handling strategies, (9) Testing and benchmarking, (10) Performance optimization, (11) Logging and observability, or (12) Code reviews and best practices.
Best use case
rust-core is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Comprehensive Rust development expertise covering core principles, patterns, error handling, async programming, testing, and performance optimization. Use when working on Rust projects requiring guidance on: (1) Language fundamentals (ownership, lifetimes, borrowing), (2) Architectural decisions and design patterns, (3) Web development (Axum, Actix-web, Rocket), (4) AI/LLM integration, (5) CLI/TUI applications, (6) Desktop development with Tauri, (7) Async/await and concurrency, (8) Error handling strategies, (9) Testing and benchmarking, (10) Performance optimization, (11) Logging and observability, or (12) Code reviews and best practices.
Teams using rust-core should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/rust-core/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How rust-core Compares
| Feature / Agent | rust-core | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Comprehensive Rust development expertise covering core principles, patterns, error handling, async programming, testing, and performance optimization. Use when working on Rust projects requiring guidance on: (1) Language fundamentals (ownership, lifetimes, borrowing), (2) Architectural decisions and design patterns, (3) Web development (Axum, Actix-web, Rocket), (4) AI/LLM integration, (5) CLI/TUI applications, (6) Desktop development with Tauri, (7) Async/await and concurrency, (8) Error handling strategies, (9) Testing and benchmarking, (10) Performance optimization, (11) Logging and observability, or (12) Code reviews and best practices.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
SKILL.md Source
# Rust Core Development Comprehensive guidance for Rust development across web, CLI, desktop, AI/LLM applications, and systems programming. ## Quick Reference Guide ### By Task Type **Getting Started** - **New Project Setup**: Use `scripts/init_rust_project.sh` to scaffold a project with best practices - **Core Principles**: See [references/principles.md](references/principles.md) for ownership, borrowing, and Rust fundamentals - **Common Errors**: See [references/common-errors.md](references/common-errors.md) for solutions to frequent compiler errors **Writing Code** - **Design Patterns**: Consult [references/patterns.md](references/patterns.md) for builder, newtype, RAII, and other patterns - **Error Handling**: See [references/error-handling.md](references/error-handling.md) for Result, Option, anyhow, and thiserror - **Async Programming**: See [references/async-patterns.md](references/async-patterns.md) for Tokio, channels, and concurrency **Domain-Specific Development** - **Web APIs**: See [references/web-frameworks.md](references/web-frameworks.md) for Axum, Actix-web, and Rocket - **AI/LLM**: See [references/ai-llm.md](references/ai-llm.md) for OpenAI, Anthropic, Ollama, and RAG - **CLI Tools**: See [references/cli-tui.md](references/cli-tui.md) for Clap and Ratatui - **Desktop Apps**: See [references/desktop-tauri.md](references/desktop-tauri.md) for Tauri - **Logging**: See [references/logging-observability.md](references/logging-observability.md) for tracing and metrics **Code Quality** - **Testing**: See [references/testing.md](references/testing.md) for unit, integration, and property-based testing - **Code Review**: See [references/code-review.md](references/code-review.md) for review checklist and anti-patterns - **Performance**: See [references/performance.md](references/performance.md) for profiling and optimization **Project Management** - **Dependencies**: See [references/dependencies.md](references/dependencies.md) for Cargo.toml best practices - **Project Structure**: See [references/project-structure.md](references/project-structure.md) for modules and workspaces - **Essential Crates**: See [references/crates-core.md](references/crates-core.md) for commonly used libraries ### By Question Type | Question | Reference | |----------|-----------| | "How do I handle errors?" | [error-handling.md](references/error-handling.md) | | "Which web framework should I use?" | [web-frameworks.md](references/web-frameworks.md) | | "How do I work with async/await?" | [async-patterns.md](references/async-patterns.md) | | "How do I integrate OpenAI/Claude?" | [ai-llm.md](references/ai-llm.md) | | "How do I build a CLI?" | [cli-tui.md](references/cli-tui.md) | | "How do I create a desktop app?" | [desktop-tauri.md](references/desktop-tauri.md) | | "Why won't this compile?" | [common-errors.md](references/common-errors.md) | | "How do I improve performance?" | [performance.md](references/performance.md) | | "How do I add logging?" | [logging-observability.md](references/logging-observability.md) | | "How should I name this?" | [naming.md](references/naming.md) | | "What are best practices?" | [principles.md](references/principles.md) | | "How do I test this?" | [testing.md](references/testing.md) | ## Core Workflows ### 1. Starting a New Project 1. **Initialize Project** ```bash ./scripts/init_rust_project.sh my-project ``` 2. **Set Up Development Tools** - Configure linting: Copy `assets/configs/clippy.toml` and `assets/configs/rustfmt.toml` - Configure security: Copy `assets/configs/deny.toml` - Run audit: `./scripts/audit_dependencies.sh` 3. **Add Logging** ```bash ./scripts/setup_logging.sh ``` 4. **Choose Architecture** - **Web API**: Consult [web-frameworks.md](references/web-frameworks.md) for Axum, Actix-web, or Rocket - **CLI Tool**: See [cli-tui.md](references/cli-tui.md) for Clap - **Desktop App**: See [desktop-tauri.md](references/desktop-tauri.md) - **Library**: See [project-structure.md](references/project-structure.md) ### 2. Implementing Features 1. **Design First** - Review [principles.md](references/principles.md) for ownership and type-driven design - Check [patterns.md](references/patterns.md) for applicable design patterns - Plan error handling strategy from [error-handling.md](references/error-handling.md) 2. **Write Code** - Follow naming conventions from [naming.md](references/naming.md) - Use appropriate patterns and error handling - Add tracing/logging as you go 3. **Test** - Write unit tests (see [testing.md](references/testing.md)) - Add integration tests for public APIs - Consider property-based tests for complex logic ### 3. Code Review and Refinement 1. **Self-Review** - Run through [code-review.md](references/code-review.md) checklist - Check for common anti-patterns - Verify error handling 2. **Performance Check** - Profile if performance-critical (see [performance.md](references/performance.md)) - Benchmark changes with Criterion - Avoid premature optimization 3. **Security Audit** ```bash ./scripts/audit_dependencies.sh ``` ## Decision Guides ### Choosing a Web Framework **Use Axum when:** - Building modern REST/GraphQL APIs - Want composable middleware (Tower ecosystem) - Prefer type-driven extractors - Building microservices **Use Actix-web when:** - Need maximum performance - Building high-throughput APIs - Want mature, battle-tested framework - Familiar with actor model **Use Rocket when:** - Rapid prototyping - Want batteries-included features - Smaller team or learning Rust web - Traditional web application See [web-frameworks.md](references/web-frameworks.md) for detailed comparison and code examples. ### Error Handling Strategy **Use `anyhow` for:** - Applications (binaries) - Quick prototyping - Internal tools - When you need ergonomic error handling with context **Use `thiserror` for:** - Libraries (public APIs) - When consumers need to handle specific error cases - Type-safe error hierarchies - Production code with well-defined error types See [error-handling.md](references/error-handling.md) for patterns and examples. ### When to Use Async **Use async/await when:** - I/O-bound operations (network, file system) - Web servers handling many concurrent requests - Database connection pooling - Working with streams of data **Don't use async when:** - CPU-bound operations (use `spawn_blocking` instead) - Simple CLI tools - Performance isn't critical - Complexity isn't justified See [async-patterns.md](references/async-patterns.md) for Tokio patterns and best practices. ## Automation Scripts ### Available Scripts **`scripts/init_rust_project.sh`** Initialize a new Rust project with best practices: - Common dependencies (anyhow, thiserror, serde, tracing) - Benchmark setup with Criterion - Optimized release profile - Proper .gitignore Usage: `./scripts/init_rust_project.sh my-project [bin|lib]` **`scripts/audit_dependencies.sh`** Audit dependencies for security and licensing: - Runs cargo-audit for security vulnerabilities - Runs cargo-deny for license compliance - Shows outdated dependencies Usage: `./scripts/audit_dependencies.sh` **`scripts/setup_logging.sh`** Set up tracing-based logging: - Adds tracing dependencies - Creates logging module with JSON support - Provides initialization code Usage: `./scripts/setup_logging.sh` ## Configuration Templates ### `assets/configs/clippy.toml` Clippy linting configuration for strict code quality ### `assets/configs/rustfmt.toml` Code formatting configuration (100 char width, Unix newlines) ### `assets/configs/deny.toml` cargo-deny configuration for: - Security advisory checking - License compliance (MIT, Apache-2.0, BSD allowed) - Duplicate dependency detection - Source verification ## Reference Documentation All reference files provide in-depth guidance on specific topics: ### Core Language - **[principles.md](references/principles.md)** - Ownership, borrowing, zero-cost abstractions - **[patterns.md](references/patterns.md)** - Builder, newtype, RAII, iterator, visitor patterns - **[error-handling.md](references/error-handling.md)** - Result, Option, anyhow, thiserror - **[naming.md](references/naming.md)** - Rust naming conventions - **[common-errors.md](references/common-errors.md)** - Borrow checker, lifetime errors, solutions ### Development - **[testing.md](references/testing.md)** - Unit, integration, property-based, benchmarking - **[project-structure.md](references/project-structure.md)** - Modules, workspaces, organization - **[dependencies.md](references/dependencies.md)** - Cargo.toml, features, version management - **[performance.md](references/performance.md)** - Profiling, optimization, benchmarking - **[code-review.md](references/code-review.md)** - Review checklist, anti-patterns ### Async & Concurrency - **[async-patterns.md](references/async-patterns.md)** - Tokio, futures, streams, channels ### Domains - **[web-frameworks.md](references/web-frameworks.md)** - Axum, Actix-web, Rocket comparison - **[ai-llm.md](references/ai-llm.md)** - OpenAI, Anthropic, Ollama, RAG, function calling - **[cli-tui.md](references/cli-tui.md)** - Clap, Ratatui, terminal interfaces - **[desktop-tauri.md](references/desktop-tauri.md)** - Desktop apps, plugins, IPC - **[logging-observability.md](references/logging-observability.md)** - Tracing, metrics, OpenTelemetry ### Libraries - **[crates-core.md](references/crates-core.md)** - Essential crates (serde, tokio, anyhow, reqwest) ## When to Consult References **Load references progressively as needed:** 1. **Starting out**: Read [principles.md](references/principles.md) to understand Rust fundamentals 2. **Choosing approach**: Consult domain-specific guides ([web-frameworks.md](references/web-frameworks.md), [ai-llm.md](references/ai-llm.md), etc.) 3. **Implementing**: Reference [patterns.md](references/patterns.md) and [error-handling.md](references/error-handling.md) 4. **Debugging**: Check [common-errors.md](references/common-errors.md) 5. **Optimizing**: See [performance.md](references/performance.md) 6. **Reviewing**: Use [code-review.md](references/code-review.md) checklist Don't load all references at once—consult them as specific needs arise. ## Best Practices Summary 1. **Embrace the borrow checker** - Work with ownership, not against it 2. **Use type-driven design** - Make invalid states unrepresentable 3. **Handle errors explicitly** - Use Result and Option, avoid unwrap() 4. **Test comprehensively** - Unit tests, integration tests, property tests 5. **Profile before optimizing** - Measure, don't guess 6. **Add structured logging** - Use tracing for observability 7. **Review security** - Audit dependencies, validate inputs 8. **Follow conventions** - rustfmt, clippy, naming conventions 9. **Document public APIs** - Doc comments with examples 10. **Keep it simple** - Prefer clarity over cleverness
Related Skills
rust
Write production-quality Rust code following industry best practices and idiomatic patterns. Use for any Rust coding task including applications, libraries, refactoring, debugging, or code review — with particular expertise in cross-platform GUI development.
rust-router
CRITICAL: Use for ALL Rust questions including errors, design, and coding. HIGHEST PRIORITY for: 比较, 对比, compare, vs, versus, 区别, difference, 最佳实践, best practice, tokio vs, async-std vs, 比较 tokio, 比较 async, Triggers on: Rust, cargo, rustc, crate, Cargo.toml, 意图分析, 问题分析, 语义分析, analyze intent, question analysis, compile error, borrow error, lifetime error, ownership error, type error, trait error, value moved, cannot borrow, does not live long enough, mismatched types, not satisfied, E0382, E0597, E0277, E0308, E0499, E0502, E0596, async, await, Send, Sync, tokio, concurrency, error handling, 编译错误, compile error, 所有权, ownership, 借用, borrow, 生命周期, lifetime, 类型错误, type error, 异步, async, 并发, concurrency, 错误处理, error handling, 问题, problem, question, 怎么用, how to use, 如何, how to, 为什么, why, 什么是, what is, 帮我写, help me write, 实现, implement, 解释, explain
rust-pro
Master Rust 1.75+ with modern async patterns, advanced type system features, and production-ready systems programming.
rust-backend-advance
Production-ready Rust backend development with Axum framework and PostgreSQL. Master async patterns, tower middleware, SQLx database operations, authentication (JWT/OAuth), testing strategies, and deployment. Use when building REST APIs, microservices, or any Rust web backend with Axum.
rust-async-patterns
Master Rust async programming with Tokio, async traits, error handling, and concurrent patterns. Use when building async Rust applications, implementing concurrent systems, or debugging async code.
rust-async-pattern
高级异步模式专家。处理 Stream 实现, 零拷贝, tokio::spawn 生命周期, 插件系统调度, tonic 流式响应等问题。触发词:async, Stream, tokio::spawn, 零拷贝, 插件系统, tonic, 流式, BorrowedMessage, 异步调度
python-core
Create, write, build, debug, test, refactor, and optimize Python 3.10+ applications across all domains (data science, backend APIs, scripting, automation). Manage dependencies with uv (preferred), poetry, or pip. Implement type hints (typing module, generics, protocols), write tests with pytest (fixtures, parametrize, mocking), work with pandas DataFrames (creation, selection, groupby, merge), use dataclasses and decorators, handle errors with logging integration, and follow TDD workflows (Red-Green-Refactor). Configure virtual environments, pyproject.toml, and static analysis tools (mypy, pyright). Use when implementing Python features, fixing bugs, writing tests, managing packages, analyzing data, or building Python projects.
playwright-core
Battle-tested Playwright patterns for E2E, API, component, visual, accessibility, and security testing. Covers locators, assertions, fixtures, network mocking, auth flows, debugging, and framework recipes for React, Next.js, Vue, and Angular. TypeScript and JavaScript.
IFCore
Use when developing on the IFCore compliance checker. Covers contracts, check function conventions, issue reporting, app structure, and development patterns.
elite-rust
Rust Elite Standards (Edition 2024, Safe & Robust)
core-platform-notion-reviewer
Core Platform Team의 Notion 문서를 문서 타입(테크스펙/시스템설계/시스템소개/액션아이템/아이디어)과 17개 품질 기준에 따라 리뷰하고 개선안을 제안합니다. Notion MCP를 통해 문서 읽기/수정/검색을 수행합니다. 사용자가 Notion 문서 리뷰, 문서 품질 검사, Notion 페이지 개선 요청을 할 때 사용하세요.
core-life-ops
Core productivity workflows (daily planning, task triage, reporting) that work across any life domain. Not intended for direct use - imported by context-specific skills like covenant-marketing-ops or personal-life-ops.