best-practices
仓库创建 2026年1月18日最近提交 1 个月前SkillHot 收录 22 天前
▸ 精选理由
提供可执行的安全与兼容修复建议。
这个 Skill 做什么
提供面向现代网页的安全、兼容与代码质量最佳实践。
从安全、兼容性和代码质量角度给出现代网页的实践建议,像强制 HTTPS、修复混合内容、改进可维护性和浏览器兼容性那些实操项都会落地化说明。适合做安全审查、代码质量复查或把旧项目现代化时用。重点是把抽象准则变成具体修复步骤和示例,便于直接执行。
▸ 展开 SKILL.md 英文原文
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".
2.6k
Stars
233
Forks
6
仓库内 Skill
+93
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/addyosmani/web-quality-skills/main/skills/best-practices/SKILL.md或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/addyosmani/web-quality-skills/main/skills/best-practices/SKILL.md"SKILL.MD 节选查看完整文件 ↗
# 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:** ```html <!-- ❌ Mixed content --> <img src="http://example.com/image.jpg"> <script src="http://cdn.example.com/script.js"></script> <!-- ✅ HTTPS only --> <img src="https://example.com/image.jpg"> <script src="https://cdn.example.com/script.js"></script> ``` Avoid protocol-relative URLs (`//example.com/...`) — they're an HTTP-era pattern with no benefit on HTTPS-only sites and hide the actual scheme from reviewers. **HSTS Header:** ``` Strict-Transport-Security: max-age=31536000
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有