agentleFS
claude-worldclaude-world/claude-agent/.claude/skills/security-audit/SKILL.md

security-audit

Skill4 starsChanged 9 months agoMITView on GitHub

Audit host security using built-in system tools (netstat, lsof, ss, ufw, systemctl, ps, who, last). Check open ports, running services, listening processes, firewall rules, and recent logins. No external CLI needed. Use when user says "security audit", "check open ports", "harden server", or "what's listening on my machine".

140 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use asset-spec, create-control-manifest and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • cenconq25Skill

    asset-spec

    Generates per-asset visual specifications and AI-generation prompts from PRDs and the design bible. Produces structured spec files and updates a master asset manifest. Use after design bible is approved and a UX spec or PRD identifies assets to produce. Output: design/assets/<asset>.md plus design/assets/manifest.md.

    Also in 5 projects that use this

  • cenconq25Skill

    create-control-manifest

    Produces a flat, immediately-actionable rules sheet — do this, never do that, per system and per layer — extracted from accepted ADRs, technical preferences, and framework reference docs. More directly usable than ADRs for day-to-day implementation. Run after /architecture-review passes.

    Also in 5 projects that use this

  • +10 more from cenconq25

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 118 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    No install needed. All tools are standard on macOS and Linux.

    line 30
  2. Very specific:

    Always run commands as current user.

    line 125
  3. Distinctive:

    Never modify firewall rules or kill processes without explicit user confirmation

    line 126
  4. Distinctive:

    Keep final report concise: executive summary + categorized findings + recommended actions

    line 132

“Common” is measured: kept by at least 6 in 10 of the 118 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Security Audit

Audit host security using built-in system tools. No external tools required — uses netstat, lsof, ss, ufw/iptables, systemctl, ps, who, and last.

Prerequisites

No install needed. All tools are standard on macOS and Linux.

For Linux firewall checks, ufw or iptables must be available. On macOS, pf is used.

Commands

Open Ports & Listening Processes

# All listening ports with process names (Linux)
ss -tlnp

# All listening ports (macOS / fallback)
netstat -an | grep LISTEN

# Identify which process owns each port
lsof -i -P -n | grep LISTEN

Running Services (Linux)

# List all active systemd services
systemctl list-units --type=service --state=running

# Check a specific service status
systemctl status sshd

Firewall Rules

# UFW status (Linux/Ubuntu)
sudo ufw status verbose

# iptables rules (Linux)
sudo iptables -L -n -v

# macOS pf status
sudo pfctl -s rules

Active Logins & Recent Access

# Currently logged-in users
who

# Recent login history
last -20

# Failed login attempts (Linux)
sudo grep "Failed password" /var/log/auth.log | tail -20

# Failed login attempts (macOS)
log show --predicate 'eventMessage contains "Failed password"' --last 1h

Running Processes

# All processes sorted by CPU
ps aux --sort=-%cpu | head -20

# Check for unusual processes (macOS)
ps aux | grep -v grep | awk '{print $1,$11}' | sort -u

File Permissions & SUID Binaries (Linux)

# Find SUID binaries
find / -perm /4000 -type f 2>/dev/null

# World-writable directories
find /tmp /var /etc -perm -o+w -type d 2>/dev/null

Usage Examples

Full security snapshot:

echo "=== LISTENING PORTS ===" && lsof -i -P -n | grep LISTEN
echo "=== ACTIVE LOGINS ===" && who
echo "=== RECENT LOGINS ===" && last -10
echo "=== RUNNING SERVICES ===" && (systemctl list-units --type=service --state=running 2>/dev/null || echo "systemctl not available")

Quick port exposure check:

lsof -i -P -n | grep LISTEN | awk '{print $1, $9}' | sort -u

Rules

  • Always run commands as current user; if sudo is needed, note it but don't auto-run
  • Never modify firewall rules or kill processes without explicit user confirmation
  • Summarize findings into risk levels: Critical / High / Medium / Low / Info
  • Save full audit output to workspace/security-audit-<date>.md
  • Flag any port listening on 0.0.0.0 or :: (all interfaces) as higher risk than localhost-only
  • Highlight: unexpected listening ports, unknown processes, recent failed logins, world-writable dirs
  • macOS vs Linux: detect with uname -s and use appropriate commands
  • Keep final report concise: executive summary + categorized findings + recommended actions

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.