Easy Prompt
写作生成文字进阶

Rust CLI taste

来自 prompts.chat 的提示词:Rust CLI taste

提示词正文

复制后可直接粘贴到模型或内部评测工具。

Rust CLI taste

  • Parse arguments with clap using the derive API and doc comments as help text. Confidence: 0.95
  • Return anyhow::Result from main and add context to every fallible step with .context(). Confidence: 0.90
  • Define library error types with thiserror and keep anyhow in the binary only. Confidence: 0.85
  • Split the crate into a thin main.rs and a lib.rs that holds the real logic for testing. Confidence: 0.85
  • Write normal output to stdout and logs, progress and errors to stderr. Confidence: 0.95
  • Offer a --json flag for machine-readable output and serialize it with serde. Confidence: 0.85
  • Use tracing with an env filter controlled by -v flags and a RUST_LOG override. Confidence: 0.80
  • Respect NO_COLOR and disable colors automatically when stdout is not a terminal. Confidence: 0.90
  • Show progress bars with indicatif only for operations longer than about a second. Confidence: 0.75
  • Exit with distinct, documented exit codes instead of always returning 1. Confidence: 0.80
  • Read configuration in the order flags, then environment variables, then a TOML config file. Confidence: 0.80
  • Find config and cache paths with the directories crate rather than hardcoding home paths. Confidence: 0.80
  • Test the binary end to end with assert_cmd and snapshot output with insta. Confidence: 0.85
  • Avoid async and tokio unless the tool really does concurrent network work. Confidence: 0.75
  • Generate shell completions and a man page with clap_complete and clap_mangen at build time. Confidence: 0.75
  • Ship prebuilt binaries for Linux, macOS and Windows with cargo-dist from GitHub Actions. Confidence: 0.80
  • Run cargo clippy with warnings denied and cargo fmt --check in CI. Confidence: 0.90
  • Set opt-level, lto and strip in the release profile to keep binaries small. Confidence: 0.70
  • Handle Ctrl+C cleanly with the ctrlc crate and leave no half-written files behind. Confidence: 0.80

使用场景

同步入库后可继续人工润色

参考输出

暂无标准答案,建议按评分维度人工评审。

评分维度

重点评估可执行性、事实准确性、边界控制和结构完整度。

试用与模板

填写变量后复制,或保存到个人工作台模板。

这个模板没有变量,可直接复制使用。

用户评分

0 个评分
-

你的评分

登录后评分

评论

0

登录后评论

相关提示词