audit-website
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWebsite 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
链接
- squirrelscan website is at https://squirrelscan.com
- documentation (including rule references) are at docs.squirrelscan.com
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 | bashThis 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 is not in your PATH, add it to your shell configuration:
~/.local/binbash
export PATH="$HOME/.local/bin:$PATH"若未安装squirrel,可通过以下命令安装:
bash
curl -fsSL https://squirrelscan.com/install | bash该命令会:
- 下载最新版本的二进制文件
- 安装至
~/.local/share/squirrel/releases/{version}/ - 在创建squirrel的符号链接
~/.local/bin/ - 在初始化配置
~/.squirrel/settings.json
若不在系统PATH中,需将其添加至shell配置文件:
~/.local/binbash
export PATH="$HOME/.local/bin:$PATH"Windows Installation
Windows系统安装
Install using PowerShell:
powershell
irm https://squirrelscan.com/install.ps1 | iexThis 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 --versionSetup
配置步骤
Running will setup a squirrel.toml file for configuration in the current directory.
squirrel initEach 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-projector config:
bash
squirrel config set project.name my-projectIf there is no squirrel.toml in the directory you're running from CREATE ONE with and specify the '-n'
parameter for a project name (infer this)
squirrel initThe 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.toml文件。
squirrel init每个项目应设置对应的项目名称,用于数据库标识——默认使用审计的网站名称,但你可以自行设置,以便将同一项目的所有审计结果存储至同一数据库。
你可以在初始化时设置:
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 llmYOU 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等格式)
auditbash
squirrel audit https://example.com --format llm请始终优先使用格式选项——该格式专为AI Agent设计,提供详尽且紧凑的输出。
llm若用户未指定要审计的网站,请尝试从本地目录、环境变量中推断(如关联的Vercel项目、内存或代码中的引用)。
若当前目录可启动本地开发服务器,请针对该本地服务执行审计。
若发现多个可审计的网站选项,请提示用户选择其中一个。
若未发现任何可审计的本地或线上网站,请询问用户要审计的URL。
优先选择审计线上网站——只有线上网站能真实反映网站的性能与渲染问题。
若同时存在本地与线上网站选项,请提示用户选择,并建议优先选择线上网站。
你可以针对线上网站的审计结果,在本地代码中修复对应问题。
规划任务范围时,可将任务拆分给子Agent并行执行,以加快修复速度。
实施修复时,利用子Agent提升修复效率。
修复完成后,若环境支持(如Python的ruff、TypeScript的biome和tsc等),请对生成的代码执行类型检查与格式化。
Basic Workflow
基础工作流
The audit process is two steps:
- Run the audit (saves to database, shows console output)
- Export report in desired format
bash
undefined审计流程分为两步:
- 执行审计(结果保存至数据库,同时在控制台输出)
- 导出报告(选择所需格式)
bash
undefinedStep 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
undefinedsquirrel report <audit-id> --format llm
undefinedAdvanced Options
高级选项
Audit more pages:
bash
squirrel audit https://example.com --max-pages 200Force fresh crawl (ignore cache):
bash
squirrel audit https://example.com --refreshResume interrupted crawl:
bash
squirrel audit https://example.com --resumeVerbose 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 --verboseCommon Options
常用选项
Audit Command Options
Audit命令选项
| Option | Alias | Description | Default |
|---|---|---|---|
| | Output format: console, text, json, html, markdown, llm | console |
| | Maximum pages to crawl (max 500) | 500 |
| | Ignore cache, fetch all pages fresh | false |
| - | Resume interrupted crawl | false |
| | Verbose output | false |
| - | Debug logging | false |
| 选项 | 别名 | 描述 | 默认值 |
|---|---|---|---|
| | 输出格式:console、text、json、html、markdown、llm | console |
| | 最大爬取页面数(上限500) | 500 |
| | 忽略缓存,重新爬取所有页面 | false |
| - | 续接中断的爬取任务 | false |
| | 启用 verbose 输出 | false |
| - | 启用调试日志 | false |
Report Command Options
Report命令选项
| Option | Alias | Description |
|---|---|---|
| | Output format: console, text, json, html, markdown, xml, llm |
| 选项 | 别名 | 描述 |
|---|---|---|
| | 输出格式:console、text、json、html、markdown、xml、llm |
Output Formats
输出格式
Console Output (default)
控制台输出(默认)
The command shows human-readable console output by default with colored output and progress indicators.
auditauditLLM Format
LLM格式
To get LLM-optimized output, use the command with :
report--format llmbash
squirrel report <audit-id> --format llmThe 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 llmbash
squirrel report <audit-id> --format llmLLM格式是紧凑的XML/文本混合格式,优化了令牌效率(比冗余XML小40%):
- 摘要:整体健康评分与关键指标
- 分类问题:按审计规则分类(核心SEO、技术、内容、安全等)分组
- 失效链接:列出所有内部与外部失效链接
- 改进建议:按优先级排序的可执行任务及修复方案
详细格式规范请参考OUTPUT-FORMAT.md。
Examples
示例
Example 1: Quick Site Audit with LLM Output
示例1:快速网站审计并生成LLM格式报告
bash
undefinedbash
undefinedUser asks: "Check squirrelscan.com for SEO issues"
用户需求:"检查squirrelscan.com的SEO问题"
squirrel audit https://squirrelscan.com --format llm
undefinedsquirrel audit https://squirrelscan.com --format llm
undefinedExample 2: Deep Audit for Large Site
示例2:大型网站深度审计
bash
undefinedbash
undefinedUser asks: "Do a thorough audit of my blog with up to 500 pages"
用户需求:"对我的博客进行全面审计,最多爬取500页"
squirrel audit https://myblog.com --max-pages 500 --format llm
undefinedsquirrel audit https://myblog.com --max-pages 500 --format llm
undefinedExample 3: Fresh Audit After Changes
示例3:修改后重新审计(忽略缓存)
bash
undefinedbash
undefinedUser asks: "Re-audit the site and ignore cached results"
用户需求:"重新审计网站,忽略缓存结果"
squirrel audit https://example.com --refresh --format llm
undefinedsquirrel audit https://example.com --refresh --format llm
undefinedExample 4: Two-Step Workflow (Reuse Previous Audit)
示例4:两步工作流(复用之前的审计结果)
bash
undefinedbash
undefinedFirst 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
undefinedsquirrel report a1b2c3d4 --format llm
undefinedOutput
输出要求
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:
- Install squirrel:
curl -fsSL https://squirrelscan.com/install | bash - Add to PATH:
export PATH="$HOME/.local/bin:$PATH" - Verify:
squirrel --version
若出现此错误,说明squirrel未安装或未添加至系统PATH。
解决方案:
- 安装squirrel:
curl -fsSL https://squirrelscan.com/install | bash - 添加至PATH:
export PATH="$HOME/.local/bin:$PATH" - 验证安装:
squirrel --version
Permission denied
权限不足
If squirrel is not executable:
bash
chmod +x ~/.local/bin/squirrel若squirrel无执行权限:
bash
chmod +x ~/.local/bin/squirrelCrawl timeout or slow performance
爬取超时或性能缓慢
For very large sites, the audit may take several minutes. Use to see progress:
--verbosebash
squirrel audit https://example.com --format llm --verbose对于大型网站,审计可能需要数分钟。使用参数查看进度:
--verbosebash
squirrel audit https://example.com --format llm --verboseInvalid 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
undefinedsquirrel audit https://example.com
undefinedHow It Works
工作原理
- Crawl: Discovers and fetches pages starting from the base URL
- Analyze: Runs audit rules on each page
- External Links: Checks external links for availability
- Report: Generates LLM-optimized report with findings
The audit is stored in a local database and can be retrieved later with commands.
squirrel report- 爬取:从基础URL开始,发现并获取所有页面
- 分析:针对每个页面执行审计规则检查
- 外部链接验证:检查外部链接的可用性
- 报告生成:生成LLM优化的审计报告
审计结果会存储至本地数据库,后续可通过命令调取。
squirrel reportAdditional Resources
额外资源
- Output Format Reference: OUTPUT-FORMAT.md
- squirrelscan Documentation: https://docs.squirrelscan.com
- CLI Help:
squirrel audit --help
- 输出格式参考:OUTPUT-FORMAT.md
- squirrelscan文档:https://docs.squirrelscan.com
- CLI帮助:",
squirrel audit --help