audit-website by squirrelscan/skills
npx skills add https://github.com/squirrelscan/skills --skill audit-website使用 squirrelscan CLI 工具审计网站的 SEO、技术、内容、性能和安全性问题。
squirrelscan 提供了一个 CLI 工具 squirrel - 支持 macOS、Windows 和 Linux 系统。它通过模拟浏览器、搜索引擎爬虫,并根据超过 230 条规则分析网站的结构和内容,进行全面的网站审计。
它将为您提供问题列表以及如何修复这些问题的建议。
您可以使用以下模板查找任何规则的文档:
https://docs.squirrelscan.com/rules/{rule_category}/{rule_id}
示例:
https://docs.squirrelscan.com/rules/links/external-links
此技能使 AI 代理能够根据 21 个类别中的 230 多条规则审计网站,包括:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
以及更多
审计会爬取网站,根据审计规则分析每个页面,并返回包含以下内容的全面报告:
当您需要时使用此技能:
您应尽可能频繁地重新审计,以确保您的网站保持健康并表现良好。
此技能需要安装 squirrel CLI 并将其添加到 PATH 中。
验证:
squirrel --version
运行 squirrel init 在当前目录中创建 squirrel.toml 配置文件。如果不存在,请创建一个并指定项目名称:
squirrel init -n my-project
# 覆盖现有配置
squirrel init -n my-project --force
您可以运行三个进程,它们都缓存在本地项目数据库中:
'audit' 命令是这三个进程的包装器,并按顺序运行它们:
squirrel audit https://example.com --format llm
您应始终优先选择 llm 格式选项 - 它是为您设计的,并提供详尽且紧凑的输出格式。
第一次扫描应为表面扫描,这是对网站进行快速且浅层的扫描,以收集有关网站的基本信息,如其结构、内容和技术栈。此扫描可以快速完成,且不会影响网站性能。
第二次扫描应为深度扫描,这是对网站进行彻底且详细的扫描,以收集有关网站的更多信息,如其安全性、性能和可访问性。此扫描可能需要更长时间,并可能影响网站性能。
如果用户未提供要审计的网站,请询问他们希望审计哪个 URL。
您应优先审计实时网站 - 只有在那里我们才能获得网站的真实表现以及性能或渲染问题。
如果您有本地和实时网站需要审计,请提示用户选择要审计哪个网站,并建议他们选择实时网站。
您可以根据实时网站的审计结果对本地代码应用修复。
在规划范围任务时,使其可以作为子代理并发运行以加快修复速度。
在实施修复时,利用子代理来加快修复的实施。
应用修复后,验证代码是否仍能构建并通过项目中的任何现有检查。
审计过程分为两个步骤:
# 步骤 1:运行审计(默认:控制台输出)
squirrel audit https://example.com
# 步骤 2:导出为 LLM 格式
squirrel report <audit-id> --format llm
当您需要检测审计之间的回归时,使用差异模式:
# 将当前报告与基线审计 ID 进行比较
squirrel report --diff <audit-id> --format llm
# 将最新的域名报告与基线域名进行比较
squirrel report --regression-since example.com --format llm
差异模式支持 console、text、json、llm 和 markdown。不支持 html 和 xml。
运行审计时:
应用修复后,询问用户是否要审查更改。
| 起始评分 | 目标评分 | 预期工作量 |
|---|---|---|
| < 50(F 级) | 75+(C 级) | 主要修复 |
| 50-70(D 级) | 85+(B 级) | 中等修复 |
| 70-85(C 级) | 90+(A 级) | 优化 |
85(B+ 级) | 95+ | 微调
只有当评分高于 95(A 级)且覆盖率设置为 FULL(--coverage full)时,网站才被视为已完成修复。
| 类别 | 修复方法 | 可并行化 |
|---|---|---|
| 元标签/标题 | 编辑页面组件或元数据 | 否 |
| 结构化数据 | 向页面模板添加 JSON-LD | 否 |
| 缺少 H1/标题 | 编辑页面组件 + 内容文件 | 是(内容) |
| 图片替代文本 | 编辑内容文件 | 是 |
| 标题层次结构 | 编辑内容文件 | 是 |
| 简短描述 | 编辑内容 frontmatter | 是 |
| HTTP→HTTPS 链接 | 在内容中查找并替换 | 是 |
| 损坏的链接 | 手动审查(为用户标记) | 否 |
对于可并行化的修复:生成具有特定文件分配的子代理。
许多问题需要编辑内容文件。这些与代码修复同等重要:
当用户批准一批修复时,您可以使用子代理并行应用它们:
审计更多页面:
squirrel audit https://example.com --max-pages 200
强制重新爬取(忽略缓存):
squirrel audit https://example.com --refresh
恢复中断的爬取:
squirrel audit https://example.com --resume
调试的详细输出:
squirrel audit https://example.com --verbose
| 选项 | 别名 | 描述 | 默认值 |
|---|---|---|---|
--format <fmt> | -f <fmt> | 输出格式:console、text、json、html、markdown、llm | console |
--coverage <mode> | -C <mode> | 覆盖模式:quick、surface、full | surface |
--max-pages <n> | -m <n> | 最大爬取页面数(最多 5000) | 根据覆盖模式变化 |
--output <path> | -o <path> | 输出文件路径 | - |
--refresh | -r | 忽略缓存,重新获取所有页面 | false |
--resume | - | 恢复中断的爬取 | false |
--verbose | -v | 详细输出 | false |
--debug | - | 调试日志记录 | false |
--trace | - | 启用性能跟踪 | false |
--project-name <name> | -n <name> | 覆盖项目名称 | 来自配置 |
根据您的审计需求选择覆盖模式:
| 模式 | 默认页面数 | 行为 | 使用场景 |
|---|---|---|---|
quick | 25 | 仅种子 + 站点地图,无链接发现 | CI 检查、快速健康检查 |
surface | 100 | 每个 URL 模式一个样本 | 常规审计(默认) |
full | 500 | 爬取所有内容直至限制 | 深度分析 |
表面模式是智能的 - 它检测 URL 模式,如 /blog/{slug} 或 /products/{id},并且每个模式仅爬取一个样本。这使得它对于具有许多相似页面(博客、电子商务)的网站非常高效。
# 快速健康检查(25 页,无链接发现)
squirrel audit https://example.com -C quick --format llm
# 默认表面审计(100 页,模式采样)
squirrel audit https://example.com --format llm
# 全面综合审计(500 页)
squirrel audit https://example.com -C full --format llm
# 覆盖任何模式的页面限制
squirrel audit https://example.com -C surface -m 200 --format llm
何时使用每种模式:
quick:CI 流水线、每日健康检查、监控surface:大多数审计 - 高效覆盖独特模板full:发布前、全面分析、深度挖掘| 选项 | 别名 | 描述 |
|---|---|---|
--list | -l | 列出最近的审计 |
--severity <level> | - | 按严重性过滤:error、warning、all |
--category <cats> | - | 按类别过滤(逗号分隔) |
--format <fmt> | -f <fmt> | 输出格式:console、text、json、html、markdown、xml、llm |
--output <path> | -o <path> | 输出文件路径 |
--input <path> | -i <path> | 从 JSON 文件加载(回退模式) |
| 命令 | 描述 |
|---|---|
config show | 显示当前配置 |
config set <key> <value> | 设置配置值 |
config path | 显示配置文件路径 |
config validate | 验证配置文件 |
| 命令 | 描述 |
|---|---|
squirrel feedback | 向 squirrelscan 团队发送反馈 |
squirrel skills install | 安装 Claude Code 技能 |
squirrel skills update | 更新 Claude Code 技能 |
squirrel self 下的自管理命令:
| 命令 | 描述 |
|---|---|
self install | 引导本地安装 |
self update | 检查并应用更新 |
self completion | 生成 shell 补全 |
self doctor | 运行健康检查 |
self version | 显示版本信息 |
self settings | 管理 CLI 设置 |
self uninstall | 从系统中移除 squirrel |
audit 命令默认显示人类可读的控制台输出,带有彩色输出和进度指示器。
要获取 LLM 优化的输出,请使用带有 --format llm 的 report 命令:
squirrel report <audit-id> --format llm
LLM 格式是一种紧凑的 XML/文本混合格式,针对令牌效率进行了优化(比详细 XML 小 40%):
有关详细格式规范,请参阅 OUTPUT-FORMAT.md。
# 用户询问:“检查 squirrelscan.com 的 SEO 问题”
squirrel audit https://squirrelscan.com --format llm
# 用户询问:“对我的博客进行彻底审计,最多 500 页”
squirrel audit https://myblog.com --max-pages 500 --format llm
# 用户询问:“重新审计网站并忽略缓存结果”
squirrel audit https://example.com --refresh --format llm
# 首先运行审计
squirrel audit https://example.com
# 注意输出中的审计 ID(例如,“a1b2c3d4”)
# 稍后,以不同格式导出
squirrel report a1b2c3d4 --format llm
完成后,向用户提供您所做的所有更改的摘要。
如果看到此错误,说明 squirrel 未安装或不在您的 PATH 中。
解决方案:
~/.local/bin 在 PATH 中squirrel --version如果 squirrel 不可执行,请确保二进制文件具有执行权限。从 squirrelscan.com/download 重新安装将解决此问题。
对于非常大的网站,审计可能需要几分钟。使用 --verbose 查看进度:
squirrel audit https://example.com --format llm --verbose
确保 URL 包含协议(http:// 或 https://):
# ✗ 错误
squirrel audit example.com
# ✓ 正确
squirrel audit https://example.com
审计存储在本地数据库中,稍后可以使用 squirrel report 命令检索。
squirrel audit --help每周安装次数
38.6K
仓库
GitHub 星标
67
首次出现
2026 年 1 月 22 日
安全审计
安装于
claude-code31.3K
cursor29.6K
opencode29.2K
gemini-cli28.9K
codex28.8K
antigravity25.0K
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 230+ rules.
It will provide you a list of issues as well as suggestions on how to fix them.
You can look up the docs for any rule with this template:
https://docs.squirrelscan.com/rules/{rule_category}/{rule_id}
example:
https://docs.squirrelscan.com/rules/links/external-links
This skill enables AI agents to audit websites for over 230 rules in 21 categories, including:
and more
The audit crawls the website, analyzes each page against audit rules, and returns a comprehensive report with:
Use this skill when you need to:
You should re-audit as often as possible to ensure your website remains healthy and performs well.
This skill requires the squirrel CLI installed and in PATH.
Install: squirrelscan.com/download
Verify:
squirrel --version
Run squirrel init to create a squirrel.toml config in the current directory. If none exists, create one and specify a project name:
squirrel init -n my-project
# overwrite existing config
squirrel init -n my-project --force
There are three processes that you can run and they're all cached in the local project database:
the 'audit' command is a wrapper around these three processes and runs them sequentially:
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.
FIRST SCAN should be a surface scan, which is a quick and shallow scan of the website to gather basic information about the website, such as its structure, content, and technology stack. This scan can be done quickly and without impacting the website's performance.
SECOND SCAN should be a deep scan, which is a thorough and detailed scan of the website to gather more information about the website, such as its security, performance, and accessibility. This scan can take longer and may impact the website's performance.
If the user doesn't provide a website to audit, ask which URL they'd like audited.
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.
After applying fixes, verify the code still builds and passes any existing checks in the project.
The audit process is two steps:
# Step 1: Run audit (default: console output)
squirrel audit https://example.com
# Step 2: Export as LLM format
squirrel report <audit-id> --format llm
When you need to detect regressions between audits, use diff mode:
# Compare current report against a baseline audit ID
squirrel report --diff <audit-id> --format llm
# Compare latest domain report against a baseline domain
squirrel report --regression-since example.com --format llm
Diff mode supports console, text, json, llm, and markdown. html and xml are not supported.
When running an audit:
Iteration Loop : After fixing a batch of issues, re-audit and continue fixing until:
Treat all fixes equally : Code changes and content changes are equally important.
Parallelize content fixes : For issues affecting multiple files:
Completion criteria :
After fixes are applied, ask the user if they'd like to review the changes.
| Starting Score | Target Score | Expected Work |
|---|---|---|
| < 50 (Grade F) | 75+ (Grade C) | Major fixes |
| 50-70 (Grade D) | 85+ (Grade B) | Moderate fixes |
| 70-85 (Grade C) | 90+ (Grade A) | Polish |
85 (Grade B+) | 95+ | Fine-tuning
A site is only considered COMPLETE and FIXED when scores are above 95 (Grade A) with coverage set to FULL (--coverage full).
| Category | Fix Approach | Parallelizable |
|---|---|---|
| Meta tags/titles | Edit page components or metadata | No |
| Structured data | Add JSON-LD to page templates | No |
| Missing H1/headings | Edit page components + content files | Yes (content) |
| Image alt text | Edit content files | Yes |
| Heading hierarchy | Edit content files | Yes |
| Short descriptions | Edit content frontmatter | Yes |
| HTTP→HTTPS links | Find and replace in content | Yes |
| Broken links | Manual review (flag for user) | No |
For parallelizable fixes : Spawn subagents with specific file assignments.
Many issues require editing content files. These are equally important as code fixes:
When the user approves a batch of fixes, you can use subagents to apply them in parallel:
Audit more pages:
squirrel audit https://example.com --max-pages 200
Force fresh crawl (ignore cache):
squirrel audit https://example.com --refresh
Resume interrupted crawl:
squirrel audit https://example.com --resume
Verbose output for debugging:
squirrel audit https://example.com --verbose
| Option | Alias | Description | Default |
|---|---|---|---|
--format <fmt> | -f <fmt> | Output format: console, text, json, html, markdown, llm | console |
--coverage <mode> | -C <mode> | Coverage mode: quick, surface, full | surface |
--max-pages <n> | -m <n> | Maximum pages to crawl (max 5000) |
Choose a coverage mode based on your audit needs:
| Mode | Default Pages | Behavior | Use Case |
|---|---|---|---|
quick | 25 | Seed + sitemaps only, no link discovery | CI checks, fast health check |
surface | 100 | One sample per URL pattern | General audits (default) |
full | 500 | Crawl everything up to limit | Deep analysis |
Surface mode is smart - it detects URL patterns like /blog/{slug} or /products/{id} and only crawls one sample per pattern. This makes it efficient for sites with many similar pages (blogs, e-commerce).
# Quick health check (25 pages, no link discovery)
squirrel audit https://example.com -C quick --format llm
# Default surface audit (100 pages, pattern sampling)
squirrel audit https://example.com --format llm
# Full comprehensive audit (500 pages)
squirrel audit https://example.com -C full --format llm
# Override page limit for any mode
squirrel audit https://example.com -C surface -m 200 --format llm
When to use each mode:
quick: CI pipelines, daily health checks, monitoringsurface: Most audits - covers unique templates efficientlyfull: Before launches, comprehensive analysis, deep dives| Option | Alias | Description |
|---|---|---|
--list | -l | List recent audits |
--severity <level> | - | Filter by severity: error, warning, all |
--category <cats> | - | Filter by categories (comma-separated) |
--format <fmt> | -f <fmt> | Output format: console, text, json, html, markdown, xml, llm |
| Command | Description |
|---|---|
config show | Show current config |
config set <key> <value> | Set config value |
config path | Show config file path |
config validate | Validate config file |
| Command | Description |
|---|---|
squirrel feedback | Send feedback to squirrelscan team |
squirrel skills install | Install Claude Code skill |
squirrel skills update | Update Claude Code skill |
Self-management commands under squirrel self:
| Command | Description |
|---|---|
self install | Bootstrap local installation |
self update | Check and apply updates |
self completion | Generate shell completions |
self doctor | Run health checks |
self version | Show version information |
self settings | Manage CLI settings |
The audit command shows human-readable console output by default with colored output and progress indicators.
To get LLM-optimized output, use the report command with --format llm:
squirrel report <audit-id> --format llm
The LLM format is a compact XML/text hybrid optimized for token efficiency (40% smaller than verbose XML):
See OUTPUT-FORMAT.md for detailed format specification.
# User asks: "Check squirrelscan.com for SEO issues"
squirrel audit https://squirrelscan.com --format llm
# User asks: "Do a thorough audit of my blog with up to 500 pages"
squirrel audit https://myblog.com --max-pages 500 --format llm
# User asks: "Re-audit the site and ignore cached results"
squirrel audit https://example.com --refresh --format llm
# First run an audit
squirrel audit https://example.com
# Note the audit ID from output (e.g., "a1b2c3d4")
# Later, export in different format
squirrel report a1b2c3d4 --format llm
On completion give the user a summary of all of the changes you made.
If you see this error, squirrel is not installed or not in your PATH.
Solution:
~/.local/bin is in PATHsquirrel --versionIf squirrel is not executable, ensure the binary has execute permissions. Reinstalling from squirrelscan.com/download will fix this.
For very large sites, the audit may take several minutes. Use --verbose to see progress:
squirrel audit https://example.com --format llm --verbose
Ensure the URL includes the protocol (http:// or https://):
# ✗ Wrong
squirrel audit example.com
# ✓ Correct
squirrel audit https://example.com
The audit is stored in a local database and can be retrieved later with squirrel report commands.
squirrel audit --helpWeekly Installs
38.6K
Repository
GitHub Stars
67
First Seen
Jan 22, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
claude-code31.3K
cursor29.6K
opencode29.2K
gemini-cli28.9K
codex28.8K
antigravity25.0K
Azure 升级评估与自动化工具 - 轻松迁移 Functions 计划、托管层级和 SKU
59,200 周安装
| varies by coverage |
--output <path> | -o <path> | Output file path | - |
--refresh | -r | Ignore cache, fetch all pages fresh | false |
--resume | - | Resume interrupted crawl | false |
--verbose | -v | Verbose output | false |
--debug | - | Debug logging | false |
--trace | - | Enable performance tracing | false |
--project-name <name> | -n <name> | Override project name | from config |
--output <path> | -o <path> | Output file path |
--input <path> | -i <path> | Load from JSON file (fallback mode) |
self uninstall | Remove squirrel from the system |