special-chars
它能做什么
这个技能检查网址路径中的空格、符号和非英文字符,找出导致抓取问题或产生重复地址的情况。它面向内容系统自动生成大量地址的网站所有者和开发者。
适用场景
- ✓你请智能体检查网址中是否有空格或异常符号的时候。
- ✓同一页面以多个编码后的地址出现的时候。
- ✓你的内容系统从其他语言的标题生成地址的时候。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/special-chars/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我的一些页面地址中有空格和符号,我认为它们造成了重复。请帮我检查并清理吗?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会扫描网址路径中安全字符集以外的字符,并标出空格、保留符号以及未经编码的非英文字母。它会更新网址生成规则,将空格替换为连字符,并从旧地址设置重定向。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
URL Special Characters
Special characters in URL paths cause inconsistent crawling, broken links when shared, and canonicalization failures when different systems encode them differently.
Quick Reference
- URL paths should contain only unreserved characters: A-Z, a-z, 0-9,
-,_,.,~ - Spaces must be encoded as
%20(not+, which is query-string syntax) - Characters like
#,?,&,=have reserved meaning in URLs and must be percent-encoded in path segments - Non-ASCII characters (accented letters, CJK) should be percent-encoded in URLs, though modern browsers decode them for display
Check
Scan all crawled URL paths for characters outside [A-Za-z0-9\-_./~]. Flag URLs containing spaces (%20 or literal), special symbols (#, ?, &, =, + in paths), or unencoded non-ASCII characters. Check if different encodings of the same URL return separate 200 responses.
Fix
Update the URL generation logic in your CMS or framework to strip or replace special characters. Replace spaces with hyphens. Percent-encode any reserved characters that must appear in paths. Set up redirects from problematic old URLs to clean new slugs.
Explain
Explain the difference between reserved and unreserved characters in RFC 3986, how browsers and crawlers handle inconsistent percent-encoding, and why special characters in paths create duplicate content risks.
Code Review
Review metadata generation, rendered HTML, structured data, and response headers related to URL Special Characters. Flag exact routes or templates where search-facing output violates the rule, and describe how to verify the final page output.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/seo/special-chars
常见问题
为什么空格在网址中是个问题?
这个技能说,空格必须编码为 %20,而编码不一致可能会产生重复页面。
非英文字母必须删除吗?
不必。这个技能说,它们应进行百分号编码,不过现代浏览器也能正确显示它们。
我需要设置重定向吗?
需要。这个技能建议从有问题的旧网址重定向到干净的新网址。
详情
作者的原始描述
Use when applies to any site with user-generated slugs, CMS-generated URLs, or content in non-English languages. Use when auditing URLs for crawl errors or canonicalization issues.
热度
- GitHub 星标
- 75k
- 排名
- #3030
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。