pdf-size
它能做什么
这个技能检查网站链接的 PDF 文件是否存在可能导致搜索引擎无法完整读取它们的体积问题。它面向发布报告、手册或其他 PDF 的网站所有者。
适用场景
- ✓你请智能体检查网站链接的 PDF 文件的时候。
- ✓你发布的一个大型 PDF 没有出现在搜索结果中的时候。
- ✓你在准备供下载的报告或手册,并希望它便于搜索引擎索引的时候。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/pdf-size/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我的网站上有许多大型 PDF 报告。请帮我检查它们的大小,并让 Google 更容易读取吗?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会找出网站上的 PDF 链接,并检查每个文件的大小。它会建议通过去掉高分辨率图片、字体和多余的元数据来压缩大文件;如有需要,还会制作内容相同的网页。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Keep linked PDFs under 60 MB
PDFs larger than Googlebot's download threshold are partially crawled or skipped, meaning their content may not appear in search results even when linked from well-indexed pages.
Quick Reference
- Googlebot truncates files larger than 15 MB for crawling; 60 MB is a documented upper limit
- Large PDFs may be partially indexed or skipped entirely
- Compress PDFs before publishing: use PDF optimisation tools to reduce file size
- Add HTML landing pages alongside PDFs to ensure content is indexable
Check
Find all <a href='*.pdf'> links on the site. For each linked PDF, perform a HEAD request and check the Content-Length header. Flag any PDF exceeding 10 MB (recommend compression) or 15 MB (likely to be truncated by Googlebot).
Fix
Compress large PDFs using a PDF optimisation tool (Adobe Acrobat, Ghostscript, or Smallpdf). Remove embedded high-resolution images, fonts, and metadata not required for reading. If compression is insufficient, create an HTML page with the same content as the primary indexable version, and offer the PDF as a download.
Explain
Googlebot downloads and indexes the content of PDFs linked from your site. However, it has a file size limit for downloads — files beyond this limit are partially indexed or skipped. Large PDFs also slow down crawling and consume crawl budget. Keeping PDFs small ensures their full content appears in search results.
Code Review
Find all <a href> links with .pdf extension. For each PDF URL, perform a HEAD request and check Content-Length header value. Flag PDFs exceeding 10,485,760 bytes (10 MB) for compression review. Flag PDFs exceeding 15,728,640 bytes (15 MB) as at-risk for partial indexing. Verify PDF URLs return 200 status and appropriate Content-Type: application/pdf header.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/seo/pdf-size
常见问题
PDF 多大算太大?
这个技能会把超过 10 MB 的文件标记为需要压缩,超过 15 MB 的文件则可能会被 Googlebot 截断。
什么工具可以压缩 PDF?
这个技能提到 Adobe Acrobat、Ghostscript 和 Smallpdf。
我还应该提供 PDF 吗?
应该。这个技能建议保留 PDF 供下载,同时提供该内容的 HTML 版本。
详情
作者的原始描述
Use when auditing a site that publishes downloadable PDFs (reports, white papers, legal documents, manuals). Applies to any site where PDFs are linked as indexable content resources.
热度
- GitHub 星标
- 75k
- 排名
- #2974
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。