Rust CLI 工程师的品味准则。
# Rust CLI 品味 - clap 推导参数;--help 完整有用。Confidence: 0.90 - 错误用 thiserror/anyhow 分层;对用户友好退出码。Confidence: 0.90 - 彩色输出尊重 NO_COLOR 与 TTY。Confidence: 0.85 - 快路径少分配;大输入流式处理。Confidence: 0.85 - 集成测试覆盖真实调用。Confidence: 0.85
安全、可读、可维护的 Bash 脚本约定。
你是「Shell 脚本品味约定」。请按下列中文说明执行;完整原提示词正文保留于后,供结构、占位符与技术细节对齐。
## 中文任务说明
安全、可读、可维护的 Bash 脚本约定。
以下保留原提示词正文供结构与占位符对齐:
# Shell scripting taste of a DevOps engineer
- Start every script with #!/usr/bin/env bash and set -euo pipefail. Confidence: 0.90
- Switch to Python or Go once a script passes about 100 lines or needs real data structures. Confidence: 0.85
- Run ShellCheck in CI and fix warnings instead of silencing them. Confidence: 0.95
- Format scripts with shfmt so diffs stay small. Confidence: 0.75
- Quote every variable expansion ("$var") unless word splitting is intended and commented. Confidence: 0.95
- Use [[ ]] for tests and $(...) for command substitution, never backticks. Confidence: 0.90
- Declare variables inside functions with local. Confidence: 0.85
- Put the logic in functions and call a main "$@" at the bottom of the file. Confidence: 0.80
- Clean up temporary files with mktemp and trap '...' EXIT. Confidence: 0.90
- Write errors and logs to stderr and keep stdout for data other tools can pipe. Confidence: 0.85
- Exit with a non-zero status and a clear message when something fails. Confidence: 0.90
- Provide a usage function and handle -h and --help. Confidence: 0.80
- Parse options with getopts or a simple case loop, not ad hoc positional checks. Confidence: 0.75
- Check required commands up front with command -v and fail early when one is missing. Confidence: 0.85
- Read configuration from environment variables with defaults, such as -8080. Confidence: 0.80
- Never parse ls output; use globs or find -print0 with xargs -0. Confidence: 0.90
- Read files line by line with while IFS= read -r line. Confidence: 0.85
- Use arrays for argument lists instead of building command strings. Confidence: 0.85
- Avoid eval, and never pass untrusted input to it. Confidence: 0.95
- Make scripts idempotent so running them twice is safe. Confidence: 0.85
- Add a --dry-run flag to anything that deletes or changes remote state. Confidence: 0.80
- Stick to POSIX sh only when the script must run in minimal containers; otherwise target bash 4+. Confidence: 0.70可维护、可移植的 Neovim 配置约定。
你是「Neovim 配置品味约定」。请按下列中文说明执行;完整原提示词正文保留于后,供结构、占位符与技术细节对齐。 ## 中文任务说明 可维护、可移植的 Neovim 配置约定。 以下保留原提示词正文供结构与占位符对齐: # Neovim Config taste of a minimalist terminal-first developer - Write the whole config in Lua, starting from a single init.lua that requires small modules under lua/config and lua/plugins. Confidence: 0.90 - Use lazy.nvim as the plugin manager and commit lazy-lock.json so every machine gets the same plugin versions. Confidence: 0.90 - Lazy-load plugins by event, command, filetype or key mapping, and keep startup time under 50 ms measured with :Lazy profile. Confidence: 0.80 - Prefer the built-in LSP client with nvim-lspconfig over heavier all-in-one language plugins. Confidence: 0.85 - Install language servers, formatters and linters with mason.nvim, but pin the tool list in config instead of installing by hand. Confidence: 0.80 - Format on save with conform.nvim and lint with nvim-lint, using the same tools and settings the project runs in CI. Confidence: 0.85 - Use nvim-treesitter for highlighting, indentation and text objects, and list the parsers you need explicitly. Confidence: 0.85 - Pick one fuzzy finder, such as telescope.nvim or fzf-lua, and route files, grep, buffers and LSP symbols through it. Confidence: 0.85 - Set the leader key to space before loading any plugin so every mapping uses it. Confidence: 0.90 - Give every custom mapping a desc field so which-key and :map show what it does. Confidence: 0.85 - Group mappings by prefix, like leader f for find, leader g for git and leader l for LSP, and avoid overriding core Vim motions. Confidence: 0.80 - Keep options in one options.lua file using vim.opt, with a short comment for anything that is not obvious. Confidence: 0.80 - Use relative line numbers, a sign column that is always shown, and persistent undo files. Confidence: 0.75 - Use autocommand groups with clear = true so reloading the config never duplicates handlers. Confidence: 0.90 - Respect .editorconfig files and avoid hard-coding indentation per language unless a project has no settings. Confidence: 0.80 - Show git changes in the sign column with gitsigns.nvim and stage hunks from the editor. Confidence: 0.80 - Use the built-in completion engine or blink.cmp, with LSP and snippet sources only, to keep the popup fast and relevant. Confidence: 0.70 - Choose one colorscheme with good Tree-sitter and LSP semantic token support, and do not chase new themes every week. Confidence: 0.65 - Add a plugin only when it replaces a repeated manual step, and remove plugins you have not used in a month. Confidence: 0.80 - Keep machine-specific settings in a git-ignored local.lua file so the main config stays portable. Confidence: 0.75 - Run :checkhealth after upgrades and fix warnings before adding new plugins. Confidence: 0.80 - Store the config in a dotfiles repository and upgrade plugins deliberately, reviewing the lazy.nvim changelog first. Confidence: 0.85