audit-log – skill Bảo mật cho agent AI
Sổ nhật ký kiểm toán: dấu thời gian, người dùng, module, bản ghi, hành động, trường bị thay đổi, giá trị cũ và mới, và lý do thay đổi. Dùng cho lịch sử thay đổi và bằng chứng kiểm soát.
Cài skill audit-log bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/audit-log-5c686.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /audit-log – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/audit-log-5c686.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $audit-log – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/audit-log-5c686.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /audit-log – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/audit-log-5c686.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /audit-log – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
Audit Log
What it is: Compliance trail.
Overview
Works out the smallest useful Audit Log setup for the business in front of it, then
builds it only when asked. The default output is a short recommendation, not a
spreadsheet. Artifacts - CSV, SQL DDL, JSON Schema, Notion mapping - are produced on
request, from one field list so they cannot drift apart.
Layer: Layer 7: Protect. Fits: Scale stage. Table code: n/a.
When to Use This Skill
- audit log
- change history tracker
- activity log database
- compliance trail
Also use it when the user says "compliance trail", or describes the same process happening in a
spreadsheet, a document or someone inboxes.
Do not use it for: payroll calculation, tax filing, or legal advice. This skill produces
empty templates only - it never holds or processes real employee or customer data.
How It Works
Follow the shared execution contract. The module-specific rules below define only domain fields, decisions, calculations, and safety constraints.
Step 1 - Identify intent
Read the request and pick the intent before asking anything.
- "set up" or "build" or "create" -> the user wants artifacts; go to Step 2.
- "our process is ..." or "it is in a sheet" -> the user wants to move an existing process; capture it, then Step 2.
- "is this right" or "review" or "audit" -> the user wants a check, not a build; answer from what they share.
- "how do I ..." -> advice question; answer directly and offer the build only if it helps.
Ask only if this is the highest-value missing fact; otherwise proceed without an opener:
> Q: What do you need to be able to prove?
Step 2 - Ask only what is missing
Skip anything the user already answered, in any earlier message. Ask the rest one at a
time, and stop as soon as the remaining answers would not change the output.
- Purpose - Which decision or process? / Internal or external? / Who asks for it?
- Events - What must be recorded? / Approvals or changes? / How far back?
- Evidence - Who can read it? / Tamper evidence needed? / Retention period?
- Current process - Is anything logged now? / Email or spreadsheet? / Is it complete?
- Outcome - What do you need? / A log definition, a register or reporting?
Never invent an answer. If the user does not know, record it as unknown and carry on.
Step 3 - Hold the internal context
Hold the answers in this shape. It stays internal - it is not shown to the user unless
they ask, and it never carries a value the user did not give.
module: audit-log
intent: null # setup | advice | review | fix | build | convert | export
scale: null # Starter | Growth | Scale, only if the answer changes it
areas:
"Purpose": null
"Events": null
"Evidence": null
"Current process": null
"Outcome": null
requested_outputs: [] # csv | sql | json | notion | xlsx - requested formats only
confirmed_facts: [] # only what the user actually said
open_questions: [] # the unanswered ones, in the order worth askingStep 4 - Recommend the smallest workflow
If an artifact was requested, build it after resolving essential missing facts. Otherwise give a short recommendation and offer the relevant artifact.
Recommended approach: Define the small set of events worth keeping and record who did what and when. Depth follows the question you need to answer.
Why this one: Audit logs become useless when everything is captured. Start from the question you need to answer, then record only what answers it.
Workflow: Event recorded → Actor and time → Stored → Periodically reviewed → Evidence produced
Step 5 - Build only on request
Once the user asks for it, derive the fields from the confirmed context and emit the
requested artifacts. For machine-readable text, keep prose outside the data; for files,
provide a usable link. Report material validation failures or limitations separately.
**A selected Notion output is rendered by notion-manual-import, so route the
Notion step there.** When the user selects Notion, hand that step to
@notion-manual-import: it holds the CSV, the property
mapping, the import steps and the verification checklist, and it renders the Field
Reference below instead of defining a table of its own. Do not restate the mapping
here and do not improvise the import steps. Manual CSV and mapping outputs need no
connection. For requested workspace changes, follow the shared contract: verify actual
tool access and the target before writing. A user saying "connected" is not tool evidence.
Never ask for a Notion password or token.
For an Excel-compatible CSV, use UTF-8 with a byte order mark so Excel opens the
text correctly. A CSV is not an .xlsx workbook; create .xlsx only when the user
requests a workbook.
A CSV carries no types, so after it, name the columns
that need a number, date or currency format applied.
Log Entry,Date and Time,User,Module,Record,Action,Field Changed,Old Value,New Value,Reason,Log ID
Policy updated,2026-01-15T09:30:00Z,Example User,Invoices & Billing,INV-EXAMPLE-001,Update,Status,Draft,Sent,Correction made after a review query,CREATE TABLE audit_log (
log_entry VARCHAR(255),
date_and_time TIMESTAMPTZ NOT NULL,
user_account VARCHAR(255),
module VARCHAR(255),
record VARCHAR(255),
action VARCHAR(255),
field_changed VARCHAR(255),
old_value VARCHAR(255),
new_value VARCHAR(255),
reason VARCHAR(255),
log_id SERIAL PRIMARY KEY,
created_at TIMESTAMP DEFAULT NOW(),
updated_at TIMESTAMP DEFAULT NOW()
);{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Audit Log",
"type": "object",
"additionalProperties": false,
"properties": {
"Log Entry": { "type": "string" },
"Date and Time": { "type": "string", "format": "date-time" },
"User": { "type": "string" },
"Module": { "type": "string" },
"Record": { "type": "string" },
"Action": { "type": "string" },
"Field Changed": { "type": "string" },
"Old Value": { "type": "string" },
"New Value": { "type": "string" },
"Reason": { "type": "string" },
"Log ID": { "type": "integer" }
},
"required": [
"Date and Time"
]
}| CSV column | Notion property | Set after import |
|---|---|---|
| Log Entry | Title | Use as the database title |
| Date and Time | Date (include time) | Convert to Date (include time) |
| User | Text | Leave as Text |
| Module | Text | Leave as Text |
| Record | Text | Leave as Text |
| Action | Text | Leave as Text |
| Field Changed | Text | Leave as Text |
| Old Value | Text | Leave as Text |
| New Value | Text | Leave as Text |
| Reason | Text | Leave as Text |
| Log ID | Text (preserve source ID) | Keep imported IDs as Text; optionally add a separate Unique ID property |The rows above are documentation examples only. Emit empty templates unless the user explicitly requests examples. Money stays currency, dates stay date,
and anything pointing at another table stays relation.
The schema is a minimal register, not an append-only evidence system. Old/New Value must use field-specific redaction and size limits. Before compliance use, add immutable actor/event/target/result/correlation fields, protected append-only writer permissions and retention/clock controls; updated_at does not provide tamper evidence.
Field Reference
| # | Field | Type | SQL | JSON Schema | Notion | CSV example |
|---:|---|---|---|---|---|---|
| 1 | Log Entry | text | VARCHAR(255) | string | Text | Policy updated |
| 2 | Date and Time | datetime | TIMESTAMPTZ | string, format: date-time | Date (include time) | 2026-01-15T09:30:00Z |
| 3 | User | text | VARCHAR(255) | string | Text | Example User |
| 4 | Module | text | VARCHAR(255) | string | Text | Invoices & Billing |
| 5 | Record | text | VARCHAR(255) | string | Text | INV-EXAMPLE-001 |
| 6 | Action | text | VARCHAR(255) | string | Text | Update |
| 7 | Field Changed | text | VARCHAR(255) | string | Text | Status |
| 8 | Old Value | text | VARCHAR(255) | string | Text | Draft |
| 9 | New Value | text | VARCHAR(255) | string | Text | Sent |
| 10 | Reason | text | VARCHAR(255) | string | Text | Correction made after a review query |
| 11 | Log ID | id | SERIAL PRIMARY KEY | integer | Text (preserve source ID) | (blank) |
Select Options
_No Select fields._
Relations
Link fields: none
Examples
Prompt
When a client questioned an approval we had nothing to show.Context first - one question per message, nothing already answered:
> Q: Which process?
> A: Expense approvals.
>
> Q: Who asks?
> A: Our accountant, at year end.
>
> Q: How far back?
> A: Three years.
Recommended next step - offered, not built:
> Define the small set of events worth keeping and record who did what and wh
… (nội dung đầy đủ có trong gói tải về)
Skill liên quan
- audit-logging – Triển khai ghi nhật ký kiểm toán tập trung và tích hợp SIEM. Cấu hình thời gian lưu giữ…
- audit-preparation – Sổ đăng ký chuẩn bị kiểm toán: tài liệu bắt buộc, kỳ được bao phủ, ngày yêu cầu và ngày…
- audit-skills – Chuyên gia kiểm toán bảo mật cho AI Skills và Bundles. Thực hiện phân tích tĩnh không…
- hunt-laravel – Săn lỗ hổng đặc thù Laravel — rò rỉ khi bật debug (APP_DEBUG=true làm lộ toàn bộ stack…
- hunt-llm-ai – Săn lỗ hổng tính năng LLM/AI — prompt injection, indirect injection, rò rỉ dữ liệu qua…
- hunt-mcp-security – Săn lỗ hổng Model Context Protocol (MCP) trong các hệ thống tích hợp công cụ AI.
- aws-security-audit – Đánh giá toàn diện tư thế bảo mật AWS bằng AWS CLI và các thực hành bảo mật tốt nhất
- hunt-misc – Kỹ năng săn các lỗ hổng linh tinh (misc). Được xây dựng từ 225 báo cáo bug bounty công…