Community编程与开发github.com

byteTuto/website

在推送前本地检查 byteTuto 网站——包括 Docker 构建、nginx 配置、冒烟测试和安全标头。适用于对 site/、nginx/ 或 Dockerfile 进行任何修改后。

website 是什么?

该技能提供了一套完整的本地验证流程,用于在推送更新前检查 byteTuto 网站。它依次执行 Docker 镜像构建、nginx 配置测试、容器启动和一系列冒烟测试,包括健康检查、首页内容验证、404 页面测试、安全标头检查(如 Content-Security-Policy、X-Frame-Options、Cache-Control)以及 Markdown 内容类型验证。此外,它还运行 SEO 和代理友好性检查脚本、基于 Playwright 的响应式布局截图测试,并对 shell 脚本执行语法检查。该技能适用于 Claude Code、Cursor 等支持 shell 命令执行的 AI 编码助手,通过严格步骤和失败即停止的策略确保网站质量。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/byteTuto/website/tree/HEAD/.claude/skills/check-site

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

本地检查

按顺序执行,遇到第一个错误就停止并修复:

docker build -t bytetuto-site:local .
docker run --rm bytetuto-site:local nginx -t
docker rm -f bt-check 2>/dev/null; docker run -d --name bt-check -p 8088:80 bytetuto-site:local
sleep 2
curl -fsS http://localhost:8088/healthz                       # -> ok
curl -fsS http://localhost:8088/ | grep -c byteTuto           # > 0
curl -s -o /dev/null -w '%{http_code}\n' http://localhost:8088/x   # -> 404
curl -sI http://localhost:8088/ | grep -iE 'content-security|x-frame|cache-control'
curl -sI http://localhost:8088/index.md | grep -i 'content-type: text/markdown'
curl -s -H 'Accept: text/markdown' http://localhost:8088/ | head -3   # -> front matter ---
python3 scripts/check_seo_agents.py                            # SEO + 代理友好
python3 scripts/check_responsive.py --base http://localhost:8088 --shots /tmp/rs   # 响应式 (Playwright)
docker rm -f bt-check

Playwright 首次使用:pip install playwright && python3 -m playwright install chromium。

Shell 脚本:bash -n deploy/*.sh nginx/*.sh(如果安装了 shellcheck 也可以运行它)。

需肉眼检查的要点(开发模式:docker compose -f docker-compose.dev.yml up → http://localhost:8080)

  • 背景动画流畅运行,且在启用“减少动画”时停止。
  • 控制台无错误(CSP 会阻止所有内联脚本:JS 存放在 site/app.js 中)。
  • 截图 /tmp/rs/*-320x640.png 和 *-375x667.png:内容无裁剪,无元素紧贴边缘。
  • 符合品牌规范(参见技能 bytetuto-brand)。

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

相关技能