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 hardeninggit 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/hardening)<a href="https://agentmods.dev/skills/chaterm/terminal-skills/hardening"><img src="https://agentmods.dev/badge/skills/chaterm/terminal-skills/hardening/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/hardening"><img src="https://agentmods.dev/badge/skills/chaterm/terminal-skills/hardening.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.00006 | $0.01507 |
| Opus 5 | $0.00003 | $0.00754 |
| Sonnet 5 | $0.00001 | $0.00301 |
| Haiku 4.5 | $0.00001 | $0.00151 |
Grade B, and why
hardening scanned grade B with 2 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 12d 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.
Asks for rootlowPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
chmod 600 /etc/shadow Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.
Reaches for credential filesmediumPrivilege escalation
SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.
awk -F: '($2 == "") {print $1}' /etc/shadow Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.
How it starts
The opening of the file, as written. The whole thing — 260 lines — stays where its author put it; the contents beside it link to each section on GitHub.
系统加固
概述
系统加固、基线配置、CIS 标准技能。
SSH 加固
配置优化
# /etc/ssh/sshd_config
# 禁用 root 登录
PermitRootLogin no
# 禁用密码认证
PasswordAuthentication no
PubkeyAuthentication yes
# 限制用户
AllowUsers admin deploy
AllowGroups sshusers
# 修改端口
Port 2222
# 超时设置
ClientAliveInterval 300
ClientAliveCountMax 2
# 禁用空密码
PermitEmptyPasswords no
# 协议版本
Protocol 2
# 日志级别
LogLevel VERBOSE
应用配置
# 检查配置
sshd -t
# 重启服务
systemctl restart sshd
内核参数加固
sysctl 配置
# /etc/sysctl.d/99-security.conf
# 禁用 IP 转发
net.ipv4.ip_forward = 0
# 禁用 ICMP 重定向
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
net.ipv4.conf.all.send_redirects = 0
# 启用 SYN Cookie
net.ipv4.tcp_syncookies = 1
# 忽略 ICMP 广播
net.ipv4.icmp_echo_ignore_broadcasts = 1
# 禁用源路由
net.ipv4.conf.all.accept_source_route = 0
# 启用反向路径过滤
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.rp_filter = 1
# 记录可疑包
net.ipv4.conf.all.log_martians = 1
# 禁用 IPv6(如不需要)
net.ipv6.conf.all.disable_ipv6 = 1
应用配置
sysctl -p /etc/sysctl.d/99-security.conf
用户安全
密码策略
# /etc/login.defs
PASS_MAX_DAYS 90
PASS_MIN_DAYS 7
PASS_MIN_LEN 12
PASS_WARN_AGE 14
# /etc/security/pwquality.conf
minlen = 12
dcredit = -1
ucredit = -1
ocredit = -1
lcredit = -1
账户锁定
# /etc/pam.d/common-auth (Debian)
auth required pam_tally2.so deny=5 unlock_time=900
# /etc/pam.d/system-auth (RHEL)
auth required pam_faillock.so preauth deny=5 unlock_time=900
auth required pam_faillock.so authfail deny=5 unlock_time=900
清理无用账户
# 锁定账户
usermod -L username
passwd -l username
# 禁用 shell
usermod -s /sbin/nologin username
# 查找无密码账户
awk -F: '($2 == "") {print $1}' /etc/shadow
文件权限
关键文件
# 设置权限
chmod 600 /etc/shadow
chmod 644 /etc/passwd
chmod 600 /etc/gshadow
chmod 644 /etc/group
chmod 700 /root
chmod 600 /boot/grub/grub.cfg
# 设置属性
chattr +i /etc/passwd
chattr +i /etc/shadow
查找问题文件
# 查找 SUID/SGID 文件
find / -perm /4000 -type f 2>/dev/null
find / -perm /2000 -type f 2>/dev/null
# 查找无主文件
find / -nouser -o -nogroup 2>/dev/null
# 查找全局可写文件
find / -perm -002 -type f 2>/dev/null
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.
- 12d ago First seen · 260 lines · 6 tokens per session scan B c774530d514f
hardening is a skill published in the GitHub repository chaterm/terminal-skills (59 stars, last pushed 6mo ago), licensed Apache-2.0. It adds 6 tokens to every session and 1,507 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it B with 2 findings (asks for root, reaches for credential files). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
Blue Team Defense & Hardening
System hardening, detection engineering, security baseline monitoring, patch management, defense-in-depth architecture, and security posture improvement.
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"…