audit
Skill6 starsChanged 14 days agoApache-2.0View on GitHub
Produce a comprehensive audit trail of actions, tools used, changes made, and decision rationale. Use when recording compliance evidence, tracking changes, or documenting decision lineage.
194 other projects use a version of this.
Adopted by
Most recently taken up by
- Laucked-Security/claude-oswetheir own version, first seen Nov 8, 2026
- sanmidable/skillstheir own version, first seen Nov 8, 2026
- alegauss/claude-traytheir own version, first seen Nov 8, 2026
- ansvisor/ansvisortheir own version, first seen Nov 8, 2026
- ai-search-guru/getcito-worlds-first-open-source-aio-aeo-or-geo-tooltheir own version, first seen Nov 8, 2026
- MammadovEshgin/clean-code-skilltheir own version, first seen Nov 8, 2026
Used with
Projects with it also use delight, teach-impeccable 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.
HK-hubSkilldelight
Add moments of joy, personality, and unexpected touches that make interfaces memorable and enjoyable to use. Elevates functional to delightful. Use when the user asks to add polish, personality, animations, micro-interactions, delight, or make an interface feel fun or memorable.
Also in 32 projects that use this
HK-hubSkillteach-impeccable
One-time setup that gathers design context for your project and saves it to your AI config file. Run once to establish persistent design guidelines.
Also in 19 projects that use this
zwy123zwySkillnormalize
将用户随意输入的提示词规范化为结构清晰、便于大模型执行的标准化提示词。适用于需要整理、统一提示词格式时调用。
Also in 19 projects that use this
SkillPilotCHSkilllevel-up
Eine Automatisierung pro Woche finden, scopen, shippen. Output landet als proposed-Eintrag in cadence.md mit konkreten Implementations-Schritten.
Also in 12 projects that use this
ww-w-aiSkillpm-discovery
PM Agent Team - Automated product discovery, strategy, and PRD generation. Runs PM analysis workflow to produce comprehensive PRD before PDCA Plan phase.
Also in 3 projects that use this
- +7 more from HK-hub
Other versions194 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 194
- openai/plugins★ 7.8ksame name
- ccch1mneyyy/dsh-TUI★ 7.2ksame name
- macro-inc/macro★ 6ksame name
- yournextstore/yournextstore★ 5.5ksame name
- gadievron/raptor★ 4ksame name
- alchemy-run/alchemy★ 1.9ksame name
- alchemy-run/alchemy-effect★ 1.9ksame name
- mattmireles/gemma-tuner-multimodal★ 1.5ksame name
- jsmastery-pro/skills★ 1.4ksame name
- nateherkai/AIS-OS★ 1.4ksame name
184 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository42 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- attributeSkill
- gap-analysis-workflowSkill
- checkpointSkill
- classifySkill
- compareSkill
- constrainSkill
- critiqueSkill
- debug-workflowSkill
- decomposeSkill
- delegateSkill
- detectSkill
- digital-twin-bootstrapSkill
- digital-twin-sync-workflowSkill
- discover-capabilitiesSkill
- discoverSkill
- executeSkill
- explainSkill
- generateSkill
- groundSkill
- inquireSkill
- integrateSkill
- invokeSkill
- measureSkill
- mutateSkill
- observeSkill
- persistSkill
- perspective-validationSkill
- planSkill
- predictSkill
- recallSkill
- receiveSkill
- retrieveSkill
- rollbackSkill
- searchSkill
- sendSkill
- simulateSkill
- stateSkill
- synchronizeSkill
- transformSkill
- transitionSkill
- verifySkill
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 7 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 175 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 46
Every action linked to actor, timestamp, and rationale
- Very specific: line 67
Read the report scope from context.scope to identify targets
- Distinctive: line 72
Read git log for commits and their messages
- Distinctive: line 77
Extract decision rationale: Document the "why" for each action
- Distinctive: line 301
Verification tools: Read (for log files and the appended record), Grep (for searching history), Bash (to append the record)
- Distinctive: line 311
Never modify audited artifacts during audit
- Very specific: line 329
Never skip audit after execute or mutate (breaks accountability)
- Distinctive: line 330
Never modify artifacts during audit (breaks integrity)
- Distinctive: line 331
Never omit failed actions from audit trail
“Common” is measured: kept by at least 6 in 10 of the 175 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.
Files
Live Context
Current audit context:
- Recent git commits: !
git log --oneline -10 2>/dev/null || echo "No git history" - Git authors today: !
git log --since="midnight" --format="%an" 2>/dev/null | sort | uniq -c || echo "None" - Uncommitted changes: !
git status --short 2>/dev/null || echo "Not a git repo" - Recent file modifications: !
find . -type f -mtime -1 -not -path './.git/*' 2>/dev/null | wc -l | tr -d ' 'files in last 24h - Audit log exists: !
ls -la .audit/ 2>/dev/null | head -5 || echo "No .audit/ directory" - Audit records exist: !
wc -l "${CLAUDE_PROJECT_DIR:-.}/.claude/audit/records.jsonl" 2>/dev/null || echo "No .claude/audit/records.jsonl" - Checkpoint log exists: !
ls -la .checkpoints/ 2>/dev/null | head -5 || echo "No .checkpoints/ directory"
Intent
Execute audit to create a structured record of actions taken, tools invoked, changes made, and the reasoning behind decisions. This provides accountability, enables investigation of issues, and supports compliance requirements.
Success criteria:
- Complete chronological record of relevant actions
- Every action linked to actor, timestamp, and rationale
- Changes documented with before/after state
- Provenance chain for all outputs
Compatible schemas:
schemas/output_schema.yaml
Inputs
| Parameter | Required | Type | Description |
event | Yes | object | Event to record |
context | No | object | Event context |
retention | No | string | How long to retain |
Inputs not listed here are outside the capability's contract: a workflow step that binds them gets W604 (STANDARD v1.1 §5.5).
Procedure
- Define audit scope: Determine what to include in the audit
- Record the
eventitself: what happened, by whom, when - Read the report scope from
context.scopeto identify targets - Apply the time window in
context.time_windowif provided - Identify relevant log sources (git log, tool invocations, file changes)
- Record the
- Collect action records: Gather all actions within scope
- Read git log for commits and their messages
- Review tool invocation history if available
- Identify file changes (created, modified, deleted)
- Record timestamps for each action
- Extract decision rationale: Document the "why" for each action
- Link actions to plans or goals that motivated them
- Capture assumptions stated before action
- Record any constraints that influenced decisions
- Build provenance chain: Track inputs to outputs
- For each output, identify its source inputs
- Document transformations applied
- List dependencies between artifacts
- Ground claims: Attach evidence for all audit entries
- Format:
file:line,tool:git:commit_hash,timestamp - Include actual command outputs where relevant
- Format:
- Write the record (append-only): Persist the audit record before returning
- Build one compact JSON line:
audit_id,timestamp, theevent, thecontext,retentionif given, and the collectedaudit_record,changesandprovenance(redact credentials and PII first) - Append it with Bash to
"${CLAUDE_PROJECT_DIR:-.}/.claude/audit/records.jsonl"(mkdir -p "${CLAUDE_PROJECT_DIR:-.}/.claude/audit", then>>), so the record lands in the same project.claude/directory the plugin's hooks use rather than under whatever the working directory is; refuse if the file is a symlink, and never rewrite, truncate or reorder existing lines - Do not write to
.claude/audit.log: the plugin's PostToolUse hook keeps it as an HMAC-chained log of skill invocations (checked bytools/verify_audit_log.py), and a foreign line would break the chain. The hook appends this skill's own invocation only after the skill finishes, so there is no line for it yet: cite earlier lines (the invocations being audited) as evidence, not this one - The plugin's PreToolUse hook blocks a Bash command that matches its mutation pattern (
rm,mv,sed,git,curl,chmod, … anywhere in the command, record text included) while there is no valid checkpoint marker (.claude/checkpoint.ok); a plainmkdir/printf >>append whose text matches none of them is not blocked. If the append is blocked or fails, setrecorded: false, return the record in the output anyway, and say why inassumptions
- Build one compact JSON line:
- Format output: Structure per audit contract;
recordedis true only when step 6 appended the line
Output Contract
Return a structured object:
recorded: boolean # Whether the record was appended to .claude/audit/records.jsonl
audit_id: string # Unique audit record ID
timestamp: string # ISO 8601 date-time the audit record was generated
audit_record:
actor: string # Who/what performed audited actions
action_type: string # Category of actions
targets: array[string] # What was affected
outcome: success | failure | partial
changes:
- type: string # create, modify, delete, execute
before: string | null # Previous state/value
after: string | null # New state/value
location: string # File path or identifier
timestamp: string # When change occurred
tool_usage:
- tool: string # Tool name
invocation_count: integer
success_rate: number # 0.0-1.0
commands: array[string] # Actual commands if verbose
decision_rationale: string # Why these actions were taken
provenance:
inputs: array[string] # Source data/files
outputs: array[string] # Produced artifacts
dependencies: array[string] # External dependencies used
confidence: number # 0.0-1.0 (completeness of audit)
evidence_anchors: ["tool:git:...", "file:..."]
assumptions: []Field Definitions
| Field | Type | Description |
recorded | boolean | Whether the record was appended to .claude/audit/records.jsonl (false when the write was blocked or failed) |
audit_id | string | Unique identifier for this audit record |
timestamp | string | ISO 8601 date-time the audit record was generated |
audit_record.actor | string | Who performed the actions |
audit_record.outcome | enum | Overall result of audited actions |
changes | array | List of all changes with before/after |
tool_usage | array | Summary of tools invoked |
decision_rationale | string | Explanation of why actions were taken |
provenance | object | Input/output/dependency lineage |
confidence | number | 0.0-1.0 completeness of audit trail |
evidence_anchors | array | References to source evidence |
assumptions | array | What was assumed during audit collection |
Examples
Example 1: Audit Code Change Session
Input:
event:
type: session_completed
actor: "claude-agent"
timestamp: "2024-01-15T16:00:00Z"
context:
scope: "session"
time_window:
start: "2024-01-15T14:00:00Z"
end: "2024-01-15T16:00:00Z"
detail_level: standard
include_diffs: falseOutput:
recorded: true
audit_id: "audit_20240115_160000_session"
timestamp: "2024-01-15T16:00:00Z"
audit_record:
actor: "claude-agent"
action_type: "code_modification"
targets:
- "src/api/handlers/user.py"
- "src/api/handlers/auth.py"
- "tests/test_handlers.py"
outcome: success
changes:
- type: modify
before: "get_user() with inline SQL"
after: "get_user() with parameterized query"
location: "src/api/handlers/user.py:45-62"
timestamp: "2024-01-15T14:45:00Z"
- type: modify
before: "5 test cases"
after: "7 test cases (added SQL injection tests)"
location: "tests/test_handlers.py"
timestamp: "2024-01-15T15:15:00Z"
tool_usage:
- tool: Read
invocation_count: 12
success_rate: 1.0
- tool: Edit
invocation_count: 4
success_rate: 1.0
- tool: Bash
invocation_count: 3
success_rate: 1.0
commands: ["pytest tests/", "git diff", "git commit"]
decision_rationale: "Refactored to prevent SQL injection vulnerability identified in security audit. Added parameterized queries and corresponding test coverage."
provenance:
inputs:
- "security_audit_report.md"
- "src/api/handlers/user.py (original)"
outputs:
- "src/api/handlers/user.py (modified)"
- "tests/test_handlers.py (modified)"
dependencies:
- "pytest>=7.0"
- "psycopg2"
confidence: 0.95
evidence_anchors:
- "file:.claude/audit/records.jsonl"
- "tool:git:abc123def456"
- "tool:bash:pytest tests/ - 7 passed"
- "file:src/api/handlers/user.py:45"
assumptions:
- "Git log accurately reflects all changes"
- "No manual edits outside of tracked session"Evidence pattern: Git commit history, tool invocation logs, file diffs.
Example 2: Audit Specific File Changes
Input:
event:
type: configuration_changed
actor: "claude-agent"
target: "config/production.yaml"
context:
scope: "config/production.yaml"
detail_level: verbose
include_diffs: trueOutput:
recorded: true
audit_id: "audit_20240115_config"
timestamp: "2024-01-15T17:00:00Z"
audit_record:
actor: "claude-agent"
action_type: "configuration_change"
targets:
- "config/production.yaml"
outcome: failure
changes:
- type: modify
before: |
database:
host: db.internal
port: 5432
after: |
database:
host: db.external
port: 5433
location: "config/production.yaml:12-15"
timestamp: "2024-01-15T15:30:00Z"
- type: rollback
before: "(modified config)"
after: "(original config)"
location: "config/production.yaml"
timestamp: "2024-01-15T16:00:00Z"
tool_usage:
- tool: Edit
invocation_count: 2
success_rate: 0.5
decision_rationale: "Attempted database migration to external host. Rollback triggered after connection test failed."
provenance:
inputs:
- "migration_plan.md"
- "config/production.yaml (original)"
outputs:
- "config/production.yaml (restored to original)"
dependencies: []
confidence: 1.0
evidence_anchors:
- "file:.claude/audit/records.jsonl"
- "file:.checkpoints/chk_20240115_150000_config/manifest.json"
- "tool:bash:rollback command output"
assumptions: []Verification
Apply the following verification patterns:
- Evidence Grounding: All changes linked to evidence_anchors
- Contract Validation: Output has
recorded,audit_idandevidence_anchorsper the output schema - Completeness Check: No gaps in timeline for the specified time window
- Provenance Valid: All inputs and outputs are verifiable
Verification tools: Read (for log files and the appended record), Grep (for searching history), Bash (to append the record)
Safety Constraints
mutation: true (it writes an audit record);mutation_overridable, so a step that only reads may declaremutation: falserequires_checkpoint: falserequires_approval: falserisk: low
Capability-specific rules:
- Never modify audited artifacts during audit
- Preserve original timestamps (do not alter history)
- Include failed actions, not just successes
- Redact sensitive information (credentials, PII) from audit output
- Store audit records append-only: only ever append to
"${CLAUDE_PROJECT_DIR:-.}/.claude/audit/records.jsonl"; never edit or delete earlier lines, and never write to the hook-maintained.claude/audit.log
Composition Patterns
Commonly follows:
verify- After verify passes (passed: true), audit the successful changes (CAVR pattern)execute/mutate- Audit what was executedrollback- Audit the rollback event itself
Commonly precedes:
explain- Summarize audit for stakeholder reportingpersist- Store audit record for compliance
Anti-patterns:
- Never skip audit after
executeormutate(breaks accountability) - Never modify artifacts during audit (breaks integrity)
- Never omit failed actions from audit trail
Workflow references:
- See
reference/composition_patterns.md#debug-code-changefor audit-after-verify - See
reference/composition_patterns.md#digital-twin-sync-loopfor audit in loops
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
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.

