Agent skill

Security Hardening

by bolivian-peru in bolivian-peru/os-moda

Continuous security posture assessment. An agent skill from bolivian-peru/os-moda.

Apache-2.0Auto-check passedSecurity

Install Security Hardening

skills CLI
$ npx skills add bolivian-peru/os-moda --skill security-hardening -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install bolivian-peru/os-moda security-hardening --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/bolivian-peru/os-moda.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/security-hardening .claude/skills/security-hardening && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
security-hardening
GitHub stars
119
Token cost
~819 tokens
SKILL.md length
173 words
Files
1
Skills in repo
17
Repo updated
First seen
Licence
Apache-2.0

At a glance

Continuous security posture assessment. An agent skill from bolivian-peru/os-moda.

  • Tasks that involve Security review
  • SKILL.md covers Security Scan Checklist, Scoring, Auto-Fix Actions (safe, always… and Approval-Required Actions, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Security Hardening is an agent skill from bolivian-peru/os-moda. Continuous security posture assessment. Scores the system, auto-fixes safe issues, proposes fixes for risky ones. Every change audited.

Its SKILL.md is about 820 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Security, covering Security review. The repository describes itself as: An operating system built for AI agents — talk to your NixOS server instead of SSH-ing in. Typed, audited tool access with atomic rollback on every change. Research-grade; run it… The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Security review

Example prompts

  • “/security-hardening”

What it can do on your machine

Read from SKILL.md and the folder at commit b8e418f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are nix).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Security Hardening loads about 819 tokens when it runs. Until then it costs about 39 tokens; SKILL.md has 173 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~39
When it runs · the whole SKILL.md, loaded when a task matches
~819

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from bolivian-peru/os-moda at commit b8e418f, republished under its Apache-2.0 licence (© bolivian-peru). 173 words, ~819 tokens.

