audit-website

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Website Audit Skill

网站审计Skill

Audit websites for SEO, technical, content, performance and security issues using the squirrelscan cli.
squirrelscan provides a cli tool squirrel - available for macos, windows and linux. It carries out extensive website auditing by emulating a browser, search crawler, and analyzing the website's structure and content against over 140+ rules.
It will provide you a list of issues as well as suggestions on how to fix them.
使用squirrelscan CLI审计网站的SEO、技术、内容、性能和安全问题。
squirrelscan提供了一款名为squirrel的CLI工具,支持macOS、Windows和Linux系统。它通过模拟浏览器、搜索引擎爬虫,并依据140+条规则分析网站结构与内容,完成全面的网站审计。
审计后会列出所有问题,并提供对应的修复建议。

Links

链接

You can look up the docs for any rule with this template:
example:
你可以通过以下模板查询任意规则的文档:
示例:

What This Skill Does

本Skill的功能

This skill enables AI agents to audit websites for over 140 rules in 20 categories, including:
  • SEO issues: Meta tags, titles, descriptions, canonical URLs, Open Graph tags
  • Technical problems: Broken links, redirect chains, page speed, mobile-friendliness
  • Performance: Page load time, resource usage, caching
  • Content quality: Heading structure, image alt text, content analysis
  • Security: Leaked secrets, HTTPS usage, security headers, mixed content
  • Accessibility: Alt text, color contrast, keyboard navigation
  • Usability: Form validation, error handling, user flow
  • Links: Checks for broken internal and external links
  • E-E-A-T: Expertise, Experience, Authority, Trustworthiness
  • User Experience: User flow, error handling, form validation
  • Mobile: Checks for mobile-friendliness, responsive design, touch-friendly elements
  • Crawlability: Checks for crawlability, robots.txt, sitemap.xml and more
  • Schema: Schema.org markup, structured data, rich snippets
  • Legal: Compliance with legal requirements, privacy policies, terms of service
  • Social: Open graph, twitter cards and validating schemas, snippets etc.
  • Url Structure: Length, hyphens, keywords
  • Keywords: Keyword stuffing
  • Content: Content structure, headings
  • Images: Alt text, color contrast, image size, image format
  • Local SEO: NAP consistency, geo metadata
  • Video: VideoObject schema, accessibility
and more!
The audit crawls the website, analyzes each page against audit rules, and returns a comprehensive report with:
  • Overall health score (0-100)
  • Category breakdowns (core SEO, technical SEO, content, security)
  • Specific issues with affected URLs
  • Broken link detection
  • Actionable recommendations
该Skill支持AI Agent依据20个分类下的140+条规则审计网站,涵盖:
  • SEO问题:Meta标签、页面标题、描述、规范URL、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分)
  • 分类统计(核心SEO、技术SEO、内容、安全等)
  • 具体问题及受影响的URL
  • 失效链接检测结果
  • 可执行的改进建议

When to Use

使用场景

Use this skill when you need to:
  • Analyze a website's health
  • Debug technical SEO issues
  • Fix all of the issues mentioned above
  • Check for broken links
  • Validate meta tags and structured data
  • Generate site audit reports
  • Compare site health before/after changes
  • Improve website performance, accessibility, SEO, security and more.
在以下场景中使用本Skill:
  • 分析网站整体健康状况
  • 调试技术SEO问题
  • 修复上述各类问题
  • 检查失效链接
  • 验证元标签与结构化数据
  • 生成网站审计报告
  • 对比网站修改前后的健康状况
  • 提升网站性能、可访问性、SEO效果、安全性等

Prerequisites

前置条件

This skill requires the squirrel CLI to be installed and available in your PATH.
使用本Skill需先安装squirrel CLI,并确保其在系统PATH中可访问。

Installation

安装步骤

If squirrel is not already installed, you can install it using:
bash
curl -fsSL https://squirrelscan.com/install | bash
This will:
  • Download the latest release binary
  • Install to
    ~/.local/share/squirrel/releases/{version}/
  • Create a symlink at
    ~/.local/bin/squirrel
  • Initialize settings at
    ~/.squirrel/settings.json
If
~/.local/bin
is not in your PATH, add it to your shell configuration:
bash
export PATH="$HOME/.local/bin:$PATH"
若未安装squirrel,可通过以下命令安装:
bash
curl -fsSL https://squirrelscan.com/install | bash
该命令会:
  • 下载最新版本的二进制文件
  • 安装至
    ~/.local/share/squirrel/releases/{version}/
  • ~/.local/bin/
    创建squirrel的符号链接
  • ~/.squirrel/settings.json
    初始化配置
