Coding
PromptBeginner5 minmarkdown
Markdown Converter
Agent skill for markdown-converter
21
- Always check cyclomatic complexity < 25
Sign in to like and favorite skills
Check with cargo clippy after adding a new feature and fix clippy errors with the following settings:
[lints.clippy] # Enable cognitive complexity lint to catch overly complex functions cognitive_complexity = "warn" pedantic = { level = "deny", priority = -1 } nursery = { level = "deny", priority = -1 } unwrap_used = "deny"
Additional settings in
clippy.toml:
cognitive-complexity-threshold = 25too-many-lines-threshold = 150Before completing any task, ensure all of the following pass:
cargo fmt --all (must produce no changes)cargo clippy --all-targets --all-features -- -D warnings (must be clean)cargo check (must compile successfully)cargo test -- --test-threads=1 (all tests must pass)For all new code (functions, methods, structs, enums):
/// What: Brief description of what the function does. /// /// Inputs: /// - `param1`: Description of parameter 1 /// - `param2`: Description of parameter 2 /// /// Output: /// - Description of return value or side effects /// /// Details: /// - Additional context, edge cases, or important notes pub fn example_function(param1: Type1, param2: Type2) -> Result<Type3> { // implementation }
For bug fixes:
For new features:
Test guidelines:
--dry-run in tests that would modify the system--test-threads=1 to avoid race conditionsResult types. Never use unwrap() or expect() in non-test code.tracing for diagnostics. Avoid noisy logs at info level.--dry-run flag--dry-run flag firstpacman/paru/yay are unavailableIf you add or change config keys:
config/settings.conf, config/theme.conf, or config/keybinds.conf examplesdev/PR/ directory.github/PULL_REQUEST_TEMPLATE.md as the template when creating new PR filesdev/PR/ for the current branch, create one based on the templatePR_<branch-name>.md or PR_<description>.md--dry-run flag