Download SKILL.mdSave it as .claude/skills/security-hardening/SKILL.md (or your agent's skills folder).
name
security-hardening
description
Continuous security posture assessment. Scores the system, auto-fixes safe issues, proposes fixes for risky ones. Every change audited.
tools
shell_exec, system_health, journal_logs, service_status, network_info, file_read, file_write, memory_store, memory_recall, event_log
activation
auto

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
nix
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:

nix
networking.firewall.extraCommands = ''
  iptables -A INPUT -s <IP> -j DROP
'';
Close unused ports
nix
networking.firewall.allowedTCPPorts = [ 22 80 443 ];
# Remove any port that doesn't have a matching service

Approval-Required Actions

Present a clear diff and explain the security impact:

  • Switching SSH to certificate auth
  • Enabling automatic updates
  • Changing firewall rules that affect application access

Weekly Report

Generate a trending security report:

Security Report — Week of Feb 17

Score: 78/100 (↑ from 65 last week)

This week:
- Blocked 142 brute-force SSH attempts from 23 IPs
- Applied 2 NixOS security patches (OpenSSH, curl)
- Closed port 3306 (MySQL was accidentally exposed)
- 0 incidents, 0 unauthorized changes

Trend: Improving. Main gap: root SSH still enabled.

Store the report in memory for historical tracking.

© bolivian-peru, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/security-hardening of bolivian-peru/os-moda.

Open the folder on GitHubat commit b8e418f

Compare with similar skills

Security Hardening next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Security Hardening compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Security Hardening this skillbolivian-peru/os-moda119—~819Automated safety check: PassApache-2.0
Deepsec Documentation Guidevercel-labs/deepsec8.1k—~956Automated safety check: PassApache-2.0
Kubernetes Network Security Auditkubeshark/kubeshark12k—~7.3kAutomated safety check: NotesApache-2.0
Native Dependency Updatemono/SkiaSharp5.6k—~4.1kAutomated safety check: PassMIT
Semgrep Security Scantrailofbits/skills7.5k—~3.7kAutomated safety check: NotesCC-BY-SA-4.0
Skillward AuditFangcun-AI/SkillWard143—~2.9kAutomated safety check: PassCustom licence

Similar skills

  • Deepsec Documentation Guide

    vercel-labs/deepsec

    Official

    Points the agent at deepsec's own docs to answer questions about initializing, configuring, resuming, scanning with and extending the vulnerability scanner.

    8.1k GitHub stars~956 tokensUpdated 12 days ago
    SecurityAuto-check passed
  • Hunts for compromised workloads and malicious traffic in a Kubernetes cluster by sweeping network data through Kubeshark MCP, mapped to MITRE ATT&CK.

    12k GitHub stars~7.3k tokensUpdated yesterday
    SecurityAuto-check: notes
  • Update native dependencies (libpng, libexpat, zlib, libwebp, harfbuzz, freetype, libjpeg-turbo, etc.) in SkiaSharp's Skia fork.

    5.6k GitHub stars~4.1k tokensUpdated yesterday
    SecurityAuto-check passed
  • Semgrep Security Scan

    trailofbits/skills

    Official

    Detects languages, proposes rulesets for approval, then runs the approved Semgrep scan across a codebase and merges the output into one SARIF file.

    7.5k GitHub stars~3.7k tokensUpdated yesterday
    SecurityAuto-check: notes
  • Skillward Audit

    Fangcun-AI/SkillWard

    Security-audit a third-party skill bundle (folder with SKILL.md, or .zip / .tar.gz archive) before installing it, using the SkillWard cloud scanner.

    143 GitHub stars~2.9k tokensUpdated 2 mo ago
    SecurityAuto-check passed
  • Security Audit

    TheDecipherist/claude-code-mastery

    Checks a codebase for hardcoded secrets, vulnerable dependencies, weak input handling, weak authentication and unsafe transport settings before deployment or merge.

    551 GitHub stars~1.3k tokensUpdated 5 mo ago
    SecurityAuto-check: notes

More from bolivian-peru/os-moda

All 17 skills in this repo
  • App Deployer

    bolivian-peru/os-moda

    Deploy and manage user applications as managed systemd services

    119 GitHub stars~774 tokensUpdated 3 mo ago
    Auto-check passed
  • Deploy AI Agent

    bolivian-peru/os-moda

    Deploy and manage AI agent workloads with GPU checks, API key management, and health monitoring

    119 GitHub stars~1.1k tokensUpdated 3 mo ago
    Auto-check passed
  • Drift Detection

    bolivian-peru/os-moda

    Detect configuration drift — manual changes that exist outside NixOS management.

    119 GitHub stars~584 tokensUpdated 3 mo ago
    Auto-check passed
  • Flight Recorder

    bolivian-peru/os-moda

    Black box flight recorder for the server. An agent skill from bolivian-peru/os-moda.

    119 GitHub stars~624 tokensUpdated 3 mo ago
    Auto-check passed
  • Generation Timeline

    bolivian-peru/os-moda

    NixOS generation-aware debugging and time-travel. An agent skill from bolivian-peru/os-moda.

    119 GitHub stars~777 tokensUpdated 3 mo ago
    Auto-check passed
  • Morning Briefing

    bolivian-peru/os-moda

    Generate a concise daily infrastructure briefing. An agent skill from bolivian-peru/os-moda.

    119 GitHub stars~897 tokensUpdated 3 mo ago
    Auto-check passed

Categories

Questions about Security Hardening

What does Security Hardening do?

Continuous security posture assessment. An agent skill from bolivian-peru/os-moda. Security Hardening is an agent skill from bolivian-peru/os-moda. Continuous security posture assessment.

When should I use Security Hardening?

Security Hardening fits situations like: tasks that involve Security review.

How do I install Security Hardening in Claude Code?

Run `npx skills add bolivian-peru/os-moda --skill security-hardening -a claude-code`. Or copy the skill folder (skills/security-hardening in bolivian-peru/os-moda) into .claude/skills/security-hardening in your project. Claude Code loads it when a task matches its description.

How do I install Security Hardening in Codex?

Run `npx skills add bolivian-peru/os-moda --skill security-hardening -a codex`. Or copy the skill folder (skills/security-hardening in bolivian-peru/os-moda) into .agents/skills/security-hardening in your project. Codex loads it when a task matches its description.

Can I use Security Hardening in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add bolivian-peru/os-moda --skill security-hardening -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/security-hardening, .gemini/skills/security-hardening, .github/skills/security-hardening and .opencode/skills/security-hardening in your project.

What does Security Hardening need to run?

SKILL.md names no scripts, command-line tools or credentials: Security Hardening is instructions for the agent only.

Does Security Hardening access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Security Hardening safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Security Hardening use?

Security Hardening is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Security Hardening use?

About 819 tokens (SKILL.md is roughly 3.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Security Hardening?

Skills that share tags, products or a category with Security Hardening: Deepsec Documentation Guide (vercel-labs/deepsec, 8.1k stars), Kubernetes Network Security Audit (kubeshark/kubeshark, 12k stars), Native Dependency Update (mono/SkiaSharp, 5.6k stars) and Semgrep Security Scan (trailofbits/skills, 7.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Security Hardening?

bolivian-peru (a GitHub user) maintains it in bolivian-peru/os-moda, which has 119 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on June 24, 2026.

Source: bolivian-peru/os-moda on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.