원클릭으로
audit-log
Use this skill when analyzing WrongStack session logs, event streams, or system traces to surface patterns, anomalies, or operational insights. Triggers: user says "audit", "session analysis", "log analysis", "usage patterns".
메뉴
Use this skill when analyzing WrongStack session logs, event streams, or system traces to surface patterns, anomalies, or operational insights. Triggers: user says "audit", "session analysis", "log analysis", "usage patterns".
Use this skill when choosing, installing, or recommending packages, libraries, frameworks, or tooling — any decision that involves a version number or a technology name. This skill enforces latest-version verification, blocks dead/obsolete choices, and intervenes when the LLM hallucinates version numbers or suggests 5+ year-old technology. Triggers: user says "install", "package", "dependency", "upgrade", "latest version", "add package", "npm install", "pnpm add", "what version", "which library", "tech stack", "choose framework".
Use this skill when a task would benefit from parallel execution across multiple AI agents, or when orchestrating leader/worker patterns in WrongStack. Triggers: user says "fan out", "parallel", "delegate", "subagent", "fleet", "coordinator".
Use this skill when designing, reviewing, or refactoring REST APIs in WrongStack. Triggers: user says "API", "endpoint", "REST", "request", "response", "JSON", "HTTP", "status code", "pagination", "query params", "request body".
Use this skill when scanning source code for bugs, anti-patterns, code smells, or quality issues in a WrongStack project. Triggers: user says "bug", "bug hunt", "scan for issues", "find problems", "anti-pattern", "code smell", "static analysis".
Use this skill when building, containerizing, or deploying WrongStack with Docker. Triggers: user says "docker", "container", "dockerfile", "image", "docker-compose", "deploy", "containerize", "registry", "multi-stage", "distroless".
Use this skill when proposing, reviewing, or troubleshooting git commits, branches, pull requests, or merge strategies in a WrongStack project session. Triggers: user mentions "commit", "branch", "PR", "merge", "rebase", "stash", "diff".
| name | audit-log |
| description | Use this skill when analyzing WrongStack session logs, event streams, or system traces to surface patterns, anomalies, or operational insights. Triggers: user says "audit", "session analysis", "log analysis", "usage patterns". |
| version | 1.1.0 |
Analyzes session logs, event streams, and system traces to surface patterns, anomalies, and actionable insights.
Parses WrongStack session JSONL files to extract tool usage patterns, error distributions, cost trends, and context anomalies. Produces a structured report with prioritized findings.
// ✅ Good — parse tool call counts from session JSONL
{
"iterations": 23,
"toolCalls": [
{ "tool": "read", "count": 142, "failures": 3 },
{ "tool": "bash", "count": 89, "failures": 12 }
],
"costPerIteration": [0.04, 0.04, 0.11, 0.18]
}
// ✅ Extract error distribution
const errorsByType = events
.filter(e => e.type === 'error')
.reduce((acc, e) => {
acc[e.error.type] = (acc[e.error.type] || 0) + 1;
return acc;
}, {});
// ❌ Bad — report without citing data
"bash had some failures" // no count, no iteration, no error type
// ❌ Bad — mix sessions without labeling
// Analyzed 3 sessions together with no per-session breakdown
1. Collect: Read session logs from path or sessionRoot
2. Parse: Extract events: tool calls, iterations, errors, usage
3. Analyze: Group by category, detect anomalies
4. Report: Structured markdown summary
ToolExecutionError47x across iterations = systemic issuebash tool = command timeout patternWrongStack session logs are JSONL files. Each line is a JSON event. Key event types:
{"type": "iteration_start", "iteration": 1, "timestamp": "..."}
{"type": "tool_call", "tool": "read", "input": {"path": "src/index.ts"}, "duration_ms": 12}
{"type": "tool_result", "tool": "read", "output_lines": 45}
{"type": "error", "error": {"type": "ToolExecutionError", "message": "...", "tool": "bash"}}
{"type": "compaction", "reason": "context_near_limit", "tokens_removed": 1200}
{"type": "cost", "input_tokens": 3400, "output_tokens": 890, "cost_usd": 0.11}
{"type": "iteration_end", "iteration": 1, "stop_reason": "end_turn"}
When reading a session file:
grep for event types you need (e.g., grep '"type": "error"' session.jsonl)read the full file for detailed analysisiteration_start / iteration_end eventscost_usd per iteration for cost trend analysis{
"task": "analyze | report | trends",
"sessionPath": "<path to session JSONL>",
"focus": "errors | tools | usage | all"
}
## Audit Report — <date>
### Summary
- Total iterations: N
- Total tool calls: N
- Error rate: X%
- Cost: $X.XX
### Top Errors (by count)
1. `ToolExecutionError` — 47x — concentrated in `bash` tool, command timeout
2. `PermissionDenied` — 12x — `exec` tool, no trust file entry
### Tool Usage
| Tool | Calls | Failures | Avg Duration |
|------|-------|----------|--------------|
| read | 142 | 3 | 45ms |
| bash | 89 | 12 | 2300ms |
### Anomalies
- High bash failure rate (13.5%) — likely command timeout
- 3 iterations with >50 tool calls — possible loop, review iteration 14
### Cost Trend
- Iteration 1-10: avg $0.04/iteration
- Iteration 11-20: avg $0.11/iteration (context growth)
bug-hunter — for turning audit findings into concrete bugs to fixrefactor-planner — for addressing systemic issues found in logssecurity-scanner — for security-adjacent findings (leaked keys, injection patterns in logs)