audit-website
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAudit a Website and Fix It
审计网站并修复问题
Run a squirrelscan audit against a website, read the LLM report, map each issue to the code or content that causes it, fix in batches, and re-audit until the score target is met.
Requires the CLI (squirrelscan.com/download; verify with ). For CLI setup, login, publishing, MCP, and general CLI usage, use the companion skill.
squirrelsquirrel --versionsquirrelscan对网站执行squirrelscan审计,读取LLM报告,将每个问题映射到引发问题的代码或内容,分批修复并重新审计,直至达到目标评分。
需要安装 CLI(下载地址:squirrelscan.com/download;可通过验证安装)。关于CLI的设置、登录、发布、MCP及常规使用方法,请参考配套的技能。
squirrelsquirrel --versionsquirrelscanRule docs
规则文档
Look up any rule at , for example:
https://docs.squirrelscan.com/rules/{rule_category}/{rule_id}可通过以下地址查询任意规则:,例如:
https://docs.squirrelscan.com/rules/{rule_category}/{rule_id}Running the audit
执行审计
bash
squirrel audit https://example.com --format llm- ALWAYS use : it is compact, exhaustive, and made for agents.
--format llm - If the user doesn't provide a URL, ask which site to audit.
- PREFER auditing the live site: only there do you see true rendering, performance, and redirect behavior. If both a local dev server and a live site exist, suggest the live one; apply the fixes to the local code either way.
- Audits are cached locally. Re-render later without recrawling: .
squirrel report <audit-id> --format llm
bash
squirrel audit https://example.com --format llm- 务必使用参数:该格式简洁全面,专为Agent设计。
--format llm - 如果用户未提供URL,请询问需要审计的网站。
- 优先审计线上网站:只有线上环境才能呈现真实的渲染效果、性能表现和重定向行为。如果同时存在本地开发服务器和线上网站,建议审计线上网站;无论哪种情况,修复操作都应应用到本地代码。
- 审计结果会在本地缓存。无需重新爬取即可重新生成报告:。
squirrel report <audit-id> --format llm
Scan progression
扫描流程
- First pass, quick coverage (the default): a fast, shallow scan to learn the site's structure, technology, and biggest problems without impacting the site.
- Second pass, deeper coverage: (one page per URL pattern) for template-level coverage, or
-C surfacefor a comprehensive crawl before sign-off.-C full
| Mode | Default pages | Use |
|---|---|---|
| 25 | First look, CI checks |
| 100 | Template-level coverage (one sample per pattern like |
| 500 | Final verification, deep analysis |
Useful flags: (ignore cache, full re-fetch), (continue an interrupted crawl), (page cap), (progress detail).
--refresh--resume-m <n>--verboseIf the site blocks unknown crawlers (Shopify / Cloudflare), pass Web Bot Auth headers with repeated flags. Header values are secrets and are redacted in output. See https://docs.squirrelscan.com/guides/web-bot-auth
-H "Name: Value"- 首次扫描:快速覆盖(默认模式):快速浅层扫描,在不影响网站的前提下了解网站结构、技术栈及主要问题。
- 二次扫描:深度覆盖:使用参数(每个URL模式扫描一个页面)实现模板级覆盖,或使用
-C surface参数在验收前进行全面爬取。-C full
| 模式 | 默认扫描页数 | 适用场景 |
|---|---|---|
| 25 | 初步排查、CI检查 |
| 100 | 模板级覆盖(每个URL模式如 |
| 500 | 最终验证、深度分析 |
实用参数:(忽略缓存,重新完整爬取)、(继续中断的爬取)、(设置扫描页数上限)、(显示详细进度)。
--refresh--resume-m <n>--verbose如果网站拦截未知爬虫(如Shopify / Cloudflare),可通过重复使用参数传递Web Bot认证头。头信息值为敏感信息,会在输出中被屏蔽。详情请见:https://docs.squirrelscan.com/guides/web-bot-auth
-H "Name: Value"The fix loop
修复流程
- Present the report: score, grade, top issues by severity.
- Propose fixes: list the issues you can fix and confirm with the user before changing anything.
- Map issues to source: find the template, component, or content file behind each finding.
- Fix in batches: apply the approved fixes; use subagents to parallelize independent files.
- Re-audit (use after deploys or content changes) and show before/after scores.
--refresh - Repeat until the target is met or only judgment calls remain (for example "should this link be removed?"). Flag those for user review instead of guessing.
After each batch, verify the project still builds and existing checks pass.
- 展示报告:呈现评分、等级及按严重程度排序的主要问题。
- 提出修复方案:列出可修复的问题,在进行任何修改前与用户确认。
- 问题映射到源文件:找到每个问题对应的模板、组件或内容文件。
- 分批修复:应用已确认的修复方案;使用子Agent并行处理独立文件。
- 重新审计(部署或内容变更后使用参数)并展示修复前后的评分对比。
--refresh - 重复流程:直至达到目标评分或仅剩需人工判断的问题(例如“是否应删除此链接?”)。此类问题需标记给用户审核,而非自行猜测处理。
每批修复完成后,需验证项目仍能正常构建且现有检查全部通过。
Score targets
评分目标
| Starting score | Target | Expected work |
|---|---|---|
| < 50 (F) | 75+ (C) | Major fixes |
| 50-70 (D) | 85+ (B) | Moderate fixes |
| 70-85 (C) | 90+ (A) | Polish |
| > 85 (B+) | 95+ | Fine-tuning |
A site is only considered COMPLETE and FIXED when it scores 95+ (Grade A) with .
--coverage full| 初始评分 | 目标评分 | 预计工作量 |
|---|---|---|
| < 50(F级) | 75+(C级) | 重大修复 |
| 50-70(D级) | 85+(B级) | 中度修复 |
| 70-85(C级) | 90+(A级) | 优化打磨 |
| > 85(B+级) | 95+ | 精细调整 |
只有当网站在模式下评分达到95+(A级)时,才视为完全修复完成。
--coverage fullIssue categories and fix approach
问题类别与修复方法
| Category | Fix approach | Parallelizable |
|---|---|---|
| Meta tags / titles / descriptions | Edit page components or metadata config | No |
| Structured data | Add JSON-LD to page templates | No |
| Missing H1 / heading hierarchy | Edit page components + content files | Yes (content) |
| Image alt text | Edit content files | Yes |
| Short meta descriptions | Extend frontmatter descriptions | Yes |
| HTTP to HTTPS links | Find and replace in content | Yes |
| Broken links | Manual review, flag for user | No |
Rules carry a level (error, warning, notice) and a rank (1-10): fix errors first, then high-rank warnings. Code changes and content changes are equally important; treat them the same.
| 类别 | 修复方法 | 是否可并行处理 |
|---|---|---|
| 元标签/标题/描述 | 编辑页面组件或元数据配置 | 否 |
| 结构化数据 | 向页面模板添加JSON-LD | 否 |
| 缺失H1/标题层级问题 | 编辑页面组件+内容文件 | 是(内容部分) |
| 图片替代文本 | 编辑内容文件 | 是 |
| 元描述过短 | 扩展前置元描述 | 是 |
| HTTP转HTTPS链接 | 在内容中查找替换 | 是 |
| 失效链接 | 人工审核,标记给用户 | 否 |
规则分为不同级别(错误、警告、通知)和优先级(1-10):优先修复错误,然后处理高优先级警告。代码变更和内容变更同等重要,需同等对待。
Parallelizing with subagents
使用子Agent并行处理
- Ask the user first: always confirm which fixes to apply before spawning subagents.
- Group 3-5 files per subagent for the same fix type; only parallelize independent files (no shared components or config).
- Spawn the subagents in a single message so they run concurrently.
- 先询问用户:在生成子Agent前,务必确认要应用哪些修复方案。
- 每个子Agent处理3-5个同类型修复的文件;仅并行处理独立文件(无共享组件或配置)。
- 在一条消息中生成所有子Agent,使其并行运行。
Verifying regressions
验证回归问题
Compare against a baseline to prove improvement or catch regressions:
bash
squirrel report --diff <baseline-audit-id> --format llm
squirrel report --regression-since example.com --format llm与基线报告对比,证明修复效果或发现回归问题:
bash
squirrel report --diff <baseline-audit-id> --format llm
squirrel report --regression-since example.com --format llmCompletion
完成标准
Done means: all errors fixed; warnings fixed or documented as needing human review; a re-audit confirms the improvement; and the user has seen the before/after score comparison plus a summary of every change made. Re-audit regularly to keep the site healthy. If the user wants to share results, offer a published report (see the skill).
squirrelscan完成标准:所有错误已修复;警告已修复或记录为需人工审核;重新审计确认修复效果;用户已查看修复前后的评分对比及所有变更的总结。定期重新审计以保持网站健康状态。如果用户希望分享结果,可提供发布的报告(参考技能)。
squirrelscanReport format
报告格式
The LLM report is a compact XML/text hybrid optimized for token efficiency: summary with health score, issues grouped by category with affected URLs, broken links, and prioritized recommendations. Full spec: OUTPUT-FORMAT.md
LLM报告是一种紧凑的XML/文本混合格式,针对令牌效率进行了优化:包含健康评分摘要、按类别分组的问题(含受影响URL)、失效链接及优先级排序的建议。完整规范请见:OUTPUT-FORMAT.md