~/.local/bin
不在系统PATH中,需将其添加至shell配置文件:
bash
export PATH="$HOME/.local/bin:$PATH"

Windows Installation

Windows系统安装

Install using PowerShell:
powershell
irm https://squirrelscan.com/install.ps1 | iex
This will:
  • Download the latest release binary
  • Install to
    %LOCALAPPDATA%\squirrel\
  • Add squirrel to your PATH
If using Command Prompt, you may need to restart your terminal for PATH changes to take effect.
使用PowerShell安装:
powershell
irm https://squirrelscan.com/install.ps1 | iex
该命令会:
  • 下载最新版本的二进制文件
  • 安装至
    %LOCALAPPDATA%\\squirrel\\
  • 将squirrel添加至系统PATH
若使用命令提示符,可能需要重启终端使PATH变更生效。

Verify Installation

验证安装

Check that squirrel is installed and accessible:
bash
squirrel --version
检查squirrel是否安装成功并可正常访问:
bash
squirrel --version

Setup

配置步骤

Running
squirrel init
will setup a squirrel.toml file for configuration in the current directory.
Each project should have a squirrel project name for the database - by default this is the name of the website you audit - but you can set it yourself so that you can place all audits for a project in one database
You do this either on init with:
bash
squirrel init --project-name my-project
or config:
bash
squirrel config set project.name my-project
If there is no squirrel.toml in the directory you're running from CREATE ONE with
squirrel init
and specify the '-n' parameter for a project name (infer this)
The project name is used to identify the project in the database and is used to generate the database name.
It is stored in ~/.squirrel/projects/<project-name>
运行
squirrel init
会在当前目录生成用于配置的squirrel.toml文件。
每个项目应设置对应的项目名称,用于数据库标识——默认使用审计的网站名称,但你可以自行设置,以便将同一项目的所有审计结果存储至同一数据库。
你可以在初始化时设置:
bash
squirrel init --project-name my-project
或通过配置命令设置:
bash
squirrel config set project.name my-project
若当前目录没有squirrel.toml文件,请使用
squirrel init
命令创建,并通过
-n
参数指定项目名称(可自动推断)。
项目名称用于在数据库中标识项目,并生成对应的数据库名称。
项目数据存储于
~/.squirrel/projects/<project-name>
目录下。

Usage

使用方法

Intro

简介

There are three processes that you can run and they're all cached in the local project database:
  • crawl - subcommand to run a crawl or refresh, continue a crawl
  • analyze - subcommand to analyze the crawl results
  • report - subcommand to generate a report in desired format (llm, text, console, html etc.)
the 'audit' command is a wrapper around these three processes and runs them sequentially:
bash
squirrel audit https://example.com --format llm
YOU SHOULD always prefer format option llm - it was made for you and provides an exhaustive and compact output format.
If the user doesn't provide a website to audit - extrapolate the possibilities in the local directory and checking environment variables (ie. linked vercel projects, references in memory or the code).
If the directory you're running for provides for a method to run or restart a local dev server - run the audit against that.
If you have more than one option on a website to audit that you discover - prompt the user to choose which one to audit.
If there is no website - either local, or on the web to discover to audit, then ask the user which URL they would like to audit.
You should PREFER to audit live websites - only there do we get a TRUE representation of the website and performance or rendering issuers.
If you have both local and live websites to audit, prompt the user to choose which one to audit and SUGGEST they choose live.
You can apply fixes from an audit on the live site against the local code.
When planning scope tasks so they can run concurrently as sub-agents to speed up fixes.
When implementing fixes take advantage of subagents to speed up implementation of fixes.
Run typechecking and formatting against generated code when you finish if available in the environment (ruff for python, biome and tsc for typescript etc.)
你可以运行三个独立的流程,所有结果都会缓存至本地项目数据库:
  • crawl - 执行爬取、刷新爬取或续爬的子命令
  • analyze - 分析爬取结果的子命令
  • report - 生成指定格式报告的子命令(支持llm、text、console、html等格式)
