Frontend-Quality
Enables auditing static HTML/CSS projects for code quality, unused dependencies, accessibility, responsive layout, and asset issues, with auto-fix for safe problems.
Generates SARIF reports that can be uploaded to GitHub code scanning, allowing audit findings to appear as alerts and inline annotations on pull requests.
Enables auditing Next.js projects for code quality, unused dependencies, accessibility, responsive layout, and asset issues, with auto-fix for safe problems.
Enables auditing React projects for code quality, unused dependencies, accessibility, responsive layout, and asset issues, with auto-fix for safe problems.
Enables auditing Remix projects for code quality, unused dependencies, accessibility, responsive layout, and asset issues, with auto-fix for safe problems.
Enables auditing Tailwind CSS projects for code quality, unused dependencies, accessibility, responsive layout, and asset issues, with auto-fix for safe problems.
Enables auditing TypeScript projects for code quality, unused dependencies, accessibility, responsive layout, and asset issues, with auto-fix for safe problems.
Enables auditing Vite-based projects for code quality, unused dependencies, accessibility, responsive layout, and asset issues, with auto-fix for safe problems.
Frontend Quality Auditor
A CLI tool and AI agent skill that audits your frontend projects — finds dead code, unused deps, accessibility issues, and responsive layout bugs. Then it generates a clear report and can auto-fix the safe stuff.
Built this because I got tired of shipping code with leftover console.log statements, 3MB hero images, and packages sitting in package.json that nobody actually imports. This tool catches all of that.
Install
As an AI Agent Skill
Option 1: Using the MCP Server (Recommended for Claude Desktop, Cursor, etc.) You can plug this tool directly into any AI that supports the Model Context Protocol (MCP) without cloning anything! Just add this to your AI's MCP settings file:
{
"mcpServers": {
"frontend-auditor": {
"command": "npx",
"args": ["-y", "frontend-quality-auditor", "mcp"]
}
}
}Option 2: Manual Clone If your agent doesn't support MCP yet, clone it into your agent's skills folder:
# Gemini / Antigravity
git clone https://github.com/abdelrhmanahmed255/Frontend-Quality.git ~/.gemini/skills/frontend-quality-auditor
# Claude Code
git clone https://github.com/abdelrhmanahmed255/Frontend-Quality.git ~/.claude/skills/frontend-quality-auditor
# Cursor
git clone https://github.com/abdelrhmanahmed255/Frontend-Quality.git ~/.cursor/skills/frontend-quality-auditorInstall the CLI's dependencies once inside the cloned folder:
cd ~/.claude/skills/frontend-quality-auditor # or the folder you cloned into
npm installThen just tell your agent something like:
"Audit my project for code quality and responsive issues"
As a CLI
# run directly without installing
npx frontend-quality-auditor audit .
# or install globally
npm install -g frontend-quality-auditorAs a Project Dependency (Recommended)
To run audits in CI or as a regular check before committing:
npm install --save-dev frontend-quality-auditorThen add scripts to your package.json:
{
"scripts": {
"audit": "frontend-quality-auditor audit .",
"audit:fix": "frontend-quality-auditor fix --safe",
"audit:ci": "frontend-quality-auditor audit . --strict --format=sarif"
}
}Run them using:
npm run audit
npm run audit:fixRelated MCP server: MCP Frontend Analyzer
Usage
# Full audit — prints to terminal + saves a markdown report
frontend-auditor audit
# Same audit but on a specific directory
frontend-auditor audit ./my-app
# Get suggestions without touching any files
frontend-auditor suggest
# Auto-fix safe issues (removes console.log, debugger, etc.)
frontend-auditor fix --safe
# Exit with code 1 when there is any P0 or P1 finding (useful as a CI gate)
frontend-auditor audit --fail-on=P1The audit generates a markdown report at audit-reports/FRONTEND_AUDIT_REPORT.md with severity ratings, quick wins, and file-level evidence.
Options
Option | What it does |
| Print the report as JSON and save it to |
| Only write the markdown report (no terminal report) |
| Write the report file to a custom path |
| Show every finding in the terminal instead of the top 15 |
| Also run the browser audit against a running app (see below) |
| With |
| Exit with code 1 when the health score is below |
Browser audit
Start your dev server, then pass its URL:
npx playwright install chromium # one-time browser download
frontend-auditor audit . --url=http://localhost:3000The page is loaded in headless Chromium at 8 widths (320px to 1440px) and checked for horizontal overflow (with the elements causing it), images without alt, and small touch targets on mobile.
CI
--strict turns the health score into a pass/fail check:
# fail the job if the health score drops below 80
npx frontend-quality-auditor audit . --strict=80The health score starts at 100 and loses 20 points per P0, 10 per P1, 5 per P2, and 2 per P3 finding.
What It Checks
Category | What it looks for |
Code Quality |
|
Imports | Unused imports that are imported but never referenced in the file |
Dependencies | Packages in |
Assets | Images over 500KB, old formats (PNG/JPG) that should be WebP/AVIF, unreferenced files |
Responsive | Horizontal scroll overflow, broken grids, elements bleeding outside viewport |
Accessibility | Missing |
Every finding gets a severity level:
P0 — breaks the page, fix now
P1 — major problem, fix before shipping
P2 — noticeable issue, fix when you can
P3 — minor cleanup, nice to have
GitHub code scanning
--format=sarif writes audit-reports/FRONTEND_AUDIT_REPORT.sarif, which GitHub can show as code scanning alerts and inline annotations on pull requests:
- run: npx frontend-quality-auditor audit . --format=sarif
- uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: audit-reports/FRONTEND_AUDIT_REPORT.sarif
category: frontend-qualityThe job needs permissions: security-events: write for the upload. P0/P1 findings become errors, P2 warnings, and P3 notes. Browser findings from --url have no source file, so they are only in the other report formats.
Config
Drop a config/auditor.config.json in your project root to customize thresholds:
{
"viewports": [375, 768, 1280],
"audit": {
"codeQuality": true,
"dependencies": true,
"assets": true
},
"rules": {
"maxAssetSizeKB": 500,
"maxComponentLines": 300,
"disallowConsole": true,
"disallowDebugger": true,
"checkUnusedImports": true,
"checkUnusedDeps": true
},
"reporting": {
"outputDir": "./audit-reports"
}
}Option | Effect |
| Widths (px) tested by the browser audit ( |
| Set to |
| Images above this size are reported as oversized. |
| Files longer than this are reported as monster components. |
| Set to |
| Set to |
| Where report files are written, relative to the audited project. |
Any option you leave out keeps its default, and if no config file exists the defaults are used.
Supported Frameworks
Auto-detects your setup:
Next.js (App Router & Pages Router)
React + Vite / CRA
Remix
Static HTML/CSS
Tailwind CSS
TypeScript
Project Structure
Frontend-Quality/
├── .github/workflows/
│ └── npm-publish.yml # Publishes to npm on v* tags
├── bin/
│ └── auditor.mjs # CLI entrypoint
├── config/
│ └── auditor.config.json # Default configuration
├── rules/ # Reference docs for each audit category
│ ├── accessibility.md
│ ├── assets.md
│ ├── code-quality.md
│ ├── dependencies.md
│ ├── performance.md
│ ├── responsive.md
│ └── ux.md
├── src/
│ ├── index.mjs # Main orchestrator
│ ├── config-loader.mjs # Reads and merges config
│ ├── analyzers/
│ │ ├── project-detector.mjs # Detects framework, TS, Tailwind
│ │ ├── route-discovery.mjs # Finds all routes
│ │ ├── import-analyzer.mjs # Unused import detection
│ │ ├── dependency-analyzer.mjs
│ │ ├── asset-analyzer.mjs
│ │ ├── code-analyzer.mjs # console.log, debugger, etc.
│ │ ├── browser-analyzer.mjs # DOM checks that run inside the page
│ │ └── run-browser-audit.mjs # Drives Playwright across viewports (--url)
│ ├── reporters/
│ │ ├── terminal.mjs
│ │ ├── markdown.mjs
│ │ └── json.mjs
│ ├── fixes/
│ │ ├── safe-fixes.mjs # Removes console.log, debugger, unused imports
│ │ └── approval-required.mjs
│ └── utils/
│ └── safe-string-search.mjs # Blanks strings/comments before matching code
├── assets/
│ └── banner.jpg
├── CHANGELOG.md
├── CONTRIBUTING.md
├── SKILL.md # Agent skill specification
├── package.json
├── LICENSE
└── README.mdContributing
Got a bug or feature idea? Open an issue first so we can talk about it, then submit a PR. Keep it simple.
License
MIT © Abdelrhman Ahmed
This server cannot be deployed
Maintenance
Related MCP Connectors
Scan any MCP server for tool-poisoning, security, auth & license. Trust score before install.
Scan any public GitHub MCP-server repo for security issues. 37 MCP-specific L1 rules, 8 languages.
Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceProvides comprehensive code quality tools including linting, security scanning, TypeScript checking, and testing through a single MCP server. Integrates multiple quality analysis tools like Biome, ESLint, and Playwright for streamlined development workflows.-
- FlicenseAqualityDmaintenanceA comprehensive MCP server for frontend analysis. It provides Google Lighthouse audits, code quality checks, SEO metadata verification, accessibility analysis, and bundle optimization for React and Next.js projects.83-
- AlicenseNot gradedqualityDmaintenanceA local MCP server that provides Sonar-grade static analysis (bugs, vulnerabilities, code smells) for TypeScript/JS and C# repositories, with CLI and dashboard support.MIT
- FlicenseAqualityDmaintenanceAn MCP server implementing a 7-stage agentic frontend workflow—from design audit to PR review—including AI-driven component generation, browser validation, E2E testing, and CI self-healing.44 npm-