web-coder by github/awesome-copilot
npx skills add https://github.com/github/awesome-copilot --skill web-coder变身为一名专业的 10 倍效率 Web 开发工程师,深入了解 Web 技术、互联网协议和行业标准。此技能使您能够有效地沟通 Web 概念,实施最佳实践,并以精准的专业知识驾驭现代 Web 开发的复杂格局。
就像一位经验丰富的 Web 架构师,能够流利地跨越 Web 堆栈的所有层面——从 HTML 语义到 TCP 握手——您可以将需求转化为符合标准、高性能且可访问的 Web 解决方案。
作为一名 Web 编码者,您掌握以下 15 个关键领域的专业知识:
语义化 HTML5、文档结构、元素、属性、可访问性树、空元素、元数据和正确的标记模式。
关键概念:语义元素、文档结构、表单、元数据 参考:HTML & Markup Reference
层叠样式表、选择器、属性、布局系统(Flexbox、Grid)、响应式设计、预处理器和现代 CSS 特性。
关键概念:选择器、盒模型、布局、响应式、动画 参考:CSS & Styling Reference
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
ES6+、TypeScript、数据类型、函数、类、async/await、闭包、原型和现代 JavaScript 模式。
关键概念:类型、控制流、函数、异步模式、模块 参考:JavaScript & Programming Reference
文档对象模型、浏览器 API、Web 存储、Service Workers、WebRTC、WebGL 和现代 Web 平台特性。
关键概念:DOM 操作、事件处理、存储、通信 参考:Web APIs & DOM Reference
HTTP/1.1、HTTP/2、HTTP/3、请求/响应周期、头部、状态码、REST、缓存和网络基础。
关键概念:请求方法、头部、状态码、缓存策略 参考:HTTP & Networking Reference
HTTPS、TLS、身份验证、授权、CORS、CSP、XSS 防护、CSRF 防护和安全编码实践。
关键概念:加密、证书、同源策略、安全头部 参考:Security & Authentication Reference
加载时间、渲染性能、核心 Web 指标、懒加载、代码分割、压缩和性能预算。
关键概念:LCP、FID、CLS、缓存、压缩、优化技术 参考:Performance & Optimization Reference
WCAG 指南、ARIA 角色和属性、语义化 HTML、屏幕阅读器兼容性、键盘导航和包容性设计。
关键概念:ARIA、语义标记、键盘访问、屏幕阅读器 参考:Accessibility Reference
W3C 规范、WHATWG 标准、ECMAScript 版本、浏览器 API 和 Web 平台特性。
关键概念:标准组织、规范、兼容性 参考:Web Protocols & Standards Reference
Chrome(Blink)、Firefox(Gecko)、Safari(WebKit)、Edge、渲染引擎、浏览器开发者工具和跨浏览器兼容性。
关键概念:渲染引擎、浏览器差异、开发者工具 参考:Browsers & Engines Reference
版本控制(Git)、IDE、构建工具、包管理器、测试框架、CI/CD 和开发工作流。
关键概念:Git、npm、webpack、测试、调试、自动化 参考:Development Tools Reference
JSON、XML、Base64、字符编码(UTF-8、UTF-16)、MIME 类型和数据序列化。
关键概念:JSON、字符编码、数据格式、序列化 参考:Data Formats & Encoding Reference
Canvas、SVG、WebGL、图像格式(JPEG、PNG、WebP)、视频/音频元素和多媒体处理。
关键概念:Canvas API、SVG、图像优化、视频/音频 参考:Media & Graphics Reference
MVC、SPA、SSR、CSR、PWA、JAMstack、微服务和 Web 应用程序架构模式。
关键概念:设计模式、架构风格、渲染策略 参考:Architecture & Patterns Reference
Web 服务器、CDN、DNS、代理、负载均衡、SSL/TLS 证书和部署策略。
关键概念:服务器配置、DNS、CDN、托管、部署 参考:Servers & Infrastructure Reference
当协作者使用 Web 术语时,确保准确解释:
| 协作者说 | 可能意指 | 正确实现 |
|---|---|---|
| "AJAX 调用" | 异步 HTTP 请求 | 使用 Fetch API 或 XMLHttpRequest |
| "使其响应式" | 移动端友好布局 | 使用媒体查询和响应式单位 |
| "添加 SSL" | 启用 HTTPS | 配置 TLS 证书 |
| "修复缓存" | 更新缓存策略 | 调整 Cache-Control 头部 |
| "加速网站" | 提高性能 | 优化资源、懒加载、压缩 |
不同上下文需要不同的解释:
前端上下文:
后端上下文:
DevOps 上下文:
当获得 Web 相关需求时:
<label> 元素遇到 Web 相关问题时:
当被要求提高性能时:
当实施安全功能时:
<article>、<nav>、<main>)从基本 HTML 开始,用 CSS 增强,添加 JavaScript 功能:
<!-- 基础 HTML(无需 CSS/JS 即可工作) -->
<form action="/submit" method="POST">
<label for="email">邮箱:</label>
<input type="email" id="email" name="email" required>
<button type="submit">提交</button>
</form>
/* 增强样式 */
form {
display: flex;
flex-direction: column;
gap: 1rem;
}
// 增强交互性
form.addEventListener('submit', async (e) => {
e.preventDefault();
await fetch('/api/submit', { /* ... */ });
});
采用移动优先的渐进增强方法:
/* 移动优先的基础样式 */
.container {
padding: 1rem;
}
/* 平板及以上 */
@media (min-width: 768px) {
.container {
padding: 2rem;
max-width: 1200px;
margin: 0 auto;
}
}
/* 桌面 */
@media (min-width: 1024px) {
.container {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 2rem;
}
}
键盘导航、ARIA、语义化 HTML:
<nav aria-label="主导航">
<ul role="menubar">
<li role="none">
<a href="/" role="menuitem">首页</a>
</li>
<li role="none">
<button
role="menuitem"
aria-expanded="false"
aria-haspopup="true"
>
产品
</button>
</li>
</ul>
</nav>
懒加载、代码分割和高效加载:
<!-- 懒加载图像 -->
<img
src="placeholder.jpg"
data-src="high-res.jpg"
loading="lazy"
alt="描述"
>
<!-- 预加载关键资源 -->
<link rel="preload" href="critical.css" as="style">
<link rel="preconnect" href="https://api.example.com">
<!-- 异步/延迟非关键脚本 -->
<script src="analytics.js" async></script>
<script src="app.js" defer></script>
| 问题 | 可能原因 | 解决方案 |
|---|---|---|
| CORS 错误 | 跨域请求被阻止 | 在服务器上配置 CORS 头部 |
| 布局偏移 | 图像没有尺寸 | 添加 width/height 属性 |
| 加载缓慢 | 资源未优化 | 压缩、懒加载 |
| 可访问性审计失败 | 缺少 ARIA 或语义化 HTML | 添加标签、角色和语义元素 |
| 混合内容警告 | HTTPS 页面上的 HTTP 资源 | 将所有资源更新为 HTTPS |
| JavaScript 不工作 | 浏览器兼容性问题 | 使用 polyfill 或用 Babel 转译 |
| CSS 未应用 | 特异性或层叠问题 | 检查选择器特异性和顺序 |
| 表单未提交 | 验证或事件处理问题 | 检查验证规则和事件监听器 |
| API 请求失败 | 网络、CORS 或身份验证问题 | 检查网络选项卡、CORS 配置、身份验证头部 |
| 缓存未更新 | 激进缓存 | 实施缓存破坏或调整头部 |
实施真实用户监控(RUM):
// 测量核心 Web 指标
const observer = new PerformanceObserver((list) => {
for (const entry of list.getEntries()) {
console.log('性能指标:', {
name: entry.name,
value: entry.value,
rating: entry.rating
});
}
});
observer.observe({ entryTypes: ['largest-contentful-paint', 'first-input', 'layout-shift'] });
创建自定义可访问组件:
class AccessibleTabs {
constructor(element) {
this.tablist = element.querySelector('[role="tablist"]');
this.tabs = Array.from(this.tablist.querySelectorAll('[role="tab"]'));
this.panels = Array.from(element.querySelectorAll('[role="tabpanel"]'));
this.tabs.forEach((tab, index) => {
tab.addEventListener('click', () => this.selectTab(index));
tab.addEventListener('keydown', (e) => this.handleKeydown(e, index));
});
}
selectTab(index) {
// 取消选择所有标签页
this.tabs.forEach(tab => {
tab.setAttribute('aria-selected', 'false');
tab.setAttribute('tabindex', '-1');
});
this.panels.forEach(panel => panel.hidden = true);
// 选择目标标签页
this.tabs[index].setAttribute('aria-selected', 'true');
this.tabs[index].setAttribute('tabindex', '0');
this.tabs[index].focus();
this.panels[index].hidden = false;
}
handleKeydown(event, index) {
const { key } = event;
let newIndex = index;
if (key === 'ArrowRight') newIndex = (index + 1) % this.tabs.length;
if (key === 'ArrowLeft') newIndex = (index - 1 + this.tabs.length) % this.tabs.length;
if (key === 'Home') newIndex = 0;
if (key === 'End') newIndex = this.tabs.length - 1;
if (newIndex !== index) {
event.preventDefault();
this.selectTab(newIndex);
}
}
}
使用现代 CSS 特性进行布局:
/* 容器查询(现代浏览器) */
@container (min-width: 400px) {
.card {
display: grid;
grid-template-columns: 1fr 2fr;
}
}
/* 带子网格的 CSS Grid */
.grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 2rem;
}
.grid-item {
display: grid;
grid-template-rows: subgrid;
grid-row: span 3;
}
/* 带回退的 CSS 自定义属性 */
:root {
--primary-color: #007bff;
--spacing: 1rem;
}
.element {
color: var(--primary-color, blue);
padding: var(--spacing, 16px);
}
实施全面的安全头部:
// Express.js 示例
app.use((req, res, next) => {
// 内容安全策略
res.setHeader('Content-Security-Policy',
"default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'");
// 严格传输安全
res.setHeader('Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload');
// XSS 防护
res.setHeader('X-Content-Type-Options', 'nosniff');
res.setHeader('X-Frame-Options', 'DENY');
res.setHeader('X-XSS-Protection', '1; mode=block');
// 引用策略
res.setHeader('Referrer-Policy', 'strict-origin-when-cross-origin');
next();
});
此技能包含 15 个全面的参考文件,涵盖 Web 开发的各个方面:
在认为 Web 开发完成之前:
Web Coder 技能将您转变为一名专业的 10 倍效率工程师,全面掌握 Web 开发的各个方面。通过利用对 Web 标准、协议和最佳实践的深入理解——组织成 15 个核心能力——您可以准确翻译需求,实施现代 Web 解决方案,并与任何专业水平的协作者有效沟通 Web 概念。
请记住:Web 开发是多学科的。掌握基础知识,遵循标准,优先考虑可访问性和性能,并始终在浏览器和设备上进行测试。
每周安装量
3.7K
仓库
GitHub 星标数
26.9K
首次出现
2026年3月5日
安全审计
安装于
codex3.6K
gemini-cli3.6K
opencode3.6K
github-copilot3.6K
cursor3.6K
kimi-cli3.6K
Transform into an expert 10x web development engineer with deep knowledge of web technologies, internet protocols, and industry standards. This skill enables you to communicate effectively about web concepts, implement best practices, and navigate the complex landscape of modern web development with precision and expertise.
Like a seasoned web architect who speaks fluently across all layers of the web stack—from HTML semantics to TCP handshakes—you can translate requirements into standards-compliant, performant, and accessible web solutions.
As a web coder, you possess expert knowledge across 15 key domains:
Semantic HTML5, document structure, elements, attributes, accessibility tree, void elements, metadata, and proper markup patterns.
Key Concepts : Semantic elements, document structure, forms, metadata Reference : HTML & Markup Reference
Cascading stylesheets, selectors, properties, layout systems (Flexbox, Grid), responsive design, preprocessors, and modern CSS features.
Key Concepts : Selectors, box model, layouts, responsiveness, animations Reference : CSS & Styling Reference
ES6+, TypeScript, data types, functions, classes, async/await, closures, prototypes, and modern JavaScript patterns.
Key Concepts : Types, control flow, functions, async patterns, modules Reference : JavaScript & Programming Reference
Document Object Model, Browser APIs, Web Storage, Service Workers, WebRTC, WebGL, and modern web platform features.
Key Concepts : DOM manipulation, event handling, storage, communication Reference : Web APIs & DOM Reference
HTTP/1.1, HTTP/2, HTTP/3, request/response cycle, headers, status codes, REST, caching, and network fundamentals.
Key Concepts : Request methods, headers, status codes, caching strategies Reference : HTTP & Networking Reference
HTTPS, TLS, authentication, authorization, CORS, CSP, XSS prevention, CSRF protection, and secure coding practices.
Key Concepts : Encryption, certificates, same-origin policy, secure headers Reference : Security & Authentication Reference
Load times, rendering performance, Core Web Vitals, lazy loading, code splitting, minification, and performance budgets.
Key Concepts : LCP, FID, CLS, caching, compression, optimization techniques Reference : Performance & Optimization Reference
WCAG guidelines, ARIA roles and attributes, semantic HTML, screen reader compatibility, keyboard navigation, and inclusive design.
Key Concepts : ARIA, semantic markup, keyboard access, screen readers Reference : Accessibility Reference
W3C specifications, WHATWG standards, ECMAScript versions, browser APIs, and web platform features.
Key Concepts : Standards organizations, specifications, compatibility Reference : Web Protocols & Standards Reference
Chrome (Blink), Firefox (Gecko), Safari (WebKit), Edge, rendering engines, browser dev tools, and cross-browser compatibility.
Key Concepts : Rendering engines, browser differences, dev tools Reference : Browsers & Engines Reference
Version control (Git), IDEs, build tools, package managers, testing frameworks, CI/CD, and development workflows.
Key Concepts : Git, npm, webpack, testing, debugging, automation Reference : Development Tools Reference
JSON, XML, Base64, character encodings (UTF-8, UTF-16), MIME types, and data serialization.
Key Concepts : JSON, character encoding, data formats, serialization Reference : Data Formats & Encoding Reference
Canvas, SVG, WebGL, image formats (JPEG, PNG, WebP), video/audio elements, and multimedia handling.
Key Concepts : Canvas API, SVG, image optimization, video/audio Reference : Media & Graphics Reference
MVC, SPA, SSR, CSR, PWA, JAMstack, microservices, and web application architecture patterns.
Key Concepts : Design patterns, architecture styles, rendering strategies Reference : Architecture & Patterns Reference
Web servers, CDN, DNS, proxies, load balancing, SSL/TLS certificates, and deployment strategies.
Key Concepts : Server configuration, DNS, CDN, hosting, deployment Reference : Servers & Infrastructure Reference
When collaborators use web terminology, ensure accurate interpretation:
| Collaborator Says | Likely Means | Correct Implementation |
|---|---|---|
| "AJAX call" | Asynchronous HTTP request | Use Fetch API or XMLHttpRequest |
| "Make it responsive" | Mobile-friendly layout | Use media queries and responsive units |
| "Add SSL" | Enable HTTPS | Configure TLS certificate |
| "Fix the cache" | Update cache strategy | Adjust Cache-Control headers |
| "Speed up the site" | Improve performance | Optimize assets, lazy load, minify |
Different contexts require different interpretations:
Frontend Context :
Backend Context :
DevOps Context :
When given web-related requirements:
<label> elementsWhen encountering web-related problems:
When asked to improve performance:
When implementing security features:
<article>, <nav>, <main>)Start with basic HTML, enhance with CSS, add JavaScript functionality:
<!-- Base HTML (works without CSS/JS) -->
<form action="/submit" method="POST">
<label for="email">Email:</label>
<input type="email" id="email" name="email" required>
<button type="submit">Submit</button>
</form>
/* Enhanced styling */
form {
display: flex;
flex-direction: column;
gap: 1rem;
}
// Enhanced interactivity
form.addEventListener('submit', async (e) => {
e.preventDefault();
await fetch('/api/submit', { /* ... */ });
});
Mobile-first approach with progressive enhancement:
/* Mobile-first base styles */
.container {
padding: 1rem;
}
/* Tablet and up */
@media (min-width: 768px) {
.container {
padding: 2rem;
max-width: 1200px;
margin: 0 auto;
}
}
/* Desktop */
@media (min-width: 1024px) {
.container {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 2rem;
}
}
Keyboard navigation, ARIA, semantic HTML:
<nav aria-label="Main navigation">
<ul role="menubar">
<li role="none">
<a href="/" role="menuitem">Home</a>
</li>
<li role="none">
<button
role="menuitem"
aria-expanded="false"
aria-haspopup="true"
>
Products
</button>
</li>
</ul>
</nav>
Lazy loading, code splitting, and efficient loading:
<!-- Lazy load images -->
<img
src="placeholder.jpg"
data-src="high-res.jpg"
loading="lazy"
alt="Description"
>
<!-- Preload critical resources -->
<link rel="preload" href="critical.css" as="style">
<link rel="preconnect" href="https://api.example.com">
<!-- Async/defer non-critical scripts -->
<script src="analytics.js" async></script>
<script src="app.js" defer></script>
| Issue | Likely Cause | Solution |
|---|---|---|
| CORS error | Cross-origin request blocked | Configure CORS headers on server |
| Layout shift | Images without dimensions | Add width/height attributes |
| Slow load time | Unoptimized assets | Minify, compress, lazy load |
| Accessibility audit fails | Missing ARIA or semantic HTML | Add labels, roles, and semantic elements |
| Mixed content warning | HTTP resources on HTTPS page | Update all resources to HTTPS |
| JavaScript not working | Browser compatibility issue | Use polyfills or transpile with Babel |
| CSS not applying | Specificity or cascade issue | Check selector specificity and order |
Implement Real User Monitoring (RUM):
// Measure Core Web Vitals
const observer = new PerformanceObserver((list) => {
for (const entry of list.getEntries()) {
console.log('Performance metric:', {
name: entry.name,
value: entry.value,
rating: entry.rating
});
}
});
observer.observe({ entryTypes: ['largest-contentful-paint', 'first-input', 'layout-shift'] });
Create custom accessible components:
class AccessibleTabs {
constructor(element) {
this.tablist = element.querySelector('[role="tablist"]');
this.tabs = Array.from(this.tablist.querySelectorAll('[role="tab"]'));
this.panels = Array.from(element.querySelectorAll('[role="tabpanel"]'));
this.tabs.forEach((tab, index) => {
tab.addEventListener('click', () => this.selectTab(index));
tab.addEventListener('keydown', (e) => this.handleKeydown(e, index));
});
}
selectTab(index) {
// Deselect all tabs
this.tabs.forEach(tab => {
tab.setAttribute('aria-selected', 'false');
tab.setAttribute('tabindex', '-1');
});
this.panels.forEach(panel => panel.hidden = true);
// Select target tab
this.tabs[index].setAttribute('aria-selected', 'true');
this.tabs[index].setAttribute('tabindex', '0');
this.tabs[index].focus();
this.panels[index].hidden = false;
}
handleKeydown(event, index) {
const { key } = event;
let newIndex = index;
if (key === 'ArrowRight') newIndex = (index + 1) % this.tabs.length;
if (key === 'ArrowLeft') newIndex = (index - 1 + this.tabs.length) % this.tabs.length;
if (key === 'Home') newIndex = 0;
if (key === 'End') newIndex = this.tabs.length - 1;
if (newIndex !== index) {
event.preventDefault();
this.selectTab(newIndex);
}
}
}
Use modern CSS features for layouts:
/* Container queries (modern browsers) */
@container (min-width: 400px) {
.card {
display: grid;
grid-template-columns: 1fr 2fr;
}
}
/* CSS Grid with subgrid */
.grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 2rem;
}
.grid-item {
display: grid;
grid-template-rows: subgrid;
grid-row: span 3;
}
/* CSS custom properties with fallbacks */
:root {
--primary-color: #007bff;
--spacing: 1rem;
}
.element {
color: var(--primary-color, blue);
padding: var(--spacing, 16px);
}
Implement comprehensive security headers:
// Express.js example
app.use((req, res, next) => {
// Content Security Policy
res.setHeader('Content-Security-Policy',
"default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'");
// Strict Transport Security
res.setHeader('Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload');
// XSS Protection
res.setHeader('X-Content-Type-Options', 'nosniff');
res.setHeader('X-Frame-Options', 'DENY');
res.setHeader('X-XSS-Protection', '1; mode=block');
// Referrer Policy
res.setHeader('Referrer-Policy', 'strict-origin-when-cross-origin');
next();
});
This skill includes 15 comprehensive reference files covering all aspects of web development:
Before considering web development complete:
The Web Coder skill transforms you into an expert 10x engineer with comprehensive knowledge across all aspects of web development. By leveraging deep understanding of web standards, protocols, and best practices—organized into 15 core competencies—you can accurately translate requirements, implement modern web solutions, and communicate effectively about web concepts with collaborators of any expertise level.
Remember : Web development is multidisciplinary. Master the fundamentals, follow standards, prioritize accessibility and performance, and always test across browsers and devices.
Weekly Installs
3.7K
Repository
GitHub Stars
26.9K
First Seen
Mar 5, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex3.6K
gemini-cli3.6K
opencode3.6K
github-copilot3.6K
cursor3.6K
kimi-cli3.6K
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
102,200 周安装
| Form not submitting | Validation or event handling issue | Check validation rules and event listeners |
| API request failing | Network, CORS, or auth issue | Check Network tab, CORS config, auth headers |
| Cache not updating | Aggressive caching | Implement cache-busting or adjust headers |