Best Practices
Best Practices automation and integration for reliable and high-quality workflow standards
Best Practices is a community skill for applying web development quality standards, covering performance optimization, accessibility compliance, SEO best practices, security hardening, and cross-browser compatibility for production web applications.
What Is This?
Overview
Best Practices provides patterns for auditing and improving web application quality across multiple dimensions. It covers performance optimization that identifies render-blocking resources, large payloads, and inefficient loading patterns, accessibility compliance that checks WCAG conformance including color contrast, ARIA attributes, and keyboard navigation, SEO best practices that verify meta tags, structured data, and crawlability for search engine visibility, security hardening that reviews HTTPS usage, content security policies, and dependency vulnerabilities, and cross-browser compatibility that tests CSS features and JavaScript APIs across target browsers. The skill enables systematic quality improvement for web projects.
Who Should Use This
This skill serves frontend developers preparing sites for production launch, QA teams auditing web applications against quality benchmarks, and engineering leads establishing coding standards for web projects.
Why Use It?
Problems It Solves
Performance issues like large bundles and unoptimized images degrade user experience. Accessibility gaps exclude users with disabilities and create legal liability. SEO problems reduce organic search visibility. Security weaknesses expose applications to attacks and data breaches.
Core Highlights
Performance auditor identifies loading bottlenecks and optimization opportunities. Accessibility checker validates WCAG AA compliance across page elements. SEO scanner verifies meta tags, headings, and structured data. Security reviewer checks headers, HTTPS, and dependency vulnerabilities.
How to Use It?
Basic Usage
// Web quality audit runner
class QualityAuditor {
constructor(url) {
this.url = url;
this.results = {};
}
async auditPerformance() {
const entries =
performance
.getEntriesByType(
'resource');
const large = entries
.filter(
e => e.transferSize
> 100_000)
.map(e => ({
name: e.name,
size: Math.round(
e.transferSize
/ 1024),
}));
this.results
.performance = {
largeResources: large,
totalSize: entries
.reduce((s, e) =>
s + e.transferSize,
0),
};
}
auditAccessibility() {
const images =
document
.querySelectorAll(
'img');
const missingAlt = []
images.forEach(img => {
if (!img.alt) {
missingAlt.push(
img.src);
}
});
this.results
.accessibility = {
missingAlt,
total: images.length,
};
}
}Real-World Examples
// SEO and security checks
function auditSEO() {
const checks = {};
const title =
document.title;
checks.title = {
exists: !!title,
length: title.length,
optimal:
title.length >= 30
&& title.length <= 60,
};
const desc = document
.querySelector(
'meta[name="description'
+ '"]');
checks.description = {
exists: !!desc,
length:
desc?.content?.length
|| 0,
};
const h1s = document
.querySelectorAll('h1');
checks.h1 = {
count: h1s.length,
optimal:
h1s.length === 1,
};
return checks;
}
function auditSecurity() {
return {
https:
location.protocol
=== 'https:',
mixedContent:
document
.querySelectorAll(
'[src^="http:"]')
.length,
};
}Advanced Tips
Run Lighthouse CI in your deployment pipeline to catch regressions before production. Set performance budgets for bundle sizes and largest contentful paint to enforce standards automatically. Use axe-core for automated accessibility testing that covers more rules than manual review. Monitor Core Web Vitals metrics in production with Real User Monitoring to catch issues that lab testing misses.
When to Use It?
Use Cases
Audit a web application before launch against performance, accessibility, and SEO benchmarks. Integrate quality checks into a CI pipeline to prevent regressions. Generate a quality report for stakeholders showing compliance status across all audit categories.
Related Topics
Web performance, accessibility, SEO, security, and quality assurance.
Important Notes
Requirements
Browser environment for DOM-based audits. Lighthouse or equivalent tool for comprehensive scoring. axe-core library for detailed accessibility rule evaluation. Node.js environment for running CI-integrated audit scripts.
Usage Recommendations
Do: automate audits in CI to catch quality regressions early. Prioritize fixing critical accessibility issues that block users. Set measurable performance budgets and track them over time.
Don't: treat audit scores as the sole measure of quality since automated tools miss contextual issues. Ignore accessibility findings as low priority when they affect real users. Delay security fixes for convenience when vulnerabilities are identified.
Limitations
Automated audits cannot catch all usability and accessibility issues that manual testing reveals. Performance measurements vary based on network conditions and device hardware. Security scanning does not replace professional penetration testing for critical applications. Audit tools report on current page state and may not catch issues that appear only under specific user interactions or data conditions.
More Skills You Might Like
Explore similar skills to enhance your workflow
Pyopenms
Advanced PyOpenMS automation and integration for mass spectrometry data processing
Airtable Automation
Automate Airtable tasks via Rube MCP (Composio): records, bases, tables, fields, views. Always search tools first for current schemas
Ab Test Setup
When the user wants to plan, design, or implement an A/B test or experiment. Also use when the user mentions "A/B test," "split test," "experiment," "
Hackernews Automation
Automate Hackernews operations through Composio's Hackernews toolkit
Long Context
Optimize long-context window processing and automated retrieval-augmented integration
Threejs Loaders
Efficiently load and manage Three.js assets with automation and integration tools