Community程式設計與開發github.com

byteTuto/website

在推送前於本地端檢查 byteTuto 網站 — Docker 建置、nginx 設定、煙霧測試、安全標頭。適用於對 site/、nginx/ 或 Dockerfile 進行任何修改後。

website 是什麼?

此技能為 byteTuto 網站提供本地端預檢流程,確保在推送至正式環境前所有變更皆正確無誤。它會依序執行 Docker 映像檔建置、nginx 設定驗證、容器啟動、健康檢查端點測試、安全標頭驗證(Content-Security-Policy、X-Frame-Options、Cache-Control)、Markdown 內容類型確認以及 SEO 與回應式佈局檢查。支援 Docker 與 Python 環境,並依賴 Playwright 進行回應式快照測試。此技能適用於所有變更 site/、nginx/ 或 Dockerfile 的情境,並包含視覺檢查清單,用於確認背景動畫流暢度、無 JavaScript 控制台錯誤,以及版面符合品牌規範(bytetuto-brand)。流程設計以逐步執行為前提,遇錯即停,便於快速除錯。

相容平台~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   # -> 前置資料 ---
python3 scripts/check_seo_agents.py                            # SEO + 對 AI 代理友善
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 會封鎖所有內聯腳本:JavaScript 均放在 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.

相關技能