mcpField
G
generic-static-code-reviewer

generic-static-code-reviewer

github.com/travisjneumanTesting & quality106144 installsUpdated 1d ago
Repository

About generic-static-code-reviewer

A code review skill for developers checking static-site HTML, CSS, and JavaScript before committing. It supplements a general review method with checks for browser support, responsive layouts, file sizes, and Lighthouse metrics.

Key features

  1. 01HTML, CSS, and JavaScript checks
  2. 02Browser and responsive checks
  3. 03Static file size targets
  4. 04Lighthouse metric checks

Use cases

  1. 01Reviewing static-site changes before commit
  2. 02Checking layouts across screen sizes
  3. 03Verifying performance, accessibility, and SEO metrics

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/travisjneuman/.claude --skill generic-static-code-reviewer

After installing, type/generic-static-code-reviewerin Claude Code to confirm it loaded.

Details

From the project README

Static Site Code Reviewer

Review HTML/CSS/JS code against production quality standards.

Extends: Generic Code Reviewer - Read base skill for full code review methodology, P0/P1/P2 priority system, and judgment calls.

Pre-Commit Checklist

# Local testing (cross-platform options)
python -m http.server 8000   # Windows
python3 -m http.server 8000  # macOS/Linux
npx serve .                  # Node.js (recommended - all platforms)

# Visual inspection
# - Test in Chrome, Firefox, Safari
# - Test at 375px, 768px, 1024px
# - Lighthouse audit
  • Visual inspection passed
  • Works in all major browsers
  • Responsive at all breakpoints
  • Lighthouse Performance 95+

Static-Specific Checks

No Build Tools Verification

Files should be served as-is:

  • Pure .html files (no templating)
  • Pure .css files (no Sass/Less)
  • Pure .js files (no bundling/transpilation)
  • No node_modules required for production
Page Weight Targets (P1)
TargetMax Size
HTML< 5KB
CSS< 10KB
JavaScript< 5KB
Total (excl. images)< 50KB
Images (each)< 500KB
HTML Quality
<!-- Semantic structure -->
<header>
  <nav><a href="#">Link</a></nav>
</header>
<main>
  <article>
    <h1>Title</h1>
    <p>Content</p>
  </article>
</main>
<footer></footer>

<!-- Void elements (no closing slash needed in HTML5) -->
<img src="image.jpg" alt="Description" />
<br />
<input type="text" />
CSS Quality
/* CSS custom properties for theming */
:root {
  --bg-primary: #000000;
  --text-primary: #ffffff;
  --accent: #00ff00;
}

/* Mobile-first responsive */
.container {
  padding: 1rem;
}

@media (min-width: 768px) {
  .container {
    padding: 2rem;
  }
}

/* Avoid !important - signals specificity problems */
JavaScript Quality
// ES6+ syntax (modern browsers support it)
const items = document.querySelectorAll(".item");
const handler = (e) => console.log(e.target);

// Event delegation (preferred)
document.body.addEventListener("click", (e) => {
  if (e.target.matches(".button")) {
    handleClick(e.target);
  }
});

// No jQuery dependencies
// No framework overhead

Lighthouse Requirements (P1)

MetricTarget
Performance95+
Accessibility90+
Best Practices100
SEO100
First Contentful Paint< 1s

See Also

Comments

Markdown supported