一键导入
rust
Rust development guidance. Covers project setup, testing, clippy, rustfmt, and CI/CD patterns. Use when creating, modifying, or debugging Rust code.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Rust development guidance. Covers project setup, testing, clippy, rustfmt, and CI/CD patterns. Use when creating, modifying, or debugging Rust code.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Git conventions — conventional commits, semantic versioning, branch naming, tagging, changelogs, and release workflow. Use when committing, branching, tagging, or managing releases.
Python development guidance. Covers project setup (pyproject.toml, src/ layout), testing (pytest), linting (ruff), type checking (mypy), packaging, venv management, and CI/CD patterns. Use when creating, modifying, or debugging Python code.
Unified visual style guide. Defines the Alpharius color system, typography, spacing, and semantic palette shared across pi TUI theme, Excalidraw diagrams, D2 diagrams, and generated images. Use when creating any visual output to ensure consistency.
TypeScript development conventions. Covers strict typing, async patterns, error handling, Node.js API usage, and testing with node:test.
OpenSpec lifecycle for spec-driven development. Use when proposing changes, writing Given/When/Then specs, generating tasks, verifying implementations, or archiving completed changes. Commands /opsx:propose, /opsx:spec, /opsx:ff, /opsx:status, /opsx:verify, /opsx:archive.
Security checklist for code review and implementation. Covers input escaping, injection prevention, path traversal, process safety, dependency integrity, and secrets management. Load when working on user-facing code, template rendering, or process spawning.
| name | rust |
| description | Rust development guidance. Covers project setup, testing, clippy, rustfmt, and CI/CD patterns. Use when creating, modifying, or debugging Rust code. |
Conventions for Rust development, with a dedicated section for Zellij WASM plugin development.
rustup default stable)Cargo.toml otherwise<project>/
├── Cargo.toml # Package metadata, deps, lint config
├── rustfmt.toml # max_width = 100
├── src/
│ ├── lib.rs # Library root (or main.rs for binary)
│ └── ...
├── tests/
│ └── integration_test.rs
└── .github/workflows/ci.yml
cargo clippy # Lint
cargo clippy -- -D warnings # Warnings as errors (CI)
cargo clippy --all-targets # Include tests/benches
cargo clippy --fix # Auto-fix
Project config in Cargo.toml:
[lints.clippy]
pedantic = { level = "warn", priority = -1 }
unwrap_used = "warn"
cargo fmt # Format
cargo fmt -- --check # Check only (CI)
cargo build # Debug build
cargo build --release # Release build
cargo test # All tests
cargo test -- --nocapture # Show println output
cargo test test_name # Specific test
cargo test --lib # Unit tests only
cargo test --test integration_test # Specific integration test
cargo doc --open # Generate and browse docs
cargo audit # Security vulnerability check
cargo tree # Dependency tree
cargo expand # Macro expansion
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_parse_valid() {
let result = parse("input");
assert_eq!(result, expected);
}
}
#[tokio::test]
async fn test_async_op() {
let result = fetch_data().await;
assert!(result.is_ok());
}
| Context | Pattern |
|---|---|
| Libraries | thiserror::Error derive for custom error types |
| Applications | anyhow::Result for ergonomic error propagation |
| Unwrap | Never in library code; expect("reason") in main/tests only |
| Crate | Purpose |
|---|---|
serde + serde_json | Serialization |
tokio | Async runtime |
anyhow / thiserror | Error handling |
clap | CLI parsing |
tracing | Structured logging |
name: CI
on: [push, pull_request]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo fmt -- --check
- run: cargo clippy -- -D warnings
- run: cargo test