audit

Parse audit-log.jsonl to surface guard verdicts, rewrite actions, and injection flags.

Updated Apr 24, 2026
One-click install
npx skills add https://github.com/Cain-Ish/claude-code-plugin --skill audit-cain-ish
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: audit
Source: https://github.com/Cain-Ish/claude-code-plugin/tree/main/skills/audit
Command: npx skills add https://github.com/Cain-Ish/claude-code-plugin --skill audit-cain-ish

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

It helps you understand and verify what the second-brain safety layer did during a session by presenting the recorded guard verdicts and any flagged tool-return injections in a human-readable way.

Core Features & Use Cases

  • Session-level safety transparency: Summarizes guard verdict counts and highlights denied/flagged/rewrite events tied to specific hooks.
  • Focused investigation filters: Lets you narrow results by session id, verdict type, hook name, and recency to quickly find the relevant evidence.
  • Operational read-only auditing: Reads from ~/.second-brain/audit-log.jsonl and does not modify state, enabling trustworthy review of guard activity after the fact.

Quick Start

Use the audit skill to review the last 100 safety-layer events for your current session by asking for an audit report for the current session with default settings.

Frequently Asked Questions about audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review guardrail verdicts and tool injection flags from a previous session?

Audit logging records PreToolUse guard verdicts and tool-return injection flags into a JSONL file. It captures session-level safety decisions, including denied actions, rewrites, and flagged injections for post-session investigation.

How do I filter audit logs by session id and verdict type for incident investigation?

Filter audit logs by applying predicates on session_id, verdict, and hook fields within the JSONL records. This isolates specific safety events for focused troubleshooting and verification of guardrail behavior during incident investigation.

Can I use a read-only auditing tool to verify safety behavior without modifying state?

Yes, read-only auditing parses the JSONL log file without modifying state. It ensures trustworthy review of guard activity and tool-return scanner decisions after a session concludes, without fabricating results or altering system state.

What is the best way to summarize denied and flagged safety events from JSONL logs?

Summarize denied and flagged safety events by parsing the JSONL audit log to aggregate guard verdict counts. This highlights rewrite actions and tool-return injection flags tied to specific hooks, providing clear session-level safety transparency.

Does the audit logging skill support narrowing results by recency and hook name?

Yes, the audit logging skill supports narrowing results by recency and hook name. You can focus your investigation by applying filters to the JSONL records, quickly finding relevant evidence tied to specific PreToolUse guards or verdicts.