codebase-audit

codebase-audit is a skill for Claude Code from fredrikaverpil/dotfiles. It costs 119 tokens per session (2,570 once invoked), scanned A, original, MIT.

A skill for auditing a codebase, based on instructions stored in a skill file. A codebase is the collection of source files that make up a software project.

In plain words
What is it for?
Codebase-audit tasks. The exact checks and outputs are not described here.
Why use it?
It may provide a repeatable way to inspect a project, but the supplied information does not say which problems it looks for.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: positional $N argument.

Good fit Codebase-audit tasks. The exact checks and outputs are not described here.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fredrikaverpil/dotfiles/codebase-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 fredrikaverpil/dotfiles --skill codebase-audit
Clone the repo
git clone --depth 1 https://github.com/fredrikaverpil/dotfiles

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 codebase-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/fredrikaverpil/dotfiles/codebase-audit/github.svg)](https://agentmods.dev/skills/fredrikaverpil/dotfiles/codebase-audit)
Your own site
<a href="https://agentmods.dev/skills/fredrikaverpil/dotfiles/codebase-audit"><img src="https://agentmods.dev/badge/skills/fredrikaverpil/dotfiles/codebase-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 codebase-audit

Your own site · 80×15
<a href="https://agentmods.dev/skills/fredrikaverpil/dotfiles/codebase-audit"><img src="https://agentmods.dev/badge/skills/fredrikaverpil/dotfiles/codebase-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 119 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,570 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Agent Snooping · line 1
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
How audits are shown
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.00119 $0.02570
Opus 5.5 $0.00048 $0.01028
Sonnet 5.5 $0.00024 $0.00514
Haiku 4.5 $0.00012 $0.00257

Measured today against content hash 40139f24530c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

codebase-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 today.

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.

stow/shared/.claude/skills/codebase-audit/SKILL.md · 300 lines

How it starts

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

Codebase Audit

Analyze the current git repository's history to produce a structured health report covering churn, ownership, bugs, momentum, and firefighting patterns.

Goal

Produce a structured markdown report with one section per dimension, including raw data (top files/contributors) and observations. The report should help the reader orient themselves in an unfamiliar codebase and identify risk areas before reading code.

Steps

Steps 1a-1e are independent — run them in parallel, then synthesize in step 2.

0. Detect GitHub availability

Before starting the analysis, check whether the repo is GitHub-hosted and gh is authenticated:

gh repo view --json nameWithOwner 2>/dev/null

If this succeeds, set a mental flag that GitHub enrichments are available. If it fails (not a GitHub repo, or gh not authenticated), skip all gh-prefixed sub-steps below and rely on git-only analysis. Do not warn or apologize — just use what's available.

1a. High-Churn Files

1a-i. Raw churn
git log --format=format: --name-only --since="1 year ago" | grep . | sort | uniq -c | sort -nr | head -20

Report the top 20 most-modified files in the past year. Flag any file that appears disproportionately often -- this is the clearest signal of codebase drag.

1a-ii. De-noised churn

Lockfiles, generated output and vendored trees dominate raw churn without telling you anything about the code. If 5 or more of the top 10 are noise of this kind, run a filtered second pass:

NOISE='(^|/)([^/]*-lock\.(json|yaml)|[^/]*\.lock|package\.json|go\.sum|CHANGELOG\.md|[^/]*\.snap)$|(^|/)(__snapshots__|dist|build|coverage|generated|vendor|node_modules|\.terraform)/'
git log --format=format: --name-only --since="1 year ago" | grep . | grep -vE "$NOISE" | sort | uniq -c | sort -nr | head -20

Extend $NOISE with repo-specific paths when the filtered pass is still dominated by bulk content (docs/, locales/, i18n/). Label that as a repo-specific pass, separate from the generic de-noising above.

Read the full file on GitHub · 300 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. today Changed · +299 lines · +119 tokens per session 40139f24530c
  2. 1mo ago First seen · 1 lines · 0 tokens per session scan A e6ec1a36f15a

Subscribe to this mod's changes

codebase-audit is a skill published in the GitHub repository fredrikaverpil/dotfiles (260 stars, last pushed today), licensed MIT. It adds 119 tokens to every session and 2,570 once invoked, about $0.0005 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-30.