con un clic
complete-rust-development
// A comprehensive skill for Rust development that combines error handling, testing, and logging patterns. Demonstrates the 'includes' composition feature by merging content from multiple standalone skills.
// A comprehensive skill for Rust development that combines error handling, testing, and logging patterns. Demonstrates the 'includes' composition feature by merging content from multiple standalone skills.
Build terminal UIs with Charmbracelet (Bubble Tea, Lip Gloss, Gum). Use when: Go TUI, shell prompts/spinners, "make CLI prettier", adaptive layouts, async rendering, focus state machines, sparklines, heatmaps, kanban boards, SSH apps.
Foundation for error handling patterns. This is a base skill designed to be extended by language-specific error handling skills.
Common logging patterns and practices. This skill is designed to be included in composite skills via the 'includes' feature.
Rust-specific error handling patterns, building on the base error handling skill. Demonstrates the 'extends' composition feature.
Common testing patterns and practices. This skill is designed to be included in composite skills via the 'includes' feature.
Craft professional README.md files for GitHub open source projects. Generates hero sections, installation instructions, feature tables, and architecture diagrams. Use when creating or revising a README, documenting a CLI tool, library, or open source project, or when user asks about README structure, badges, or project documentation.
| id | rust-complete |
| name | Complete Rust Development |
| description | A comprehensive skill for Rust development that combines error handling, testing, and logging patterns. Demonstrates the 'includes' composition feature by merging content from multiple standalone skills. |
| tags | ["rust","complete","example"] |
| includes | [{"skill":"rust-error-handling","into":"rules"},{"skill":"testing-patterns","into":"checklist"},{"skill":"logging-patterns","into":"rules","prefix":"[Logging] "}] |
A comprehensive Rust development skill that combines error handling, testing, and logging patterns through composition.
This skill demonstrates the includes feature:
rust-error-handling are merged into Rulestesting-patterns is merged into Checklistlogging-patterns are merged into Rules with a prefixclippy for linting: cargo clippy -- -D warningsrustfmt: cargo fmt// Idiomatic Rust with proper error handling, logging, and tests
use anyhow::{Context, Result};
use tracing::{info, instrument};
#[instrument]
pub fn process_data(input: &str) -> Result<Output> {
info!("processing data");
let parsed = parse_input(input)
.context("failed to parse input")?;
let result = transform(parsed)
.context("transformation failed")?;
info!(output_size = result.len(), "processing complete");
Ok(result)
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_process_data_happy_path() {
let input = "valid input";
let result = process_data(input);
assert!(result.is_ok());
}
#[test]
fn test_process_data_invalid_input() {
let input = "";
let result = process_data(input);
assert!(result.is_err());
}
}
cargo clippy -- -D warningscargo fmtunsafe blocks (or they are justified and documented)