codebase-audit-pre-push

codebase-audit-pre-push is a skill for Claude Code from ratnesh-maurya/cursor-claude-personas. It costs 39 tokens per session (1,968 once invoked), scanned A, original, MIT.

A pre-push codebase check that reviews files for unwanted artifacts, dead code, security problems, and optimisation issues before a GitHub push.

In plain words
What is it for?
Use it before pushing code, making a repository public, or preparing for production deployment.
Why use it?
It helps catch files and defects that could make a repository unsafe, cluttered, or unready to publish.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it before pushing code, making a repository public, or preparing for production deployment.

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

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-pre-push

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/ratnesh-maurya/cursor-claude-personas/codebase-audit-pre-push"><img src="https://agentmods.dev/badge/skills/ratnesh-maurya/cursor-claude-personas/codebase-audit-pre-push.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,968 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.00039 $0.01968
Opus 5 $0.00019 $0.00984
Sonnet 5 $0.00008 $0.00394
Haiku 4.5 $0.00004 $0.00197

Measured 10d ago against content hash 4ddfb4ffa5a5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

codebase-audit-pre-push 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 10d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.claude/skills/codebase-audit-pre-push/SKILL.md · 242 lines

How it starts

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

Pre-Push Codebase Audit

As a senior engineer, you're doing the final review before pushing this code to GitHub. Check everything carefully and fix problems as you find them.

When to Use This Skill

  • User requests "audit the codebase" or "review before push"
  • Before making the first push to GitHub
  • Before making a repository public
  • Pre-production deployment review
  • User asks to "clean up the code" or "optimize everything"

Your Job

Review the entire codebase file by file. Read the code carefully. Fix issues right away. Don't just note problems—make the necessary changes.

Audit Process

1. Clean Up Junk Files

Start by looking for files that shouldn't be on GitHub:

Delete these immediately:

  • OS files: .DS_Store, Thumbs.db, desktop.ini
  • Logs: *.log, npm-debug.log*, yarn-error.log*
  • Temp files: *.tmp, *.temp, *.cache, *.swp
  • Build output: dist/, build/, .next/, out/, .cache/
  • Dependencies: node_modules/, vendor/, __pycache__/, *.pyc
  • IDE files: .idea/, .vscode/ (ask user first), *.iml, .project
  • Backup files: *.bak, *_old.*, *_backup.*, *_copy.*
  • Test artifacts: coverage/, .nyc_output/, test-results/
  • Personal junk: TODO.txt, NOTES.txt, scratch.*, test123.*

Critical - Check for secrets:

  • .env files (should never be committed)
  • Files containing: password, api_key, token, secret, private_key
  • *.pem, *.key, *.cert, credentials.json, serviceAccountKey.json

If you find secrets in the code, mark it as a CRITICAL BLOCKER.

2. Fix .gitignore

Check if the .gitignore file exists and is thorough. If it’s missing or not complete, update it to include all junk file patterns above. Ensure that .env.example exists with keys but no values.

3. Audit Every Source File

Look through each code file and check:

Dead Code (remove immediately):

  • Commented-out code blocks
  • Unused imports/requires
  • Unused variables (declared but never used)
  • Unused functions (defined but never called)
  • Unreachable code (after return, inside if (false))
  • Duplicate logic (same code in multiple places—combine)

Read the full file on GitHub · 242 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. 10d ago First seen · 242 lines · 39 tokens per session scan A 4ddfb4ffa5a5

Subscribe to this mod's changes

codebase-audit-pre-push is a skill published in the GitHub repository ratnesh-maurya/cursor-claude-personas (8 stars, last pushed 5mo ago), licensed MIT. It adds 39 tokens to every session and 1,968 once invoked, about $0.0002 per session on Opus 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.