audit
命令是上述三个流程的封装,会按顺序执行:
bash
squirrel audit https://example.com --format llm
请始终优先使用
llm
格式选项——该格式专为AI Agent设计,提供详尽且紧凑的输出。
若用户未指定要审计的网站,请尝试从本地目录、环境变量中推断(如关联的Vercel项目、内存或代码中的引用)。
若当前目录可启动本地开发服务器,请针对该本地服务执行审计。
若发现多个可审计的网站选项,请提示用户选择其中一个。
若未发现任何可审计的本地或线上网站,请询问用户要审计的URL。
优先选择审计线上网站——只有线上网站能真实反映网站的性能与渲染问题。
若同时存在本地与线上网站选项,请提示用户选择,并建议优先选择线上网站。
你可以针对线上网站的审计结果,在本地代码中修复对应问题。
规划任务范围时,可将任务拆分给子Agent并行执行,以加快修复速度。
实施修复时,利用子Agent提升修复效率。
修复完成后,若环境支持(如Python的ruff、TypeScript的biome和tsc等),请对生成的代码执行类型检查与格式化。

Basic Workflow

基础工作流

The audit process is two steps:
  1. Run the audit (saves to database, shows console output)
  2. Export report in desired format
bash
undefined
审计流程分为两步:
  1. 执行审计(结果保存至数据库,同时在控制台输出)
  2. 导出报告(选择所需格式)
bash
undefined

Step 1: Run audit (default: console output)

步骤1:执行审计(默认输出格式:console)

squirrel audit https://example.com
squirrel audit https://example.com

Step 2: Export as LLM format

步骤2:导出为LLM格式报告

squirrel report <audit-id> --format llm
undefined
squirrel report <audit-id> --format llm
undefined

Advanced Options

高级选项

Audit more pages:
bash
squirrel audit https://example.com --max-pages 200
Force fresh crawl (ignore cache):
bash
squirrel audit https://example.com --refresh
Resume interrupted crawl:
bash
squirrel audit https://example.com --resume
Verbose output for debugging:
bash
squirrel audit https://example.com --verbose
审计更多页面:
bash
squirrel audit https://example.com --max-pages 200
强制刷新爬取(忽略缓存):
bash
squirrel audit https://example.com --refresh
续接中断的爬取任务:
bash
squirrel audit https://example.com --resume
启用 verbose 输出用于调试:
bash
squirrel audit https://example.com --verbose

Common Options

常用选项

Audit Command Options

Audit命令选项

OptionAliasDescriptionDefault
--format <fmt>
-f <fmt>
Output format: console, text, json, html, markdown, llmconsole
--max-pages <n>
-m <n>
Maximum pages to crawl (max 500)500
--refresh
-r
Ignore cache, fetch all pages freshfalse
--resume
-Resume interrupted crawlfalse
--verbose
-v
Verbose outputfalse
--debug
-Debug loggingfalse
选项别名描述默认值
--format <fmt>
-f <fmt>
输出格式:console、text、json、html、markdown、llmconsole
--max-pages <n>
-m <n>
最大爬取页面数(上限500)500
--refresh
-r
忽略缓存,重新爬取所有页面false
--resume
-续接中断的爬取任务false
--verbose
-v
启用 verbose 输出false
--debug
-启用调试日志false

Report Command Options

Report命令选项

OptionAliasDescription
--format <fmt>
-f <fmt>
Output format: console, text, json, html, markdown, xml, llm
选项别名描述
--format <fmt>
-f <fmt>
输出格式:console、text、json、html、markdown、xml、llm

Output Formats

输出格式

Console Output (default)

控制台输出(默认)

The
audit
command shows human-readable console output by default with colored output and progress indicators.
audit
命令默认输出人类可读的控制台内容,包含彩色输出与进度指示器。

LLM Format

LLM格式

To get LLM-optimized output, use the
report
command with
--format llm
:
bash
squirrel report <audit-id> --format llm
The LLM format is a compact XML/text hybrid optimized for token efficiency (40% smaller than verbose XML):
  • Summary: Overall health score and key metrics
  • Issues by Category: Grouped by audit rule category (core SEO, technical, content, security)
  • Broken Links: List of broken external and internal links
  • Recommendations: Prioritized action items with fix suggestions
See OUTPUT-FORMAT.md for detailed format specification.
若要获取LLM优化的输出,请使用
report
命令并指定
--format llm
参数:
bash
squirrel report <audit-id> --format llm
LLM格式是紧凑的XML/文本混合格式,优化了令牌效率(比冗余XML小40%):
  • 摘要:整体健康评分与关键指标
  • 分类问题:按审计规则分类(核心SEO、技术、内容、安全等)分组
  • 失效链接:列出所有内部与外部失效链接
  • 改进建议:按优先级排序的可执行任务及修复方案
