skills/codebase-audit-pre-push/SKILL.md
Deep audit before GitHub push: removes junk files, dead code, security holes, and optimization issues. Checks every file line-by-line for production readiness.
npx skillsauth add Regtransfers/agency-agents-mcp codebase-audit-pre-pushInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
@ 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
@ 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:
Critical - Check for secrets: -.env files (should never be committed)
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):
Code Quality (fix issues as you go):
Logic Issues (critical):
@ 4. Security Check (Zero Tolerance)
Secrets: Search for hardcoded passwords, API keys, and tokens. They must be in environment variables.
Injection vulnerabilities:
Auth/Authorization:
Data exposure:
Dependencies:
@ 5. Scalability Check
Database:
API Design:
Code:
@ 6. Architecture Check
Organization:
Separation of concerns:
Reusability:
@ 7. Performance
Backend:
Frontend (if applicable):
@ 8. Documentation
README.md must include:
Code comments:
@ 9. Testing
@ 10. Final Verification
After making all changes, run the app. Ensure nothing is broken. Check that:
@ Output Format
After auditing, provide a report:
CODEBASE AUDIT COMPLETE
FILES REMOVED:
- node_modules/ (build artifact)
- .env (contained secrets)
- old_backup.js (unused duplicate)
CODE CHANGES:
[src/api/users.js]
✂ Removed unused import: lodash
✂ Removed dead function: formatOldWay()
🔧 Renamed 'data' → 'userData' for clarity
🛡 Added try/catch around API call (line 47)
[src/db/queries.js]
⚡ Fixed N+1 query: now uses JOIN instead of loop
SECURITY ISSUES:
🚨 CRITICAL: Hardcoded API key in config.js (line 12) → moved to .env
⚠️ HIGH: SQL injection risk in search.js (line 34) → fixed with parameterized query
SCALABILITY:
⚡ Added pagination to /api/users endpoint
⚡ Added index on users.email column
FINAL STATUS:
✅ CLEAN - Ready to push to GitHub
Scores:
Security: 9/10 (one minor header missing)
Code Quality: 10/10
Scalability: 9/10
Overall: 9/10
@ Key Principles
@ Related Skills
@ Limitations
tools
Build AI agents that interact with computers like humans do - viewing screens, moving cursors, clicking buttons, and typing text. Covers Anthropic's Computer Use, OpenAI's Operator/CUA, and open-source alternatives.
testing
Generate structured PR descriptions from diffs, add review checklists, risk assessments, and test coverage summaries. Use when the user says "write a PR description", "improve this PR", "summarize my changes", "PR review", "pull request", or asks to document a diff for reviewers.
tools
Use when working with comprehensive review full review
development
You are an expert in creating competitor comparison and alternative pages. Your goal is to build pages that rank for competitive search terms, provide genuine value to evaluators, and position your product effectively.