tiered-audit
Audit a codebase using three escalation tiers: git history analysis, targeted deep-dives, and full codebase review with gating
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/athola/nm-pensive-tiered-auditNight Market Skill — ported from claude-night-market/pensive. For the full experience with agents, hooks, and commands, install the Claude Code plugin.
Tiered Audit
Table of Contents
- When to Use
- When NOT to Use
- Tier 1: Git History Audit
- Tier 2: Targeted Area Audit
- Tier 3: Full Codebase Audit
- Output Contract
When To Use
- Auditing codebase quality, patterns, or problems
- Reviewing what changed on a branch before merge
- Investigating areas of instability or churn
- Pre-PR quality assessment
When NOT to Use
- Reviewing a specific file (use pensive:code-reviewer)
- Architecture-only review (use pensive:architecture-review)
- Single-commit review (use imbue:diff-analysis)
Tier 1: Git History Audit
Always runs first. Analyzes git log, diff stats, and blame to identify areas of concern without reading any source files.
What Tier 1 Analyzes
Run these git commands for the target commit range (default: current branch vs main):
# 1. Churn hotspots: files changed most often
git log --format="" --name-only {base}..HEAD \
| sort | uniq -c | sort -rn | head -20
# 2. Diff stats: size of changes per file
git diff --stat {base}..HEAD
# 3. Fix-on-fix patterns: commits fixing previous commits
git log --oneline {base}..HEAD \
| grep -iE "(fix|revert|patch|hotfix)"
# 4. New file clusters: modules with many new files
git diff --name-status {base}..HEAD \
| grep "^A" | cut -f2 \
| sed 's|/[^/]*$||' | sort | uniq -c | sort -rn
# 5. Large commits: single commits with big diffs
git log --format="%h %s" --shortstat {base}..HEAD
Verification: Confirm each command produces output.
If a command returns empty, the commit range may be wrong;
verify {base} resolves correctly with git merge-base.
Tier 1 Output Format
Write findings to .coordination/agents/tier1-audit.findings.md:
---
agent: tier1-audit
tier: 1
evidence_count: {N}
---
## Summary
{1-2 sentence overview of what the git history reveals}
## Churn Hotspots
{top 10 most-changed files with change counts}
[E1] Command: git log --format="" --name-only ...
Output: {relevant output}
## Fix-on-Fix Patterns
{commits that fix previous commits in the same area}
[E2] Command: git log --oneline ... | grep -iE ...
Output: {relevant output}
## New File Clusters
{modules with 5+ new files}
## Large Diffs
{commits with 200+ line changes}
## Escalation Recommendation
{list of areas flagged for Tier 2, or "no escalation needed"}
Escalation Decision
After Tier 1 completes, check findings against the
escalation criteria in modules/escalation-criteria.md.
If NO criteria are met: audit is complete. Report findings.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-athola-nm-pensive-tiered-audit": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
extract
Analyze a codebase and build a knowledge base of business logic, architecture, data flow, and engineering patterns. The foundation for gauntlet challenges and agent integration
discourse
>- Scan community discussion channels (HN, Lobsters, Reddit, tech blogs) for experience reports and opinions on a topic
synthesize
>- Merge, deduplicate, rank, and format research findings from multiple channels into a coherent report. Use after research agents return their results
workflow-monitor
Detect workflow failures and inefficient patterns, then create GitHub issues for improvement via /fix-workflow
architecture-paradigm-hexagonal
Hexagonal (Ports and Adapters) architecture isolating domain logic from infrastructure