Agent skill · software engineering · davila7
best-practices
Apply modern web development best practices for security, compatibility, and code quality. Use when asked to "apply best practices", "security audit", "modernize code", "code quality review", or "check for vulnerabilities".
Why this skill is useful
Codifies modern web development best practices for security and compatibility, which the AI could infer but now doesn't have to guess.
What it needs
About 6k tokens when loaded. Last updated 2026-08-06. 30,138 stars on the source repository.
What this skill does
Best practices Modern web development standards based on Lighthouse best practices audits. Covers security, browser compatibility, and code quality patterns. Security HTTPS everywhere Enforce HTTPS: HSTS Header: Content Security Policy (CSP) CSP Header (recommended): Using nonces for inline scripts: Security headers No vulnerable libraries Keep dependencies updated: Known vulnerable patterns to avoid: Input sanitization Secure cookies --- Browser compatibility Doctype declaration Character encoding Viewport meta tag Feature detection Polyfills (when needed) --- Deprecated APIs Avoid these Event listener passive --- Console & errors No console errors Error boundaries (React) Global error handler --- Source maps Production configuration --- Performance best practices Avoid blocking patterns Efficient event handlers Memory management --- Code quality Valid HTML Semantic HTML Image aspect ratios --- Permissions & privacy Request permissions properly Permissions policy --- Audit checklist Security (critical) [ ] HTTPS enabled, no mixed content [ ] No vulnerable dependencies (npm audit) [ ] CSP headers configured [ ] Security headers present [ ] No exposed source maps Compatibility [ ] Valid HTML5 doctype [ ] Charset declared first in head [ ] Viewport meta tag present [ ] No deprecated APIs used [ ] Passive event listeners for scroll/touch Code quality [ ] No console errors [ ] Valid HTML (no duplicate IDs) [ ] Semantic HTML elements used [ ] Proper error handling [ ] Memory cleanup in components UX [ ] No intrusive interstitials [ ] Permission requests in context [ ] Clear error messages [ ] Appropriate image aspect ratios Tools Tool Purpose ------ --------- npm audit Dependency vulnerabilities SecurityHeaders.com Header analysis W3C Validator HTML validation Lighthouse Best practices audit Observatory Security scan References MDN Web Security OWASP Top 10 Web Quality Audit
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills davila7/best-practices