audit-website
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese网站审计技能
Website Audit Skill
使用 squirrelscan 的 CLI 工具 ,对网站进行 SEO、技术、内容、性能和安全性审计。
squirrelsquirrel 支持 macOS、Windows、Linux,通过模拟浏览器与搜索爬虫,结合 140+ 条规则分析站点结构与内容,输出问题列表及修复建议。
Use the CLI tool from squirrelscan to audit websites for SEO, technical aspects, content, performance, and security.
squirrelsquirrel supports macOS, Windows, and Linux. It simulates browsers and search crawlers, analyzes site structure and content with over 140 rules, and outputs issue lists along with repair suggestions.
链接
Links
- 官网:https://squirrelscan.com
- 文档(含规则说明):https://docs.squirrelscan.com
规则文档模板:
示例:https://docs.squirrelscan.com/rules/links/external-links
https://docs.squirrelscan.com/rules/{rule_category}/{rule_id}示例:https://docs.squirrelscan.com/rules/links/external-links
- Official Website: https://squirrelscan.com
- Documentation (including rule explanations): https://docs.squirrelscan.com
Rule documentation template:
Example: https://docs.squirrelscan.com/rules/links/external-links
https://docs.squirrelscan.com/rules/{rule_category}/{rule_id}Example: https://docs.squirrelscan.com/rules/links/external-links
本技能能做什么
What This Skill Can Do
支持 AI 智能体按 20+ 类别、140+ 条规则审计网站,包括:
- SEO:Meta 标签、title、description、canonical、Open Graph
- 技术:死链、重定向链、页面速度、移动友好性
- 性能:加载时间、资源使用、缓存
- 内容:标题结构、图片 alt、内容分析
- 安全:泄露密钥、HTTPS、安全头、混合内容
- 无障碍:alt、色彩对比、键盘导航
- 可用性:表单校验、错误处理、用户流程
- 链接:内外链死链检测
- E-E-A-T:经验、专业、权威、可信度
- 移动端:移动友好、响应式、触控元素
- 可抓取性:robots.txt、sitemap.xml 等
- Schema:Schema.org、结构化数据、富摘要
- 法律:隐私政策、服务条款等合规
- 社交:Open Graph、Twitter 卡片及 schema 校验
- URL 结构:长度、连字符、关键词
- 关键词:堆砌检测
- 图片:alt、对比度、尺寸、格式
- 本地 SEO:NAP 一致性、地理元数据
- 视频:VideoObject schema、无障碍
审计会爬取站点、按规则分析页面,并生成报告,包含:
- 整体健康分(0–100)
- 按类别 breakdown(核心 SEO、技术 SEO、内容、安全等)
- 具体问题及受影响 URL
- 死链列表
- 可执行的改进建议
Supports AI agents to audit websites based on over 20 categories and 140+ rules, including:
- SEO: Meta tags, title, description, canonical, Open Graph
- Technical: Broken links, redirect chains, page speed, mobile-friendliness
- Performance: Load time, resource usage, caching
- Content: Heading structure, image alt text, content analysis
- Security: Exposed secrets, HTTPS, security headers, mixed content
- Accessibility: Alt text, color contrast, keyboard navigation
- Usability: Form validation, error handling, user flows
- Links: Broken internal and external link detection
- E-E-A-T: Experience, expertise, authority, trustworthiness
- Mobile: Mobile-friendliness, responsiveness, touch elements
- Crawlability: robots.txt, sitemap.xml, etc.
- Schema: Schema.org, structured data, rich snippets
- Legal: Compliance with privacy policies, terms of service, etc.
- Social: Open Graph, Twitter Cards, and schema validation
- URL Structure: Length, hyphens, keywords
- Keywords: Keyword stuffing detection
- Images: Alt text, contrast, size, format
- Local SEO: NAP consistency, geographic metadata
- Videos: VideoObject schema, accessibility
The audit will crawl the site, analyze pages against rules, and generate a report including:
- Overall health score (0–100)
- Breakdown by category (Core SEO, Technical SEO, Content, Security, etc.)
- Specific issues and affected URLs
- Broken link list
- Actionable improvement suggestions
何时使用
When to Use
在以下场景使用本技能:
- 分析网站健康度
- 排查技术 SEO 问题
- 修复上述各类问题
- 检查死链
- 校验 meta 与结构化数据
- 生成站点审计报告
- 对比改版前后健康度
- 提升性能、无障碍、SEO、安全等
Use this skill in the following scenarios:
- Analyze website health
- Troubleshoot technical SEO issues
- Fix the various issues mentioned above
- Check for broken links
- Verify meta tags and structured data
- Generate site audit reports
- Compare health scores before and after website revamps
- Improve performance, accessibility, SEO, security, etc.
前置条件
Prerequisites
本技能依赖 squirrel CLI,需已安装并加入 PATH。
This skill depends on the squirrel CLI, which must be installed and added to your PATH.
安装(macOS / Linux)
Installation (macOS / Linux)
bash
curl -fsSL https://squirrelscan.com/install | bash将会:
- 下载最新二进制
- 安装到
~/.local/share/squirrel/releases/{version}/ - 在 创建软链
~/.local/bin/squirrel - 在 初始化配置
~/.squirrel/settings.json
若 不在 PATH 中,在 shell 配置里添加:
~/.local/binbash
export PATH="$HOME/.local/bin:$PATH"bash
curl -fsSL https://squirrelscan.com/install | bashThis will:
- Download the latest binary
- Install to
~/.local/share/squirrel/releases/{version}/ - Create a symlink at
~/.local/bin/squirrel - Initialize configuration at
~/.squirrel/settings.json
If is not in your PATH, add this to your shell configuration:
~/.local/binbash
export PATH="$HOME/.local/bin:$PATH"Windows 安装
Windows Installation
PowerShell:
powershell
irm https://squirrelscan.com/install.ps1 | iex将下载并安装到 ,并加入 PATH。若用 CMD,可能需要重启终端使 PATH 生效。
%LOCALAPPDATA%\squirrel\PowerShell:
powershell
irm https://squirrelscan.com/install.ps1 | iexThis will download and install to and add it to your PATH. If using CMD, you may need to restart the terminal for the PATH changes to take effect.
%LOCALAPPDATA%\squirrel\验证安装
Verify Installation
bash
squirrel --versionbash
squirrel --version配置
Configuration
在项目目录执行 会生成 。
squirrel initsquirrel.toml每个项目应有唯一的 project name(默认可用被审计站点名),用于数据库区分多次审计:
bash
squirrel init --project-name my-project或:
bash
squirrel config set project.name my-project若当前目录没有 ,必须先执行 ,并用 指定项目名(可推断)。
项目名用于数据库标识,存储在。
squirrel.tomlsquirrel init-n项目名用于数据库标识,存储在
~/.squirrel/projects/Running in your project directory will generate .
squirrel initsquirrel.tomlEach project should have a unique project name (defaults to the audited site name) to distinguish multiple audits in the database:
bash
squirrel init --project-name my-projectOr:
bash
squirrel config set project.name my-projectIf there is no in the current directory, you must first run and specify the project name with (can be inferred).
The project name is used for database identification and stored in.
squirrel.tomlsquirrel init-nThe project name is used for database identification and stored in
~/.squirrel/projects/使用方式
Usage
概述
Overview
有三个子命令,结果都会写入本地项目数据库:
- crawl:执行或继续爬取
- analyze:分析爬取结果
- report:按指定格式输出报告(llm、text、console、html 等)
auditbash
squirrel audit https://example.com --format llm优先使用 :为 LLM 设计的紧凑、完整输出格式。
--format llmThere are three subcommands, and all results are written to the local project database:
- crawl: Execute or resume crawling
- analyze: Analyze crawled results
- report: Output reports in specified formats (llm, text, console, html, etc.)
auditbash
squirrel audit https://example.com --format llmPrioritize using : A compact, complete output format designed for LLMs.
--format llm审计目标选择
Selecting Audit Targets
- 若用户未提供 URL:从当前目录、环境变量(如 Vercel 项目、记忆或代码中的引用)推断可能站点。
- 若当前目录能启动本地 dev 服务:可对本地站点做审计。
- 若发现多个可审计站点:让用户选择。
- 若无法推断任何站点:询问用户要审计的 URL。
优先审计线上站点,更能反映真实性能与渲染问题。若同时有本地与线上,提示用户选择,并建议选线上。可在线上审计发现问题后,在本地代码中修复。
- If no URL is provided by the user: Infer possible sites from the current directory, environment variables (e.g., Vercel projects, memory, or references in code).
- If a local dev server can be started in the current directory: Audit the local site.
- If multiple auditable sites are found: Ask the user to select one.
- If no sites can be inferred: Ask the user for the URL to audit.
Prioritize auditing live sites as they better reflect real performance and rendering issues. If both local and live sites are available, prompt the user to select and recommend the live site. After identifying issues in the live site audit, fix them in the local code.
实施修复时
When Implementing Fixes
- 可将大范围修复拆成可并行的子任务,用 subagent 加速。
- 修复完成后,如环境有 typecheck/format 工具(如 ruff、biome、tsc),对生成代码跑一遍。
- Split large-scale fixes into parallel subtasks and use subagents to accelerate the process.
- After fixes are complete, run typecheck/format tools (e.g., ruff, biome, tsc) on the generated code if available in the environment.
基本流程
Basic Workflow
- 执行审计(写入数据库,并输出到终端)
- 按格式导出报告
bash
undefined- Execute Audit (writes to database and outputs to terminal)
- Export Report in Specified Format
bash
undefined1. 执行审计(默认 console 输出)
1. Execute audit (default console output)
squirrel audit https://example.com
squirrel audit https://example.com
2. 导出为 LLM 格式
2. Export as LLM format
squirrel report <audit-id> --format llm
undefinedsquirrel report <audit-id> --format llm
undefined常用选项
Common Options
爬取更多页面:
bash
squirrel audit https://example.com --max-pages 200忽略缓存、强制重新爬取:
bash
squirrel audit https://example.com --refresh恢复中断的爬取:
bash
squirrel audit https://example.com --resume调试时详细输出:
bash
squirrel audit https://example.com --verboseCrawl more pages:
bash
squirrel audit https://example.com --max-pages 200Ignore cache and force a full recrawl:
bash
squirrel audit https://example.com --refreshResume an interrupted crawl:
bash
squirrel audit https://example.com --resumeDetailed output for debugging:
bash
squirrel audit https://example.com --verbose命令选项
Command Options
audit
audit
| 选项 | 别名 | 说明 | 默认 |
|---|---|---|---|
| | 输出格式:console, text, json, html, markdown, llm | console |
| | 最大爬取页数(最大 500) | 500 |
| | 忽略缓存,全部重新抓取 | false |
| - | 恢复中断的爬取 | false |
| | 详细输出 | false |
| - | 调试日志 | false |
| Option | Alias | Description | Default |
|---|---|---|---|
| | Output format: console, text, json, html, markdown, llm | console |
| | Maximum number of pages to crawl (max 500) | 500 |
| | Ignore cache and fully recrawl | false |
| - | Resume interrupted crawl | false |
| | Detailed output | false |
| - | Debug logs | false |
report
report
| 选项 | 别名 | 说明 |
|---|---|---|
| | console, text, json, html, markdown, xml, llm |
| Option | Alias | Description |
|---|---|---|
| | console, text, json, html, markdown, xml, llm |
输出格式
Output Formats
- console(默认):彩色、带进度的可读输出。
- llm:面向 LLM 的紧凑 XML/文本混合,token 更省(比冗长 XML 约小 40%),包含:
- 摘要:健康分与核心指标
- 按规则分类的问题(核心 SEO、技术、内容、安全等)
- 死链列表(内链 + 外链)
- 按优先级排列的改进建议
- console (default): Colorful, readable output with progress.
- llm: Compact XML/text hybrid designed for LLMs, saving about 40% more tokens than verbose XML, including:
- Summary: Health score and core metrics
- Issues categorized by rules (Core SEO, Technical, Content, Security, etc.)
- Broken link list (internal + external)
- Improvement suggestions sorted by priority
示例
Examples
1. 快速站点审计(LLM 输出)
1. Quick Site Audit (LLM Output)
bash
squirrel audit https://squirrelscan.com --format llmbash
squirrel audit https://squirrelscan.com --format llm2. 大站深度审计
2. Deep Audit for Large Sites
bash
squirrel audit https://myblog.com --max-pages 500 --format llmbash
squirrel audit https://myblog.com --max-pages 500 --format llm3. 改版后重新审计(忽略缓存)
3. Re-audit After Website Revamp (Ignore Cache)
bash
squirrel audit https://example.com --refresh --format llmbash
squirrel audit https://example.com --refresh --format llm4. 两步流程(复用已有审计)
4. Two-Step Workflow (Reuse Existing Audit)
bash
squirrel audit https://example.combash
squirrel audit https://example.com记下输出的 audit-id,如 a1b2c3d4
Note the output audit-id, e.g., a1b2c3d4
squirrel report a1b2c3d4 --format llm
---squirrel report a1b2c3d4 --format llm
---输出
Output
审计与修复完成后,给用户一个所有改动的摘要。
After completing the audit and fixes, provide the user with a summary of all changes.
故障排除
Troubleshooting
squirrel
找不到
squirrelsquirrel
command not found
squirrel- 安装:
curl -fsSL https://squirrelscan.com/install | bash - 加入 PATH:
export PATH="$HOME/.local/bin:$PATH" - 验证:
squirrel --version
- Install:
curl -fsSL https://squirrelscan.com/install | bash - Add to PATH:
export PATH="$HOME/.local/bin:$PATH" - Verify:
squirrel --version
权限错误
Permission Errors
bash
chmod +x ~/.local/bin/squirrelbash
chmod +x ~/.local/bin/squirrel爬取超时或很慢
Crawl Timeouts or Slow Speed
大站可能需较长时间,加 查看进度:
--verbosebash
squirrel audit https://example.com --format llm --verboseLarge sites may take longer; use to check progress:
--verbosebash
squirrel audit https://example.com --format llm --verbose无效 URL
Invalid URL
务必包含协议( 或 ):
http://https://bash
undefinedAlways include the protocol ( or ):
http://https://bash
undefined✗ 错误
✗ Incorrect
squirrel audit example.com
squirrel audit example.com
✓ 正确
✓ Correct
squirrel audit https://example.com
---squirrel audit https://example.com
---工作流程
Workflow
- Crawl:从基础 URL 发现并抓取页面
- Analyze:对每页执行审计规则
- External Links:检查外链可用性
- Report:生成 LLM 优化报告
审计结果保存在本地数据库,之后可用 按不同格式导出。
squirrel report- Crawl: Discover and fetch pages from the base URL
- Analyze: Execute audit rules on each page
- External Links: Check availability of external links
- Report: Generate an LLM-optimized report
Audit results are saved in the local database and can later be exported in different formats using .
squirrel report延伸资源
Additional Resources
- squirrelscan 文档
- CLI 帮助:
squirrel audit --help
- squirrelscan Documentation
- CLI Help:
squirrel audit --help