.claude/skills/rust-agent-specialist/SKILL.md
# Rust Agent Specialist Workflow Apply Rust-native patterns to ccswarm codebase development. ## Overview This skill provides guidance for implementing Rust-idiomatic patterns in the ccswarm multi-agent orchestration system. ## Core Patterns ### Type-State Pattern Compile-time state validation with zero runtime cost. ```rust // State types pub struct Uninitialized; pub struct Initialized; pub struct Running; pub struct Agent<State> { inner: AgentInner, _state: PhantomData<State>,
npx skillsauth add nwiizo/ccswarm .claude/skills/rust-agent-specialistInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Apply Rust-native patterns to ccswarm codebase development.
This skill provides guidance for implementing Rust-idiomatic patterns in the ccswarm multi-agent orchestration system.
Compile-time state validation with zero runtime cost.
// State types
pub struct Uninitialized;
pub struct Initialized;
pub struct Running;
pub struct Agent<State> {
inner: AgentInner,
_state: PhantomData<State>,
}
impl Agent<Uninitialized> {
pub fn new() -> Self { /* ... */ }
pub fn initialize(self) -> Agent<Initialized> { /* ... */ }
}
impl Agent<Initialized> {
pub fn start(self) -> Agent<Running> { /* ... */ }
}
impl Agent<Running> {
pub fn execute(&self, task: Task) -> Result<Output> { /* ... */ }
}
Replace Arc<Mutex> with message-passing.
use tokio::sync::mpsc;
pub struct Orchestrator {
task_tx: mpsc::Sender<Task>,
}
pub struct Worker {
task_rx: mpsc::Receiver<Task>,
result_tx: mpsc::Sender<Result<Output>>,
}
// No shared mutable state
async fn run_worker(mut worker: Worker) {
while let Some(task) = worker.task_rx.recv().await {
let result = process_task(task).await;
let _ = worker.result_tx.send(result).await;
}
}
Each agent as an independent actor.
pub struct AgentActor {
mailbox: mpsc::Receiver<Message>,
state: AgentState,
}
impl AgentActor {
pub async fn run(mut self) {
while let Some(msg) = self.mailbox.recv().await {
match msg {
Message::Task(task) => self.handle_task(task).await,
Message::Query(q) => self.handle_query(q).await,
Message::Shutdown => break,
}
}
}
}
# Find shared state patterns
grep -r "Arc<Mutex" crates/ccswarm/src --include="*.rs"
# Find potential type-state candidates
grep -r "enum.*State\|State::" crates/ccswarm/src --include="*.rs"
cargo fmt && cargo clippy -- -D warnings && cargo test
See crates/ccswarm/src/agent/ for agent implementations.
See crates/ccswarm/src/orchestrator/ for orchestration patterns.
development
# HITL (Human-in-the-Loop) Approval Workflow Multi-step workflow for human approval integration in ccswarm agent operations. ## Overview This skill guides you through implementing and using human-in-the-loop approval mechanisms for high-risk agent operations. ## When HITL is Required ### High-Risk Operations - File deletions - Database modifications - External API calls - Configuration changes - Deployment actions ### Risk Levels | Level | Action | HITL Required | |-------|--------|-------
development
# Git Worktree Workflow Multi-step workflow for parallel development using git worktrees. ## Overview Git worktree allows working on multiple branches simultaneously. Each worktree is an independent working directory with its own branch. ## Setup Workflow ### 1. Create Feature Worktree ```bash git worktree add ../ccswarm-feature-<name> feature/<description> ``` ### 2. Create Bug Fix Worktree ```bash git worktree add ../ccswarm-bugfix-<name> hotfix/<description> ``` ### 3. Create Experimen
tools
# Deploy Workflow Multi-step workflow for deploying ccswarm releases. ## Overview This skill guides you through the complete deployment process for ccswarm releases, from building to publishing. ## Pre-Deployment Checklist ### 1. Version Update ```bash # Update version in Cargo.toml files # Root workspace # crates/ccswarm/Cargo.toml # crates/ai-session/Cargo.toml ``` ### 2. Quality Gates ```bash # Run full quality check cargo fmt --all cargo clippy --workspace -- -D warnings cargo test --w
testing
# Benchmark Runner Workflow Multi-step workflow for running performance benchmarks on ccswarm. ## Overview This skill guides you through running, analyzing, and comparing performance benchmarks for the ccswarm system. ## Benchmark Types ### 1. Microbenchmarks Fine-grained performance measurements for specific functions. ### 2. Integration Benchmarks End-to-end performance for complete workflows. ### 3. Load Testing System behavior under sustained load. ## Running Benchmarks ### 1. Setup