一键导入
bash
Style guide for writing bash scripts matching the user's personal conventions. Use when writing, reviewing, or modifying bash/shell scripts.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Style guide for writing bash scripts matching the user's personal conventions. Use when writing, reviewing, or modifying bash/shell scripts.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, passive voice, negative parallelisms, and filler phrases.
Style guide for writing Python code matching the user's personal conventions. Use when writing, reviewing, or modifying Python scripts and modules.
A test data pattern for Kotlin/Java that uses an Object Mother class with an inner Builder to produce readable, flexible, and consistent test fixtures. Use when writing or refactoring tests that need domain objects.
| name | bash |
| description | Style guide for writing bash scripts matching the user's personal conventions. Use when writing, reviewing, or modifying bash/shell scripts. |
Write bash scripts following these conventions:
#!/usr/bin/env bash (always use env, never direct paths)set -eu -o pipefail at the top of every non-trivial scriptlowercase_snake (e.g., tmpfile, file1, response)UPPER_CASE (e.g., MITMWRAP_HOST)0/1 integers (e.g., proxychains=0)(( )), in an if or && or || when suitablelocal inside functions when writing a "library" or a script which is sourced"$var", "${arr[@]}"${var##prefix}, ${var%%suffix}, ${var:-default}<<<"$var" over echo "$var" | cmd"$(...)" for command substitution, never backticksread -r a b c < <(<<<"$json" jq -re '[...] | @tsv')while/case loops over "$@", not getoptsshift || true"${1:-}" or "${1-default}"cmd=(command); cmd+=(--flag); "${cmd[@]}"-- as argument terminator where appropriate(cd && pwd)cd "$(dirname "$0")" or append ../ when needed to move out of a bin/ directory
"$(dirname "$(readlink -f "$0")")"[[ ]] over [ ](( )) for arithmetic conditions (e.g., (( $# )) to check for args)[[ "$str" =~ ^pattern$ ]]case extensively over if for a single variable. Handle bad cases with *), write to stderr and exit/return appropriatelyname() { ... } (no function keyword)main "$@" at end of script when using main-function patternmktemp to make temp files or temp dirstrap 'rm -- "$tmpfile"' EXITtrap 'code="$?"; rm -f -- "$file"; exit "$code"' EXITecho "..." >&2jq everywhere for JSON - use -nce for making JSON (never do inline), and do -re for reading valuessed, cut, grep over awk unless performance is needed, and awk is trivialjq, sed, awk, cut, grep)command -v tool &>/dev/nullpython3 -c $'...' for inline snippetsdate for dates if possible[ -t 0 ] to support piped inputpretty (~/bin/pretty) or column, or conditionally format for TTY:
if [ -t 1 ]; then command; else cat; fi1set -e handle most failures implicitly - no need to validate every single condition in a script, only do so if its absolutely necessary for UX