Audit codebases with full recognition and PR review for uncommitted changes. Detects SEO issues, technical problems, security vulnerabilities, accessibility issues, performance bottlenecks, and more. Supports Normal, Strict, and Expert modes with Complete Audit or PR Review options.
Install
npx skillscat add zeal422/dev-toolbelt-by-vm/vm-codebase-audit Install via the SkillsCat registry.
Codebase Audit Skill
Comprehensive codebase auditing with SEO, security, performance, accessibility, and technical checks.
Mode Selection
ALWAYS start by asking the user to select a mode using the ask_user_input tool:
ask_user_input_v0({
"questions": [
{
"question": "Select audit mode:",
"type": "single_select",
"options": [
"Normal - Core checks (technical, content, mobile, UX, security, accessibility)",
"Strict - Normal + performance, links, crawlability, schema, URL structure",
"Expert - All checks including E-E-A-T, legal, social, local SEO, video"
]
},
{
"question": "Select operation type:",
"type": "single_select",
"options": [
"Complete Audit - Full codebase crawl with cross-reference analysis",
"PR Review - Uncommitted changes only"
]
}
]
})After mode selection, respond:
AWESOME! The CLANKER is now... Loading... bEEp BooP ๐คThen proceed with the audit.
Execution Strategy
PR Review Mode
- Run
git statusandgit diffto find uncommitted changes - Analyze only modified/new files
- Focus on changes that impact audit categories
- Cross-reference with related files when necessary
Complete Audit Mode
- Scan entire codebase recursively
- Build file inventory with categorization
- Analyze each file against audit rules
- Cross-reference across files for consistency
- Generate comprehensive report
Audit Categories by Mode
Normal Mode
- Technical Problems
- Content Quality
- Mobile Friendliness
- User Experience
- Security
- Accessibility
Strict Mode (Normal +)
- Performance
- Links (internal/external)
- Crawlability
- Schema.org Markup
- URL Structure
- Keyword Analysis
Expert Mode (Strict +)
- E-E-A-T (Expertise, Experience, Authority, Trust)
- Legal Compliance
- Social Media Integration
- Local SEO
- Video Optimization
- Dead Code Detection
- Code Consistency
Audit Rules
SEO Issues
Meta Tags (Error: 9)
# Check: Missing or duplicate meta descriptions
# Example:
<meta name="description" content="Buy shoes"> # โ Too short (< 50 chars)
<meta name="description" content="Shop premium running shoes..."> # โ
Good (50-160)Title Tags (Error: 10)
# Check: Title length, uniqueness, keyword placement
<title>Home</title> # โ Generic, too short
<title>Premium Running Shoes | Brand Name - Shop Now</title> # โ
Optimal (50-60 chars)Canonical URLs (Warning: 8)
<!-- Check: Missing or incorrect canonical tags -->
<link rel="canonical" href="http://example.com/page"> <!-- โ HTTP not HTTPS -->
<link rel="canonical" href="https://example.com/page"> <!-- โ
Correct -->Open Graph (Warning: 6)
<!-- Check: Missing OG tags for social sharing -->
<meta property="og:title" content="Page Title">
<meta property="og:description" content="Description">
<meta property="og:image" content="https://example.com/image.jpg">
<meta property="og:url" content="https://example.com/page">Technical Problems
Broken Links (Error: 9)
# Check: 404s, redirect chains, external link validity
# Detect:
- Dead internal links: <a href="/deleted-page">
- Redirect chains: /a โ /b โ /c (max 1 redirect)
- Broken external: <a href="https://dead-site.com">Redirect Chains (Warning: 7)
# Check: Multiple redirects before final destination
# Example:
/old โ /temp โ /new # โ 2 hops
/old โ /new # โ
1 hopMobile Friendliness (Error: 9)
<!-- Check: Viewport meta, responsive design -->
<!-- Missing viewport: -->
โ No viewport tag
<!-- Correct: -->
โ
<meta name="viewport" content="width=device-width, initial-scale=1">Mixed Content (Error: 10)
<!-- Check: HTTP resources on HTTPS pages -->
<script src="http://example.com/script.js"> <!-- โ HTTP on HTTPS page -->
<script src="https://example.com/script.js"> <!-- โ
HTTPS -->Performance
Page Load Time (Warning: 8)
# Check: Bundle size, render-blocking resources
# Detect:
- Large JS bundles (> 200KB)
- Unminified CSS/JS
- Missing compression (gzip/brotli)
- Render-blocking scripts in <head>Resource Usage (Warning: 6)
// Check: Unused dependencies, duplicate code
// Example:
import { huge-library } from 'library'; // โ Full library import
import { specific-function } from 'library'; // โ
Tree-shaking friendlyCaching (Warning: 7)
# Check: Cache headers, static asset versioning
# Example:
Cache-Control: no-cache # โ Not cached
Cache-Control: public, max-age=31536000 # โ
Long-term cache for static assetsImage Optimization (Warning: 8)
<!-- Check: Format, size, lazy loading -->
<img src="photo.png" width="2000"> <!-- โ Large PNG, not optimized -->
<img src="photo.webp" loading="lazy" width="800"> <!-- โ
WebP, lazy load -->Content Quality
Heading Structure (Warning: 7)
<!-- Check: H1 uniqueness, logical hierarchy -->
<h1>Title</h1>
<h3>Subtitle</h3> <!-- โ Skipped H2 -->
<h1>Title</h1>
<h2>Section</h2> <!-- โ
Correct order -->Image Alt Text (Error: 9)
<!-- Check: Missing alt, decorative images -->
<img src="photo.jpg"> <!-- โ Missing alt -->
<img src="photo.jpg" alt=""> <!-- โ
Decorative (intentionally empty) -->
<img src="photo.jpg" alt="Red sports car on mountain road"> <!-- โ
Descriptive -->Content Analysis (Notice: 5)
# Check: Reading level, thin content, keyword stuffing
# Detect:
- Pages < 300 words (thin content)
- Keyword density > 3% (stuffing)
- Duplicate content across pagesSecurity
Leaked Secrets (Error: 10)
# Check: API keys, passwords, tokens in code
# Detect patterns:
API_KEY = "sk-1234567890abcdef" # โ Exposed secret
PASSWORD = "admin123" # โ Hardcoded password
DB_CONNECTION = "postgres://user:pass@host" # โ Credentials in code
# โ
Use environment variables
API_KEY = os.getenv('API_KEY')HTTPS Usage (Error: 10)
# Check: All resources over HTTPS
# Detect:
http://api.example.com # โ HTTP API
https://api.example.com # โ
HTTPSSecurity Headers (Warning: 8)
# Check: CSP, HSTS, X-Frame-Options, etc.
# Required headers:
Content-Security-Policy: default-src 'self'
Strict-Transport-Security: max-age=31536000
X-Frame-Options: DENY
X-Content-Type-Options: nosniffDependencies (Warning: 7)
# Check: Known vulnerabilities in package.json/requirements.txt
# Flag outdated packages with CVEsAccessibility
Color Contrast (Error: 8)
/* Check: WCAG AA compliance (4.5:1 for normal text) */
.text { color: #777; background: #fff; } /* โ 4.47:1 - Fails AA */
.text { color: #666; background: #fff; } /* โ
5.74:1 - Passes AA */Keyboard Navigation (Error: 9)
<!-- Check: Tab order, focus indicators -->
<div onclick="submit()"> <!-- โ Not keyboard accessible -->
<button onclick="submit()"> <!-- โ
Keyboard accessible -->
<a href="#" style="outline: none;"> <!-- โ Removed focus outline -->
<a href="#"> <!-- โ
Default focus visible -->ARIA Labels (Warning: 7)
<!-- Check: Proper ARIA usage -->
<button>โ๏ธ</button> <!-- โ Icon only, no label -->
<button aria-label="Settings">โ๏ธ</button> <!-- โ
Accessible label -->Form Labels (Error: 9)
<!-- Check: Every input has associated label -->
<input type="text" placeholder="Email"> <!-- โ Placeholder not label -->
<label for="email">Email</label>
<input type="text" id="email"> <!-- โ
Proper label -->User Experience
Form Validation (Warning: 6)
// Check: Client-side validation, error messages
// Example:
<input type="email"> // โ
HTML5 validation
<input type="text"> // โ No validation for email field
// Error messages:
"Invalid" // โ Not helpful
"Please enter a valid email address" // โ
Clear guidanceError Handling (Warning: 7)
// Check: User-friendly error pages, fallbacks
try {
fetchData();
} catch (e) {
console.log(e); // โ Silent failure
}
try {
fetchData();
} catch (e) {
showErrorMessage("Unable to load data. Please try again."); // โ
User feedback
}User Flow (Notice: 5)
# Check: Dead ends, broken checkout flows, complex navigation
# Analyze:
- Pages with no CTA
- Forms with > 10 fields (break into steps)
- Navigation depth > 4 levelsLinks
Broken Internal Links (Error: 9)
<!-- Check: All internal links resolve -->
<a href="/deleted-page">Link</a> <!-- โ 404 -->
<a href="/existing-page">Link</a> <!-- โ
Valid -->External Link Validation (Warning: 6)
# Check: External links return 200, have rel="noopener" for security
<a href="https://external.com" target="_blank"> # โ Missing rel
<a href="https://external.com" target="_blank" rel="noopener noreferrer"> # โ
SecureAnchor Text (Notice: 4)
<!-- Check: Descriptive anchor text -->
<a href="/page">Click here</a> <!-- โ Generic -->
<a href="/page">Read our privacy policy</a> <!-- โ
Descriptive -->E-E-A-T (Expert Mode)
Expertise (Notice: 6)
# Check: Author credentials, bio pages
# Detect:
- Missing author bylines
- No author bio/credentials
- Lack of citations/referencesExperience (Notice: 5)
# Check: First-hand experience indicators
# Look for:
- Personal anecdotes
- Original research
- Case studies
- Product testing detailsAuthority (Notice: 6)
# Check: Domain authority signals
# Analyze:
- Backlinks from authoritative sites
- Industry recognition
- Expert endorsementsTrustworthiness (Warning: 7)
# Check: Trust signals
# Detect:
- Missing contact information
- No privacy policy
- Insecure forms (HTTP)
- Fake reviewsCrawlability (Strict/Expert Mode)
robots.txt (Warning: 7)
# Check: Proper robots.txt configuration
# Issues:
User-agent: *
Disallow: / # โ Blocks all crawlers
User-agent: *
Disallow: /admin/ # โ
Selective blocking
Allow: /Sitemap.xml (Warning: 6)
<!-- Check: Valid sitemap, submitted to search engines -->
<!-- Missing: -->
โ No sitemap.xml found
<!-- Valid: -->
โ
sitemap.xml with < 50,000 URLs, submitted to GSCMeta Robots (Warning: 7)
<!-- Check: Proper indexing directives -->
<meta name="robots" content="noindex, nofollow"> <!-- โ Blocking important page -->
<meta name="robots" content="index, follow"> <!-- โ
Allowing indexing -->Schema Markup (Strict/Expert Mode)
Structured Data (Warning: 7)
<!-- Check: Valid Schema.org markup -->
<!-- Missing: -->
โ No structured data on product page
<!-- Valid: -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Product Name",
"offers": {
"@type": "Offer",
"price": "29.99",
"priceCurrency": "USD"
}
}
</script>Rich Snippets (Notice: 5)
# Check: Breadcrumbs, Reviews, FAQ schema
# Common schemas:
- Product
- Article
- BreadcrumbList
- FAQPage
- ReviewLegal Compliance (Expert Mode)
Privacy Policy (Warning: 8)
# Check: Privacy policy exists, linked in footer, GDPR/CCPA compliant
# Required elements:
- Data collection disclosure
- Cookie usage
- Third-party sharing
- User rights (access, deletion)Terms of Service (Warning: 7)
# Check: ToS exists, clear user agreements
# Required for:
- E-commerce sites
- SaaS platforms
- User-generated contentCookie Consent (Warning: 8)
// Check: GDPR/CCPA cookie consent
// Required:
- Consent banner before tracking
- Opt-out mechanism
- Clear cookie policyAccessibility Compliance (Warning: 9)
# Check: WCAG 2.1 AA compliance (ADA requirement)
# Critical:
- All images have alt text
- Forms are keyboard accessible
- Color contrast meets standards
- Screen reader compatibilitySocial Media (Expert Mode)
Open Graph Validation (Warning: 6)
<!-- Check: Complete OG tags, correct image dimensions -->
<meta property="og:image" content="small.jpg" width="200"> <!-- โ Too small -->
<meta property="og:image" content="large.jpg" width="1200" height="630"> <!-- โ
Optimal -->Twitter Cards (Warning: 5)
<!-- Check: Twitter card meta tags -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Page Title">
<meta name="twitter:image" content="https://example.com/image.jpg">Social Share Buttons (Notice: 3)
# Check: Share buttons present, functional
# Validate:
- Share URLs encode properly
- Open in new window
- Include proper tracking parametersURL Structure (Strict/Expert Mode)
URL Length (Warning: 5)
# Check: URL < 75 characters for optimal display
example.com/very/long/url/path/that/goes/on/forever # โ > 75 chars
example.com/short-page # โ
ConciseHyphens vs Underscores (Notice: 4)
# Check: Hyphens preferred over underscores
example.com/my_page # โ Underscores
example.com/my-page # โ
Hyphens (SEO-friendly)Keywords in URL (Notice: 5)
# Check: Descriptive URLs with keywords
example.com/p=123 # โ No keywords
example.com/running-shoes-men # โ
DescriptiveLocal SEO (Expert Mode)
NAP Consistency (Warning: 8)
# Check: Name, Address, Phone consistent across pages
# Issues:
Footer: "123 Main St"
Contact: "123 Main Street" # โ Inconsistent
# All pages should match exactlyGeo Metadata (Warning: 6)
<!-- Check: Geographic targeting -->
<meta name="geo.region" content="US-CA">
<meta name="geo.placename" content="San Francisco">
<meta name="geo.position" content="37.774929;-122.419415">Local Business Schema (Warning: 7)
{
"@context": "https://schema.org",
"@type": "LocalBusiness",
"name": "Business Name",
"address": {
"@type": "PostalAddress",
"streetAddress": "123 Main St",
"addressLocality": "San Francisco",
"addressRegion": "CA",
"postalCode": "94102"
},
"telephone": "+1-415-555-0100"
}Video SEO (Expert Mode)
VideoObject Schema (Warning: 7)
{
"@context": "https://schema.org",
"@type": "VideoObject",
"name": "Video Title",
"description": "Video description",
"thumbnailUrl": "https://example.com/thumbnail.jpg",
"uploadDate": "2024-01-15",
"duration": "PT2M30S"
}Video Accessibility (Error: 8)
<!-- Check: Captions, transcripts -->
<video>
<source src="video.mp4">
<track kind="captions" src="captions.vtt"> <!-- โ
Captions -->
</video>Dead Code Detection (Expert Mode)
Unused Imports (Notice: 4)
// Check: Imported but never used
import { unused } from 'library'; // โ Never referenced
import { used } from 'library';
const result = used(); // โ
UsedUnreachable Code (Warning: 6)
// Check: Code after return/throw
function example() {
return true;
console.log("Never runs"); // โ Unreachable
}Duplicate Code (Notice: 5)
# Check: Identical code blocks > 5 lines
# Suggest: Extract to shared functionCode Consistency (Expert Mode)
Naming Conventions (Notice: 4)
// Check: Consistent camelCase, PascalCase, snake_case
const user_name = ""; // โ Inconsistent with camelCase
const userName = ""; // โ
ConsistentFile Organization (Notice: 3)
# Check: Similar files grouped logically
/components/Button.jsx
/styles/button.css # โ Separated
/components/Button.jsx
/components/Button.css # โ
Co-locatedReport Output
Generate a comprehensive report with:
1. Health Score (0-100)
Overall Score: 73/100 ๐ก
Calculation:
- Critical errors: -5 points each
- Warnings: -2 points each
- Notices: -0.5 points each2. Category Breakdown
๐ Category Scores:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
SEO โโโโโโโโโโ 82/100
Technical โโโโโโโโโโ 65/100
Performance โโโโโโโโโโ 71/100
Security โโโโโโโโโโ 54/100 โ ๏ธ
Accessibility โโโโโโโโโโ 78/100
UX โโโโโโโโโโ 73/100
Content โโโโโโโโโโ 81/1003. Issue Summary
๐ด Critical (10): 3 issues
๐ก Warnings (7-9): 12 issues
๐ต Notices (1-6): 8 issues
Top Priority Fixes:
1. [Error-10] Leaked API keys in config.js
2. [Error-10] Missing HTTPS on checkout flow
3. [Error-9] 15 broken internal links4. Detailed Findings
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ด SECURITY: Leaked Secrets (Error, Rank: 10)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Issue: Hardcoded API key found in codebase
File: src/config.js:12
Code:
const API_KEY = "sk-1234567890abcdef";
Fix:
const API_KEY = process.env.API_KEY;
Impact: Critical security vulnerability
Priority: Fix immediately
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ5. Actionable Recommendations
Quick Wins (< 1 hour):
โ Add missing alt text to 8 images
โ Fix 3 broken internal links
โ Add viewport meta tag to mobile.html
High Impact (1-4 hours):
โ Implement HTTPS across all pages
โ Add security headers to server config
โ Optimize 12 large images to WebP
Strategic (> 4 hours):
โ Implement comprehensive Schema.org markup
โ Build XML sitemap and submit to GSC
โ Conduct full accessibility audit and remediation6. Files Analyzed
Total Files: 247
Analyzed: 189
Skipped: 58 (node_modules, .git, build artifacts)
File Types:
- HTML: 34 files
- CSS: 28 files
- JavaScript: 67 files
- Images: 45 files
- Other: 15 filesOutput Format
Always use concise examples rather than verbose explanations. Show code snippets with โ (bad) and โ (good) examples.
Issue template:
[Severity-Rank] Category: Issue Title
File: path/to/file.ext:line
Problem: Brief description
Example: Code snippet
Fix: Corrected code
Impact: User/SEO/Security impact
Priority: When to fixSeverity Levels
- Error (10): Critical issues that break functionality or pose security risks
- Error (9): Major issues affecting SEO, accessibility, or user experience
- Error (8): Serious issues with measurable impact
- Warning (7-8): Important but not critical
- Warning (6-7): Moderate impact
- Warning (5-6): Minor improvements
- Notice (4-5): Best practices
- Notice (1-3): Optional enhancements
Tech Stack Detection
Auto-detect framework/CMS and apply specific rules:
- React: Check hooks, component structure, prop-types
- Next.js: Check SSR/SSG, routing, Image component
- WordPress: Check theme functions, plugins, database queries
- Vue: Check composition API, reactivity
- Django/Flask: Check templates, ORM queries, middleware
Execution Notes
- Prefer concise examples over verbose explanations
- Show visual indicators: โ โ ๐ด ๐ก ๐ต
- Provide immediate actionable fixes
- Rank issues by business impact
- Include estimated fix time
- Cross-reference related issues
- Detect patterns (e.g., all images missing alt text)
- Suggest batch fixes when applicable
Git Integration (PR Mode)
# Get uncommitted changes
git status --porcelain
git diff HEAD
# Analyze only:
- Modified files (M)
- Added files (A)
- Renamed files (R)
# Compare with main branch
git diff main...HEADFile Exclusions
Always skip:
- node_modules/
- .git/
- dist/, build/, .next/
- vendor/
- *.min.js, *.min.css
- package-lock.json, yarn.lock
- Binary files (images analyzed separately)
Final Report Structure
# Codebase Audit Report
**Mode**: [Normal/Strict/Expert]
**Type**: [Complete Audit/PR Review]
**Date**: YYYY-MM-DD
**Files Analyzed**: N
## Executive Summary
[Overall score, top issues, quick wins]
## Health Score: XX/100
[Visual score breakdown]
## Critical Issues (Fix Immediately)
[Top 5 errors ranked 9-10]
## Important Issues (Fix Soon)
[Warnings ranked 7-8]
## Recommendations (Improve Over Time)
[Notices and strategic improvements]
## Category Details
[Detailed breakdown by category]
## Appendix
[Full file list, methodology, tool versions]