sw-audit

sw-audit is a skill for Claude Code from Obsidian-Owl/specwright. It costs 36 tokens per session (909 once invoked), scanned A, original, MIT.

A recurring review of an entire codebase for architecture problems, growing complexity, inconsistent practices, and accumulated workarounds. It records the findings in an AUDIT.md file without changing source code.

In plain words
What is it for?
Use it for periodic codebase health checks, reviewing technical debt, and identifying issues to prioritize in future work.
Why use it?
It helps reveal system-wide issues that checks on individual changes may miss. Keeping findings in a file makes them available for later planning.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it for periodic codebase health checks, reviewing technical debt, and identifying issues to prioritize in future work.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/obsidian-owl/specwright/sw-audit
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Obsidian-Owl/specwright --skill sw-audit
Clone the repo
git clone --depth 1 https://github.com/Obsidian-Owl/specwright

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sw-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/obsidian-owl/specwright/sw-audit/github.svg)](https://agentmods.dev/skills/obsidian-owl/specwright/sw-audit)
Your own site
<a href="https://agentmods.dev/skills/obsidian-owl/specwright/sw-audit"><img src="https://agentmods.dev/badge/skills/obsidian-owl/specwright/sw-audit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for sw-audit

Your own site · 80×15
<a href="https://agentmods.dev/skills/obsidian-owl/specwright/sw-audit"><img src="https://agentmods.dev/badge/skills/obsidian-owl/specwright/sw-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 909 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00036 $0.00909
Opus 5.5 $0.00014 $0.00364
Sonnet 5.5 $0.00007 $0.00182
Haiku 4.5 $0.00004 $0.00091

Measured 1mo ago against content hash 6ec1e1520b79, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

sw-audit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

core/skills/sw-audit/SKILL.md · 92 lines

How it starts

The opening of the file, as written. The whole thing — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Specwright Audit

Goal

Find systemic codebase issues that per-change quality gates miss. Architecture debt, complexity growth, convention drift, and accumulated workarounds compound silently. Surface them, let the user prioritize, and persist findings for future design cycles.

Inputs

  • The codebase itself
  • {projectArtifactsRoot}/CONSTITUTION.md -- practices to check against
  • {projectArtifactsRoot}/AUDIT.md -- prior findings (if exists, for ID matching)
  • {projectArtifactsRoot}/LANDSCAPE.md -- module structure (if exists, for triage)
  • {projectArtifactsRoot}/config.json -- audit config (optional audit section)

Outputs

  • {projectArtifactsRoot}/AUDIT.md -- findings per protocols/audit.md format
  • Findings presented to user grouped by dimension before saving

Constraints

Scope (LOW freedom):

  • This skill reads and analyzes. It NEVER modifies source code, creates branches, runs builds, or starts work units.
  • Does NOT create currentWork in workflow.json. Does NOT require a lock. Can run while a work unit is in progress.
  • It is not a core workflow stage and never claims top-level work ownership.
  • On compaction: re-run from scratch (no state to recover).

Triage (MEDIUM freedom):

  • Determine audit depth from argument and codebase size:
    • Path argument → Focused: analyze specified directory/module only
    • --full argument → Full: parallel agents, all dimensions
    • No argument → auto-triage: Standard (<50 files) or Full (50+ files)
  • If LANDSCAPE.md exists, use module count to inform triage.

Analysis (HIGH freedom):

  • Four dimensions: architecture, complexity, consistency, debt.
  • Delegate per protocols/delegation.md:
    • specwright-architect: architecture + complexity (structural analysis)
    • specwright-reviewer: consistency + debt (convention and quality analysis)
  • Standard depth: 2 agent calls (sequential or parallel).
  • Full depth: up to 4 parallel calls (one per dimension).
  • Include constitution practices as the baseline for consistency checks.

Read the full file on GitHub · 92 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 92 lines · 36 tokens per session scan A 6ec1e1520b79

Subscribe to this mod's changes

sw-audit is a skill published in the GitHub repository Obsidian-Owl/specwright (10 stars, last pushed 6mo ago), licensed MIT. It adds 36 tokens to every session and 909 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

ai-development-guide

Applies language-agnostic and backend technical decision criteria, anti-pattern detection, debugging, and quality gates. Use when reviewing general/backend implementation choices, code smells, failures, or implementation completeness.

shinpr/claude-code-workflows · 43 tokens

shipyard-debugging

Investigates root cause systematically before any fix is proposed. Use when encountering any bug, test failure, unexpected behavior, or error message. Also use for tracebacks, exceptions, "not working" complaints, build failures, performance problems, or integration issues, and whenever the next step would be to…

lgbarn/shipyard · 72 tokens

logic-review

Find logic bugs in a single file or function via semi-formal execution tracing (Premises → Trace → Divergence → Trigger → Remedy). Trigger when a user shares code and suspects something is wrong without naming a concrete failure — phrases like "review this", "does this look right", "check this function", "audit this…

hyhmrright/logic-lens · 161 tokens

debug

Systematic bug investigation with a five-phase framework: reproduce, narrow, diagnose, fix, verify. Supports automated regression bisect via --regression flag. Produces a structured debug report with root cause analysis, regression test, and CQ/Q self-evaluations.

greglas75/zuvo · 55 tokens

logic-fix-all

Autonomous repository-wide audit-and-fix pipeline: health → review → locate/explain → fix → diff-verify → iterate until clean. Starts with a mandatory consent prompt (token-intensive); after consent runs hands-free. Trigger when the user wants ALL logic issues found and fixed — "fix everything", "fix all logic…

hyhmrright/logic-lens · 211 tokens

logic-health

Sweep a directory, module, or full codebase for logic correctness and produce a scored health dashboard with systemic patterns. Trigger when the user requests a health view — "audit the whole codebase", "health check", "health overview", "logic health overview", "audit src/", "audit auth and payments modules", "where…

hyhmrright/logic-lens · 180 tokens