404-page
它能做什么
这项技能检查为无效地址显示的页面是否设置得当,并提供帮助访客找回内容的链接。适合希望迷路的访客能够找回方向、而不是离开的网站团队。
适用场景
- ✓当你正在构建或审查用于失效或已迁移链接的页面时。
- ✓当网站显示了带品牌的缺失页面,却返回 200 状态码时。
- ✓当你希望在未找到页面中加入搜索和热门链接时。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/404-page/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请检查我网站的缺失页面是否返回真正的 404 状态,并提供有用的链接。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会审查页面模板和最终 HTML,确认页面提供导航选项,并且服务器返回真正的 404 代码。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Create a custom 404 error page
A generic browser 404 page causes users to leave immediately—a well-designed custom page provides recovery paths and keeps users engaged with your site.
Quick Reference
- Custom 404 pages retain users who encounter broken or moved links
- Include search, navigation, and links to popular content
- Maintain consistent branding and site design
- Track 404 errors to identify and fix broken links
- Return a real HTTP 404 so the page is not treated as a soft 404
Check
Verify that this website has a custom 404 error page with helpful navigation options. Confirm the route returns HTTP 404 and not a branded page with a 200 response.
Fix
Create a user-friendly 404 page with search functionality and links to important pages. Ensure the server or framework returns status code 404 so the page does not become a soft 404.
Explain
Explain how custom 404 pages help retain users who encounter broken links and why returning 200 for missing pages creates soft-404 indexing problems.
Code Review
Review templates, server-rendered HTML, and shared components that output markup related to Create a custom 404 error page. Flag exact elements, attributes, and routes where the rendered HTML violates the rule.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
常见问题
为什么状态码很重要?
如果缺失页面返回 200,搜索引擎可能会把它当作真实页面,从而导致索引问题。
页面应该包含什么?
这项技能建议在页面中加入搜索、导航,以及指向热门内容的链接,并与网站风格保持一致。
它会追踪失效链接吗?
这项技能建议追踪 404 错误,以便你找到并修复失效链接。
详情
作者的原始描述
Use when reviewing templates, rendered HTML, or shared components related to Create a custom 404 error page. Validate the final browser-facing markup, not just the source framework abstraction.
热度
- GitHub 星标
- 75k
- 排名
- #2706
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。
accessibility-testing
75k为组件和页面设置自动化无障碍检查,在用户看到问题之前发现常见的 WCAG 问题。