shell
Skill33 starsChanged 34 days agoMITView on GitHub
Use when writing Bash scripts or command-line automation. Covers strict mode, safe quoting, argument parsing, trap-based cleanup, portability, and ShellCheck-clean scripts. Trigger on "write a bash script to", "shellcheck is complaining", "my script breaks on filenames with spaces", "works on my machine but fails in ci". Do not use for designing a full CLI tool's interface — see the cli-development skill; for pipeline structure, see the ci-cd skill.
- Deletes or force-pushes
19 other projects use a version of this.
Adopted by
Most recently taken up by
- fx/skillstheir own version, first seen Nov 8, 2026
- testdino-hq/google-styleguides-skillstheir own version, first seen Nov 8, 2026
- ryanmaclean/skillstheir own version, first seen Nov 1, 2026
- newkirkjosh/skillstheir own version, first seen Oct 25, 2026
- ArangoGutierrez/claude-toolkittheir own version, first seen Oct 15, 2026
- 0mlkrizzz655335v/claude-skills-zhtheir own version, first seen Oct 15, 2026
Used with
Projects with it also use update-cli-config, migrate-to-skills and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
PandelisZSkillupdate-cli-config
View and modify Cursor CLI configuration settings in ~/.cursor/cli-config.json. Use when the user wants to change CLI settings, configure permissions, switch approval mode, enable vim mode, toggle display options, configure sandbox, or manage any CLI preferences.
Also in 7 projects that use this
32103210Skillmigrate-to-skills
Convert 'Applied intelligently' Cursor rules (.cursor/rules/*.mdc) and slash commands (.cursor/commands/*.md) to Agent Skills format (.cursor/skills/). Use when you want to migrate rules or commands to skills, convert .mdc rules to SKILL.md format, or consolidate commands into the skills directory.
Also in 7 projects that use this
32103210Skillupdate-cursor-settings
Modify Cursor/VSCode user settings in settings.json. Use when you want to change editor settings, preferences, configuration, themes, font size, tab size, format on save, auto save, keybindings, or any settings.json values.
Also in 7 projects that use this
0mlkrizzz655335vSkillreview-bugbot
缺陷导向代码审查。用 Bugbot 子代理找 bug。
Also in 4 projects that use this
0mlkrizzz655335vSkillorigin
origin CLI 管理。安装、登录、更新、修复 origin.cursor.com 的 CLI。"disabled-environments:
Also in 3 projects that use this
Tsumugii24Skillsplit-to-prs
Split current work into small reviewable PRs. Use when the user asks to split a chat, set of changes, branch, or PR.
Also in 6 projects that use this
- +2 more from 32103210
- +2 more from 0mlkrizzz655335v
Other versions19 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 19
- zylos-ai/zylos-core★ 1.2ksame name
- blockcell-labs/blockcell★ 262same name
- last9/mithai★ 20same name
- testdino-hq/google-styleguides-skills★ 15same name
- ArangoGutierrez/claude-toolkit★ 4same name
- Cogni-AI-OU/cogni-ai-agent-skills★ 4same name
- fx/skills★ 4same name
- 0mlkrizzz655335v/claude-skills-zh★ 2same name
- ffsshhttiikk/opencode-agents-skills★ 2same name
- Goodnessmbakara/codex-skills★ 1same name
9 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository137 other files it gives its agents.
- agent-instructionsSkill
- agent-memorySkill
- hooksSkill
- plugin-developmentSkill
- skill-authoringSkill
- skill-reviewSkill
- slash-commandsSkill
- subagentsSkill
- agent-designSkill
- context-engineeringSkill
- fine-tuningSkill
- llm-cost-optimizationSkill
- llm-evaluationSkill
- llm-integrationSkill
- mcp-serverSkill
- ml-pipelineSkill
- model-selectionSkill
- prompt-engineeringSkill
- ragSkill
- structured-outputSkill
- api-designSkill
- background-jobsSkill
- cachingSkill
- djangoSkill
- event-driven-architectureSkill
- fastapiSkill
- graphqlSkill
- microservicesSkill
- nestjsSkill
- realtime-websocketsSkill
- spring-bootSkill
- competitive-analysisSkill
- lead-researchSkill
- product-analysisSkill
- resumeSkill
- user-researchSkill
- database-performanceSkill
- data-modelingSkill
- data-qualitySkill
- pandasSkill
- postgresSkill
- sparkSkill
- brand-guidelinesSkill
- generative-artSkill
- themingSkill
- ui-reviewSkill
- visual-designSkill
- architecture-decisionsSkill
- bug-fix-protocolSkill
- cli-developmentSkill
- code-reviewSkill
- debuggingSkill
- design-patternsSkill
- domain-modelingSkill
- git-workflowSkill
- legacy-modernizationSkill
- refactoringSkill
- repository-explorationSkill
- simple-designSkill
- system-designSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 15 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Write shell scripts that fail loudly instead of silently, handle paths with spaces, and clean up after themselves.
- Very specific: line 54
Use mktemp -d and remove it in a trap — never hardcode /tmp/mything.
- Very specific: line 55
Prefer [[ ]] over [ ] in Bash.
- Distinctive: line 56
Check that required commands exist up front rather than failing halfway through.
- Distinctive: line 57
When a script exceeds roughly 100 lines or needs data structures, rewrite it in Python.
“Common” is measured: kept by at least 6 in 10 of the 15 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Shell
Purpose
Write shell scripts that fail loudly instead of silently, handle paths with spaces, and clean up after themselves. Most shell bugs are one missing quote or one unchecked exit code.
When to Use
- Writing or reviewing Bash scripts.
- Building CI steps, deployment scripts, or developer tooling.
- Hardening a script that "works on my machine".
- Deciding whether a task has outgrown shell entirely.
Capabilities
- Strict mode and error handling that actually stops the script.
- Safe quoting, arrays, and
IFShandling. - Argument parsing and usage output.
- Cleanup via
trap, temp file discipline, and idempotence. - Portability between Bash, POSIX
sh, and macOS's older toolchain.
Inputs
- The script, its invocation context (CI, cron, interactive), and target shells.
- Whether it must run on macOS (BSD utilities) as well as Linux (GNU).
Outputs
- A script passing
shellcheck -xwith no warnings. - Deterministic exit codes and a usage message.
- Cleanup guaranteed on every exit path.
Workflow
- Start strict —
set -Eeuo pipefailand anIFSyou control. - Parse arguments explicitly — Validate required inputs and print usage on error.
- Quote everything — Every variable expansion is
"$var"unless you have a specific reason otherwise. - Register cleanup —
trapbefore you create the first temporary resource. - Gate — Run ShellCheck; run the script under
bash -nand, where practical, withset -xin a dry run.
Best Practices
set -ealone does not catch failures inside pipelines.pipefailis what makesa | bfail whenadoes.- Unquoted
$varsplits on whitespace and glob-expands. This is the root cause of most "it broke on a filename with a space" bugs. - Use
mktemp -dand remove it in a trap — never hardcode/tmp/mything. - Prefer
[[ ]]over[ ]in Bash; it does not word-split and supports pattern matching. - Check that required commands exist up front rather than failing halfway through.
- When a script exceeds roughly 100 lines or needs data structures, rewrite it in Python. Shell is glue, not a language for logic.
Examples
Script skeleton:
#!/usr/bin/env bash
set -Eeuo pipefail
IFS=$'\n\t'
readonly SCRIPT_NAME="${0##*/}"
usage() {
cat <<USAGE
Usage: ${SCRIPT_NAME} --source DIR --dest DIR [--dry-run]
--source DIR Directory to sync from (required)
--dest DIR Directory to sync to (required)
--dry-run Print actions without performing them
USAGE
}
die() { printf '%s: %s\n' "$SCRIPT_NAME" "$1" >&2; exit 1; }
main() {
local source="" dest="" dry_run=0
while (($# > 0)); do
case "$1" in
--source) source="${2:-}"; shift 2 ;;
--dest) dest="${2:-}"; shift 2 ;;
--dry-run) dry_run=1; shift ;;
-h|--help) usage; exit 0 ;;
*) usage >&2; die "unknown argument: $1" ;;
esac
done
[[ -n "$source" && -n "$dest" ]] || { usage >&2; die "missing required argument"; }
[[ -d "$source" ]] || die "source not a directory: $source"
command -v rsync >/dev/null || die "rsync is required but not installed"
local workdir
workdir="$(mktemp -d)"
trap 'rm -rf "$workdir"' EXIT
local -a flags=(--archive --delete)
((dry_run)) && flags+=(--dry-run)
rsync "${flags[@]}" "$source/" "$dest/"
}
main "$@"Notes
set -Epropagates theERRtrap into functions and subshells; without it, error traps silently do not fire where you expect.- macOS ships BSD
sed,date, andreadlink, which differ from GNU. If the script must run on both, either avoid them or depend oncoreutils. shellcheck -xfollows sourced files; the plain invocation does not.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

