.forge/skills/cli-design/SKILL.md
# CLI Design Follow these conventions for CLI commands and user interaction: ## Command Structure - Use clap with derive macros for argument parsing - Organize commands as subcommands where logical - Provide both short and long flags for common options - Include helpful examples in help text ## User Feedback - Print progress information during long operations - Use clear, action-oriented language ("Creating...", "Loading...") - Show success/failure status clearly - Provide next steps on compl
npx skillsauth add jdsingh122918/forge .forge/skills/cli-designInstall 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.
Follow these conventions for CLI commands and user interaction:
console crate) for emphasis--force flag to skip prompts in scriptsfn cmd_example(project_dir: &Path) -> Result<()> {
println!("Performing operation...");
// Do work
let result = do_work(project_dir)?;
// Report success
println!("Operation complete: {} items processed", result.count);
println!();
println!("Next steps:");
println!(" Run 'forge next-command' to continue");
Ok(())
}
development
# Testing Strategy Apply this testing strategy for all new code: ## Test Levels 1. **Unit Tests** - Test individual functions in isolation - Located in `mod tests` at the bottom of each file - Mock external dependencies - Fast, deterministic, no I/O 2. **Integration Tests** - Test modules working together - Located in `tests/` directory - Use real dependencies where practical - May involve filesystem, database, or network 3. **End-to-End Tests** - Test complete user workflo
development
# TDD Workflow Apply Test-Driven Development when implementing new functionality. Use your judgment to determine when TDD is appropriate — it's most valuable for business logic, algorithms, and complex state management. ## When to Use TDD - New functions with defined inputs/outputs - Bug fixes (write failing test first, then fix) - Refactoring existing code (ensure tests exist first) - API endpoints and data transformations ## When TDD May Not Apply - Configuration files, constants, types/i
tools
# Secure Coding Follow these secure coding practices for all code in this project. ## Input Validation - Validate all external input (user input, API responses, file contents) - Use allowlists over denylists when validating - Sanitize data before use in SQL, shell commands, or HTML output - Validate early, at system boundaries (CLI args, file reads, network responses) ## Rust-Specific Security - Minimize `unsafe` blocks; document safety invariants when used - Use established crypto librarie
tools
# Rust Conventions Follow these Rust conventions for all code in this project: ## Code Style - Use `rustfmt` defaults for formatting - Run `cargo clippy` and address all warnings before committing - Prefer `?` operator for error propagation over `.unwrap()` in library code - Use `.expect("meaningful message")` only when failure indicates a bug ## Error Handling - Use `anyhow::Result` for application code and CLI - Use `thiserror` for library errors that callers need to match on - Provide cont