Install
$ agentstack add skill-lugassawan-swe-workbench-language-bash ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Bash
Strict mode
set -euo pipefail
IFS=$'\n\t'
-eis suppressed in conditional contexts (||,&&,if,!); explicit subshells(...)do inherit it — use|| trueto absorb expected failures.-utreats unset variables as errors; unset arrays trigger it: declare before use (arr=()) or guard with${arr[@]+"${arr[@]}"}for optional arrays.IFS=$'\n\t'prevents accidental word-splitting on spaces inforloops and command substitution.
Quoting and tests
- Always
"$var"— bare$vartriggers word splitting and glob expansion. 'literal'for fixed strings with no expansion needed.- Prefer
[[ ]]over[ ]: supports=~regex, no word splitting, lexical string comparison. $()over backticks: nestable, readable, no escaping required.
if [[ "$filename" =~ \.(sh|bash)$ ]]; then
shellcheck "$filename"
fi
Parameter expansion
${var:-default}— substitute default if unset or empty.${var:?error msg}— abort with message if unset; pairs well withset -u.${var%suffix}— strip shortest suffix match (e.g. strip extension).${var//pattern/repl}— replace all occurrences in-place.
Arrays and word splitting
files=(src/a.sh "src/b script.sh" src/c.sh)
for f in "${files[@]}"; do # each element quoted separately
process "$f"
done
"${arr[@]}"— each element as a separate quoted word; always use for iteration."${arr[*]}"— all elements joined byIFS[0]; use only for joining to a string.- Never
for x in $(cmd)— usemapfile -t arr /dev/nullsuppresses stderr noise separately. - Background jobs:
proc &; alwayswait "$pid"before consuming results. - Redirect ordering matters:
cmd >/dev/null 2>&1silences all;cmd 2>&1 >/dev/nullsilences stdout only (stderr still shows — order determines what2>&1copies).
Cleanup with trap
tmp=$(mktemp)
trap 'rm -f "$tmp"' EXIT
trap 'echo "interrupted" >&2; exit 130' INT TERM
- Register
trapearly — after state the handler depends on exists, before risky operations. trap '...' ERRfires only on non-zero exit codes; use for diagnostic logging (cannot prevent-efrom exiting).- Signal names:
EXIT(always),ERR(errors),INT(Ctrl-C),TERM(kill). - Alternative: idempotent scripts that are safe to re-run don't need cleanup traps — see §Idempotency.
Idempotency and resumability
COMMITTED=0
[[ -f .committed ]] && COMMITTED=1
if (( COMMITTED == 0 )); then
git commit -m "$msg"
touch .committed
fi
- Check-before-act:
[[ -f sentinel ]] || create_it. - Detect external state via read-only queries:
git ls-remote,gh pr view --json state. - Atomic file rewrites:
tmp=$(mktemp) && generate > "$tmp" && mv "$tmp" target. - Integer flags (
STEP_DONE=0/1) let downstream branches re-enter safely after interruption.
Heredocs
# Literal — no variable expansion:
sql=$(cat &2; exit 1; }; }
- Mock external commands by prepending a temp dir containing stub scripts to
PATH. - eval/cwd trap: when testing
eval "$(script 2>&1)"patterns, capture the script output FIRST from a valid cwd, THENcdto the eval directory, THEN eval.$(...)launches a subshell that inherits the cwd at expansion time —cd eval_cwd && eval "$(script)"means the script runs FROMeval_cwd, not the original directory, and may exit early.
# Wrong — script inherits eval_cwd as cwd, may exit early if it's not a git repo:
cd "$eval_cwd" && eval "$(bash script.sh arg 2>&1)"
# Correct — capture first, then move, then eval:
output="$(bash script.sh arg 2>&1)"; cd "$eval_cwd"; eval "$output"
Under set -e, use output=$(…) || handle_error — $? is unreachable because the parent script aborts at the failed assignment before the next line executes. The || forms a conditional context that suppresses set -e and runs the handler on non-zero exit.
Avoid
- Backtick substitution `
cmd— use$(cmd)`. - Unquoted
$varand$@— always quote. for f in $(ls)orfor f in $(find ...)— use globs ormapfile.- Parsing
lsoutput for filenames — usefindor shell globs. evalon user-controlled or external input — command injection risk.cd dir && cmdwithout a subshell — ifcmdfails, subsequent code runs from the wrong directory; use(cd dir && cmd)to scope the change.cat file | grep(UUOC) — usegrep pattern file.set -xin production — usePS4with a debug flag and enable only in targeted blocks.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: lugassawan
- Source: lugassawan/swe-workbench
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.