frontendchecklist
它能做什么
这项技能运行 Front-End Checklist 命令行工具,依据其规则清单检查网页代码和页面。适合希望在发布前对代码再做一次审查的网页开发者。
适用场景
- ✓当你编写或修改了 HTML、CSS 或 JavaScript,并希望对其进行检查时。
- ✓当你想检查一个公开网页的无障碍、SEO 或性能时。
- ✓当你即将提交代码,并希望对照规则做最后检查时。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/packages/cli/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请按照前端检查清单检查我项目文件夹中的页面,并列出存在的问题。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会在你的文件或页面链接上运行该工具。它以结构化格式返回发现的问题,并可以查询每条规则的原因和修复方法。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Front-End Checklist CLI
frontendchecklist checks frontend code against the Front-End Checklist rules. It works offline,
prints JSON when its output is piped (which is how you will usually call it), and uses exit codes
you can branch on.
Run it with npx -y @frontendchecklist/cli <command> if frontendchecklist is not installed.
When to use it
- After writing or editing frontend files:
frontendchecklist review <paths>. - Before committing:
git diff --cached | frontendchecklist review -. - When the user asks to audit a deployed page:
frontendchecklist audit https://.... - When you need the authoritative guidance for a topic:
frontendchecklist search <topic>, thenfrontendchecklist rule <slug>. - For a structured pass (launch, accessibility, SEO, performance):
frontendchecklist checklists, thenfrontendchecklist checklist <slug>.
Commands
| Command | Purpose |
|---|---|
review <paths...|-> |
Static review of files, directories (walked; vendor dirs skipped), or stdin |
audit <https-url> |
Fetch a public page and review its HTML |
search [query] [--focus a,b] [-n 10] |
Find rules by keyword, technology, or category |
rule <slug> |
Why a rule matters, how to check it, how to fix it |
checklists / checklist <slug> |
Curated checklists and their rules |
categories |
Categories with rule counts |
schema |
Full command reference as JSON |
Useful flags: --focus accessibility,seo, --min-priority high, --fail-on high.
Reading results
reviewandauditreturn{ findings: [{ target, rule, title, priority, issue, fix? }], failing }.- Exit code
0: fine.1: findings at or above--fail-on.2: bad input or runtime error, with{ "error": "..." }on stdout. - Findings are conservative static heuristics. "No findings" means nothing provable was found, not
that the code is clean: follow up with
search/rulefor areas the heuristics cannot see (rendered contrast, focus order, real performance).
Workflow
frontendchecklist review <changed files> --min-priority medium- For each finding, run
frontendchecklist rule <rule>and apply its fix guidance. - Re-run the review until no critical/high findings remain (
--fail-on highexits 0). - Mention any remaining medium/low findings to the user instead of silently ignoring them.
常见问题
它需要网络连接吗?
只有在审查线上 URL 时才需要。这项技能说明代码审查可以离线进行。
我怎样了解某条规则为什么重要?
这项技能提供一条命令,可以解释规则的原因以及修复方法。
它涵盖哪些代码类型?
这项技能列出了 HTML、CSS、JavaScript,以及 JSX、Vue、Svelte 和 Astro 等框架。
详情
作者的原始描述
Review frontend code and live pages against the Front-End Checklist (380+ rules for accessibility, performance, SEO, security, HTML, CSS, JavaScript, images, i18n, privacy, testing) using the `frontendchecklist` CLI. Use when writing, reviewing, or shipping HTML/CSS/JS/JSX/TSX/Vue/Svelte/Astro code, before a commit or PR, or when asked to audit a public URL.
热度
- GitHub 星标
- 75k
- 排名
- #2704
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …