audit

audit is a skill for Claude Code, Codex from chaterm/terminal-skills. It costs 5 tokens per session (1,525 once invoked), scanned B, original, Apache-2.0.

A guide to Linux security auditing, which records selected system and user actions for investigation and compliance checks. It uses auditd, Linux's system auditing service.

In plain words
What is it for?
Installing and managing auditd, creating temporary or permanent rules, tracking changes to files such as passwords and SSH settings, searching audit logs, and generating reports.
Why use it?
It shows how to monitor sensitive files, commands, system calls, and logins instead of relying only on ordinary application logs.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Installing and managing auditd, creating temporary or permanent rules, tracking changes to files such as passwords and SSH settings, searching audit logs, and generating reports.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/chaterm/terminal-skills/audit
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 chaterm/terminal-skills --skill audit
Clone the repo
git clone --depth 1 https://github.com/chaterm/terminal-skills

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 audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/chaterm/terminal-skills/audit/github.svg)](https://agentmods.dev/skills/chaterm/terminal-skills/audit)
Your own site
<a href="https://agentmods.dev/skills/chaterm/terminal-skills/audit"><img src="https://agentmods.dev/badge/skills/chaterm/terminal-skills/audit/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 audit

Your own site · 80×15
<a href="https://agentmods.dev/skills/chaterm/terminal-skills/audit"><img src="https://agentmods.dev/badge/skills/chaterm/terminal-skills/audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 5 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,525 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00005 $0.01525
Opus 5 $0.00003 $0.00763
Sonnet 5 $0.00001 $0.00305
Haiku 4.5 $0.00001 $0.00153

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

Security

Grade B, and why

audit 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 9d 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.

# 统计 sudo 使用

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.

auditctl -w /etc/shadow -p wa -k shadow_changes

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

security/audit/SKILL.md · 250 lines

How it starts

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

安全审计

概述

安全审计、漏洞扫描、合规检查技能。

auditd 审计系统

安装与管理

# 安装
apt install auditd audispd-plugins      # Debian/Ubuntu
yum install audit                        # CentOS/RHEL

# 服务管理
systemctl start auditd
systemctl enable auditd
systemctl status auditd

审计规则

# 查看规则
auditctl -l

# 添加规则 - 监控文件
auditctl -w /etc/passwd -p wa -k passwd_changes
auditctl -w /etc/shadow -p wa -k shadow_changes
auditctl -w /etc/sudoers -p wa -k sudoers_changes

# 监控目录
auditctl -w /etc/ssh/ -p wa -k ssh_config

# 监控系统调用
auditctl -a always,exit -F arch=b64 -S execve -k command_exec

# 监控用户操作
auditctl -a always,exit -F arch=b64 -S open -F auid>=1000 -k user_file_access

永久规则

# /etc/audit/rules.d/audit.rules
-w /etc/passwd -p wa -k passwd_changes
-w /etc/shadow -p wa -k shadow_changes
-w /etc/sudoers -p wa -k sudoers_changes
-w /var/log/lastlog -p wa -k logins
-a always,exit -F arch=b64 -S execve -k commands

# 重载规则
augenrules --load

查看日志

# 搜索审计日志
ausearch -k passwd_changes
ausearch -k commands -ts today
ausearch -ua root -ts recent

# 生成报告
aureport
aureport --summary
aureport --login
aureport --file
aureport --executable

日志审计

系统日志

# 查看认证日志
tail -f /var/log/auth.log          # Debian/Ubuntu
tail -f /var/log/secure            # CentOS/RHEL

# 查看登录记录
last
lastb                               # 失败登录
lastlog

# journalctl
journalctl -u sshd
journalctl --since "1 hour ago"
journalctl -p err

日志分析

# 统计 SSH 登录失败
grep "Failed password" /var/log/auth.log | awk '{print $11}' | sort | uniq -c | sort -rn

# 统计 sudo 使用
grep "sudo:" /var/log/auth.log | tail -20

# 查找异常登录
grep "Accepted" /var/log/auth.log | grep -v "192.168"

漏洞扫描

Lynis

# 安装
apt install lynis

# 系统审计
lynis audit system

# 查看报告
cat /var/log/lynis-report.dat

OpenSCAP

# 安装
yum install openscap-scanner scap-security-guide

# 扫描
oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_standard \
    --results results.xml \
    /usr/share/xml/scap/ssg/content/ssg-centos7-ds.xml

# 生成报告
oscap xccdf generate report results.xml > report.html

Read the full file on GitHub · 250 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. 9d ago First seen · 250 lines · 5 tokens per session scan B fcd3512f6557

Subscribe to this mod's changes

audit is a skill published in the GitHub repository chaterm/terminal-skills (58 stars, last pushed 6mo ago), licensed Apache-2.0. It adds 5 tokens to every session and 1,525 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.

Related

Other skills, from other repositories

auditd

Linux Audit Framework reference. auditctl rules for file watches and syscall auditing, auditd.conf configuration, ausearch log queries, aureport summaries, audit.log format, CIS/PCI-DSS compliance rules, and audit tools.

bytesagain/ai-skills · 48 tokens

Vulnerability Scanning & Assessment

Dependency auditing, CVE detection, configuration security review, CVSS scoring, and prioritized vulnerability reporting.

Masriyan/Claude-Code-CyberSecurity-Skill · 26 tokens

GRC & Compliance

Governance, risk, and compliance — risk assessment and scoring, control mapping across NIST CSF 2.0 / ISO 27001:2022 / SOC 2 / CIS Controls v8, gap analysis, audit evidence preparation, and security policy generation.

Masriyan/Claude-Code-CyberSecurity-Skill · 58 tokens

soc2-expert

Expert in SOC 2 compliance, trust service criteria, audit preparation, controls implementation, and security frameworks. Use when the user mentions compliance, audit, trust services, AICPA, controls, or security framework, or when the task involves Trust Service Criteria, SOC 2 Types, Security Common Criteria, or…

personamanagmentlayer/pcl · 71 tokens

audit-expert

Expert-level security auditing, compliance, code review, and vulnerability assessment. Use when the user mentions compliance, security review, code review, vulnerability assessment, SOC 2, or GDPR, or when the task involves Audit Types, Audit Frameworks, Audit Process, or Authentication Review.

personamanagmentlayer/pcl · 60 tokens

cybersecurity-expert

Build comprehensive cybersecurity solutions including threat detection, incident response, vulnerability management, and security compliance monitoring. Use when the user mentions threat detection, SIEM, incident response, vulnerability management, security monitoring, or security compliance programs.

personamanagmentlayer/pcl · 50 tokens