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 backup-strategygit 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/backup-strategy)<a href="https://agentmods.dev/skills/chaterm/terminal-skills/backup-strategy"><img src="https://agentmods.dev/badge/skills/chaterm/terminal-skills/backup-strategy/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/backup-strategy"><img src="https://agentmods.dev/badge/skills/chaterm/terminal-skills/backup-strategy.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.00008 | $0.01596 |
| Opus 5 | $0.00004 | $0.00798 |
| Sonnet 5 | $0.00002 | $0.00319 |
| Haiku 4.5 | $0.00001 | $0.00160 |
Grade C, and why
backup-strategy scanned grade C with 1 finding 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 11d 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
rm -rf $TEST_DIR How it starts
The opening of the file, as written. The whole thing — 232 lines — stays where its author put it; the contents beside it link to each section on GitHub.
备份策略设计
概述
3-2-1 策略、备份验证、保留策略设计技能。
3-2-1 备份策略
核心原则
3 - 至少保留 3 份数据副本
2 - 存储在 2 种不同介质上
1 - 至少 1 份异地存储
扩展 3-2-1-1-0:
3 份副本
2 种介质
1 份异地
1 份离线/不可变
0 个错误(验证通过)
实施示例
# 本地备份(副本 1)
tar -czvf /backup/local/data_$(date +%Y%m%d).tar.gz /data
# NAS 备份(副本 2,不同介质)
rsync -avz /backup/local/ nas:/backup/
# 云备份(副本 3,异地)
aws s3 sync /backup/local/ s3://backup-bucket/
备份类型
完整备份
# 每周完整备份
tar -czvf /backup/full_$(date +%Y%m%d).tar.gz /data
增量备份
# 基于时间戳
tar -czvf /backup/incr_$(date +%Y%m%d).tar.gz \
--newer-mtime="1 day ago" /data
# 基于快照文件
tar -czvf /backup/incr.tar.gz -g /backup/snapshot.snar /data
差异备份
# 基于完整备份时间
tar -czvf /backup/diff_$(date +%Y%m%d).tar.gz \
--newer-mtime="$(cat /backup/last_full_date)" /data
保留策略
GFS 策略
# Grandfather-Father-Son
# 日备份:保留 7 天
# 周备份:保留 4 周
# 月备份:保留 12 个月
# 年备份:保留 7 年
#!/bin/bash
BACKUP_DIR="/backup"
DATE=$(date +%Y%m%d)
DOW=$(date +%u) # 1-7
DOM=$(date +%d) # 01-31
# 日备份
tar -czvf ${BACKUP_DIR}/daily/backup_${DATE}.tar.gz /data
# 周备份(周日)
if [ "$DOW" -eq 7 ]; then
cp ${BACKUP_DIR}/daily/backup_${DATE}.tar.gz ${BACKUP_DIR}/weekly/
fi
# 月备份(1号)
if [ "$DOM" -eq "01" ]; then
cp ${BACKUP_DIR}/daily/backup_${DATE}.tar.gz ${BACKUP_DIR}/monthly/
fi
# 清理
find ${BACKUP_DIR}/daily -mtime +7 -delete
find ${BACKUP_DIR}/weekly -mtime +28 -delete
find ${BACKUP_DIR}/monthly -mtime +365 -delete
滚动保留
#!/bin/bash
# 保留最近 N 个备份
BACKUP_DIR="/backup"
KEEP=10
ls -1t ${BACKUP_DIR}/*.tar.gz | tail -n +$((KEEP+1)) | xargs -r rm
备份验证
完整性检查
# 校验和验证
md5sum backup.tar.gz > backup.md5
md5sum -c backup.md5
# tar 测试
tar -tzvf backup.tar.gz > /dev/null
# gzip 测试
gzip -t backup.tar.gz
恢复测试
#!/bin/bash
# 定期恢复测试
TEST_DIR="/tmp/restore_test"
mkdir -p $TEST_DIR
# 解压测试
tar -xzvf /backup/latest.tar.gz -C $TEST_DIR
# 验证文件数量
ORIG_COUNT=$(find /data -type f | wc -l)
REST_COUNT=$(find $TEST_DIR -type f | wc -l)
if [ "$ORIG_COUNT" -eq "$REST_COUNT" ]; then
echo "验证通过"
else
echo "验证失败:文件数量不匹配"
fi
rm -rf $TEST_DIR
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.
- 11d ago First seen · 232 lines · 8 tokens per session scan C 012c96471fc5
backup-strategy is a skill published in the GitHub repository chaterm/terminal-skills (59 stars, last pushed 6mo ago), licensed Apache-2.0. It adds 8 tokens to every session and 1,596 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
c-files
Sync files to Google Drive, S3, Dropbox, OneDrive, and 70+ cloud providers using rclone.
skillci-guardrails
Use this skill whenever you create, edit, or review a Claude Skill — any SKILL.md file, or the eval cases/config next to one. Most SKILL.md files today are written or edited by an agent, not typed by hand, so this closes the loop by having the agent that just wrote the skill also author it defensively and verify it…
example-skill
Writes a single changelog entry summarizing a code change, given a short description of what changed.
clean-skill
A skill with no lint issues, used as a starting point for the lint-on-type test.
skill-with-referenced-issue
Has a clean SKILL.md but an unsafe referenced script.
council
Run one request through several skills in parallel, isolated subagents, then merge their answers or judge the single best one. Use when the user invokes /council (or /council manage), or uses clear multi-skill-comparison language like "try this with a few different skills", "compare how different skills answer this"…