详细格式规范请参考OUTPUT-FORMAT.md

Examples

示例

Example 1: Quick Site Audit with LLM Output

示例1:快速网站审计并生成LLM格式报告

bash
undefined
bash
undefined

User asks: "Check squirrelscan.com for SEO issues"

用户需求:"检查squirrelscan.com的SEO问题"

squirrel audit https://squirrelscan.com --format llm
undefined
squirrel audit https://squirrelscan.com --format llm
undefined

Example 2: Deep Audit for Large Site

示例2:大型网站深度审计

bash
undefined
bash
undefined

User asks: "Do a thorough audit of my blog with up to 500 pages"

用户需求:"对我的博客进行全面审计,最多爬取500页"

squirrel audit https://myblog.com --max-pages 500 --format llm
undefined
squirrel audit https://myblog.com --max-pages 500 --format llm
undefined

Example 3: Fresh Audit After Changes

示例3:修改后重新审计(忽略缓存)

bash
undefined
bash
undefined

User asks: "Re-audit the site and ignore cached results"

用户需求:"重新审计网站,忽略缓存结果"

squirrel audit https://example.com --refresh --format llm
undefined
squirrel audit https://example.com --refresh --format llm
undefined

Example 4: Two-Step Workflow (Reuse Previous Audit)

示例4:两步工作流(复用之前的审计结果)

bash
undefined
bash
undefined

First run an audit

第一步:执行审计

squirrel audit https://example.com
squirrel audit https://example.com

Note the audit ID from output (e.g., "a1b2c3d4")

记录输出中的审计ID(如:"a1b2c3d4")

Later, export in different format

后续:导出为其他格式

squirrel report a1b2c3d4 --format llm
undefined
squirrel report a1b2c3d4 --format llm
undefined

Output

输出要求

On completion give the user a summary of all of the changes you made.
审计完成后,向用户提供所有已执行修改的摘要。

Troubleshooting

故障排查

squirrel command not found

squirrel命令未找到

If you see this error, squirrel is not installed or not in your PATH.
Solution:
  1. Install squirrel:
    curl -fsSL https://squirrelscan.com/install | bash
  2. Add to PATH:
    export PATH="$HOME/.local/bin:$PATH"
  3. Verify:
    squirrel --version
若出现此错误,说明squirrel未安装或未添加至系统PATH。
解决方案:
  1. 安装squirrel:
    curl -fsSL https://squirrelscan.com/install | bash
  2. 添加至PATH:
    export PATH="$HOME/.local/bin:$PATH"
  3. 验证安装:
    squirrel --version

Permission denied

权限不足

If squirrel is not executable:
bash
chmod +x ~/.local/bin/squirrel
若squirrel无执行权限:
bash
chmod +x ~/.local/bin/squirrel

Crawl timeout or slow performance

爬取超时或性能缓慢

For very large sites, the audit may take several minutes. Use
--verbose
to see progress:
bash
squirrel audit https://example.com --format llm --verbose
对于大型网站,审计可能需要数分钟。使用
--verbose
参数查看进度:
bash
squirrel audit https://example.com --format llm --verbose

Invalid URL

URL无效

Ensure the URL includes the protocol (http:// or https://):
bash
undefined
确保URL包含协议头(http://或https://):
bash
undefined

✗ Wrong

✗ 错误示例

squirrel audit example.com
squirrel audit example.com

✓ Correct

✓ 正确示例

squirrel audit https://example.com
undefined
squirrel audit https://example.com
undefined

How It Works

工作原理

  1. Crawl: Discovers and fetches pages starting from the base URL
  2. Analyze: Runs audit rules on each page
  3. External Links: Checks external links for availability
  4. Report: Generates LLM-optimized report with findings
The audit is stored in a local database and can be retrieved later with
squirrel report
commands.
  1. 爬取:从基础URL开始,发现并获取所有页面
  2. 分析:针对每个页面执行审计规则检查
  3. 外部链接验证:检查外部链接的可用性
  4. 报告生成:生成LLM优化的审计报告
审计结果会存储至本地数据库,后续可通过
squirrel report
命令调取。

Additional Resources

额外资源