security-hardening

security-hardening is a skill for Claude Code, Codex from bolivian-peru/os-moda. It costs 29 tokens per session (903 once invoked), scanned A, original, Apache-2.0.

A guide for checking and improving a computer system's security settings, with a score and an audit record for each change.

In plain words
What is it for?
It checks network ports, firewall and SSH settings, failed login attempts, updates, file permissions, system versions, special-permission files, and audit records; it can safely fix some issues and suggest others.
Why use it?
It helps identify exposed services, weak remote-login settings, missing updates, unsafe files, and incomplete records of system changes.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It checks network ports, firewall and SSH settings, failed login attempts, updates, file permissions, system versions, special-permission files, and audit records; it can safely fix some issues and suggest others.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bolivian-peru/os-moda/security-hardening
Install

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.

Any agent
npx skills add bolivian-peru/os-moda --skill security-hardening
Clone the repo
git clone --depth 1 https://github.com/bolivian-peru/os-moda

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for security-hardening

README.md
[![agentmods](https://agentmods.dev/badge/skills/bolivian-peru/os-moda/security-hardening/github.svg)](https://agentmods.dev/skills/bolivian-peru/os-moda/security-hardening)
Your own site
<a href="https://agentmods.dev/skills/bolivian-peru/os-moda/security-hardening"><img src="https://agentmods.dev/badge/skills/bolivian-peru/os-moda/security-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.

agentmods 80×15 button for security-hardening

Your own site · 80×15
<a href="https://agentmods.dev/skills/bolivian-peru/os-moda/security-hardening"><img src="https://agentmods.dev/badge/skills/bolivian-peru/os-moda/security-hardening.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 903 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Tool Misuse · line 53
    Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.
    Fix: Override unsafe defaults with secure settings (verify=True, auth required, restrictive permissions). Review and harden all tool configurations.
  • medium Excessive Agency · line 69
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00029 $0.00903
Opus 5 $0.00015 $0.00451
Sonnet 5 $0.00006 $0.00181
Haiku 4.5 $0.00003 $0.00090

Measured 11d ago against content hash 4325c3d83a62, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

security-hardening scanned grade A 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- Applied 2 NixOS security patches (OpenSSH, curl)
skills/security-hardening/SKILL.md · 135 lines

How it starts

The opening of the file, as written. The whole thing — 135 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Security Hardening Skill

Continuous security scoring and automated hardening.

Security Scan Checklist

Run these checks and score each one:

Network (30 points)

shell_exec({ command: "ss -tlnp" })
  • No unnecessary ports exposed (+10)
  • PostgreSQL/Redis/etc bound to localhost only (+10)
  • Firewall enabled with explicit allowlist (+10)

SSH (25 points)

shell_exec({ command: "sshd -T 2>/dev/null | grep -E 'passwordauth|permitroot|x11forwarding|maxauthtries'" })
  • Password auth disabled (+10)
  • Root login disabled or key-only (+5)
  • X11 forwarding disabled (+5)
  • MaxAuthTries <= 3 (+5)

Failed auth attempts

journal_logs({ unit: "sshd", since: "7 days ago", priority: "warning" })
shell_exec({ command: "journalctl -u sshd --since '7 days ago' | grep -c 'Failed password'" })

System (25 points)

  • Automatic security updates enabled (+10)
  • No world-writable files in /etc (+5)
  • NixOS generations < 30 (clean system) (+5)
  • No setuid binaries outside expected set (+5)

Audit (20 points)

  • agentd ledger intact (hash chain valid) (+10)
  • All recent changes have audit entries (+10)

Scoring

Calculate: (earned_points / 100) * 100

Present as:

Security Score: 78/100

Auto-fixed (safe, no approval needed):
  ✅ Enabled fail2ban (NixOS config added)
  ✅ Set MaxAuthTries to 3
  ✅ Blocked 5 IPs with repeated failed logins

Needs your approval:
  ⚠️ Port 5432 exposed publicly — close it? (saves 10 pts)
  ⚠️ Enable automatic nixpkgs security channel

Won't touch without discussion:
  🔴 Root SSH enabled (you may need this for deploys)

Auto-Fix Actions (safe, always do these)

Enable fail2ban

services.fail2ban = {
  enable = true;
  maxretry = 3;
  bantime = "1h";
};

Block brute-force IPs

shell_exec({ command: "journalctl -u sshd --since '24h ago' | grep 'Failed' | awk '{print $(NF-3)}' | sort | uniq -c | sort -rn | head -10" })

For IPs with > 10 attempts:

networking.firewall.extraCommands = ''
  iptables -A INPUT -s <IP> -j DROP
'';

Read the full file on GitHub · 135 lines

Changes

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.

  1. 11d ago First seen · 135 lines · 29 tokens per session scan A 4325c3d83a62

Subscribe to this mod's changes

security-hardening is a skill published in the GitHub repository bolivian-peru/os-moda (117 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 29 tokens to every session and 903 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

makefile-generation

Generates Makefiles with testing, linting, formatting, and automation targets. Use when starting a project or standardizing build automation.

athola/claude-night-market · 31 tokens

workflow-setup

Configures GitHub Actions CI/CD workflows for testing, linting, and deployment. Use when setting up automation for a Python, Rust, or TypeScript project.

athola/claude-night-market · 37 tokens

analyzing-linux-kernel-rootkits

Detect kernel-level rootkits in Linux memory dumps using Volatility3 linux plugins (checksyscall, lsmod, hiddenmodules), rkhunter system scanning, and /proc vs /sys discrepancy analysis to identify hooked syscalls, hidden kernel modules, and tampered system structures.

xalgorix/xalgorix · 65 tokens

devops-expert

Expert-level DevOps practices, culture, automation, and continuous delivery. Use when the user mentions CI/CD, automation, infrastructure, or culture, or when the task involves DevOps Culture or Culture & Process.

personamanagmentlayer/pcl · 47 tokens

shell-scripting

Use this skill when writing bash or zsh scripts, parsing arguments, handling errors, or automating CLI workflows. Triggers on bash scripting, shell scripts, argument parsing, process substitution, here documents, signal trapping, exit codes, and any task requiring portable shell script development.

alibaba/anolisa · 60 tokens

agent-self-improvement

Use when monitor performance of other skills, identify bottlenecks, suggest improvements, and auto-optimize the skill portfolio. Use when monitoring performance of other skills, identify bottlenecks, suggest improvements, and.

oyi77/1ai-skills · 47 tokens