Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add chaterm/terminal-skills --skill shell-scriptinggit clone --depth 1 https://github.com/chaterm/terminal-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/chaterm/terminal-skills/shell-scripting)<a href="https://agentmods.dev/skills/chaterm/terminal-skills/shell-scripting"><img src="https://agentmods.dev/badge/skills/chaterm/terminal-skills/shell-scripting/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/chaterm/terminal-skills/shell-scripting"><img src="https://agentmods.dev/badge/skills/chaterm/terminal-skills/shell-scripting.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00013 | $0.01884 |
| Opus 5.5 | $0.00005 | $0.00754 |
| Sonnet 5.5 | $0.00003 | $0.00377 |
| Haiku 4.5 | $0.00001 | $0.00188 |
Grade A, and why
shell-scripting scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 361 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Shell 脚本编写
概述
Bash 脚本编写、调试、最佳实践等技能。
基础语法
脚本结构
#!/bin/bash
# 脚本描述
# Author: name
# Date: 2024-01-01
set -euo pipefail # 严格模式
# 变量定义
VAR="value"
readonly CONST="constant"
# 主逻辑
main() {
echo "Hello, World!"
}
main "$@"
变量
# 定义变量
name="value"
name='literal value' # 不解析变量
# 使用变量
echo $name
echo ${name}
echo "${name}_suffix"
# 默认值
${var:-default} # 未设置时使用默认值
${var:=default} # 未设置时赋值并使用
${var:+value} # 已设置时使用 value
${var:?error message} # 未设置时报错
# 字符串操作
${#var} # 长度
${var:0:5} # 子串
${var#pattern} # 删除前缀
${var%pattern} # 删除后缀
${var/old/new} # 替换
数组
# 定义数组
arr=(a b c d)
arr[0]="first"
# 访问数组
${arr[0]} # 第一个元素
${arr[@]} # 所有元素
${#arr[@]} # 数组长度
${!arr[@]} # 所有索引
# 遍历数组
for item in "${arr[@]}"; do
echo "$item"
done
流程控制
条件判断
# if 语句
if [[ condition ]]; then
commands
elif [[ condition ]]; then
commands
else
commands
fi
# 条件表达式
[[ -f file ]] # 文件存在
[[ -d dir ]] # 目录存在
[[ -z "$var" ]] # 变量为空
[[ -n "$var" ]] # 变量非空
[[ "$a" == "$b" ]] # 字符串相等
[[ "$a" != "$b" ]] # 字符串不等
[[ $a -eq $b ]] # 数字相等
[[ $a -lt $b ]] # 小于
[[ $a -gt $b ]] # 大于
# 逻辑运算
[[ cond1 && cond2 ]] # 与
[[ cond1 || cond2 ]] # 或
[[ ! cond ]] # 非
循环
# for 循环
for i in 1 2 3 4 5; do
echo $i
done
for i in {1..10}; do
echo $i
done
for ((i=0; i<10; i++)); do
echo $i
done
for file in *.txt; do
echo "$file"
done
# while 循环
while [[ condition ]]; do
commands
done
# 读取文件
while IFS= read -r line; do
echo "$line"
done < file.txt
# until 循环
until [[ condition ]]; do
commands
done
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3mo ago First seen · 361 lines · 13 tokens per session scan A 2875d42af1cf
shell-scripting is a skill published in the GitHub repository chaterm/terminal-skills (60 stars, last pushed 9mo ago), licensed Apache-2.0. It adds 13 tokens to every session and 1,884 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
shell-scripting compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| shell-scriptingchaterm/terminal-skills | Skill | 60 | 9mo ago | Apache-2.0 | A | 13 | Claude Code, Codex |
| shell-scriptingalibaba/anolisa | Skill | 688 | 14d ago | Apache-2.0 | C | 60 | Claude Code, Codex |
| bash-scriptingericrisco/rsc-harness | Skill | 709 | 3d ago | MIT | B | 82 | Claude Code, Codex |
| mainframegtwatts/mainframe | Skill | 13 | 1mo ago | MIT | A | 33 | Claude Code, Codex |
| mainframegtwatts/mainframe | Skill | 13 | 1mo ago | MIT | A | 22 | Claude Code, Codex |
| mainframegtwatts/mainframe | Skill | 13 | 1mo ago | MIT | C | 22 | Claude Code, Codex |
| completion-script-generatorcuriositech/windags-skills | Skill | 21 | 9d ago | none | B | 50 | Claude Code |