skills/google/SKILL.md
Smart Blog Google API 整合。PageSpeed Insights + CrUX Core Web Vitals 查詢。 無 API key 時使用免費端點,有 key 時解鎖 CrUX 真實用戶數據。 Config 儲存於 ~/.config/smart-blog-skills/。 Use when user says "pagespeed", "core web vitals", "CrUX", "page speed", "網頁速度", "效能檢測", "smart-blog google", "google api setup".
npx skillsauth add rainday/smart-blog-skills googleInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
整合 Google PageSpeed Insights 和 CrUX API,為 blog analyze 提供真實效能數據。
| 指令 | 功能 | 需要 API Key |
|------|------|-------------|
| /smart-blog-skills:google setup | 設定 API key | 否 |
| /smart-blog-skills:google pagespeed <URL> | PageSpeed Insights 分析 | 否(建議有) |
| /smart-blog-skills:google crux <URL> | CrUX 真實用戶數據 | 是 |
| Tier | 需要什麼 | 解鎖功能 | 限制 | |------|---------|---------|------| | 0(免費) | 無需任何設定 | PageSpeed Insights(無 key) | 25 次/天(共用配額,可能被限流) | | 1(API Key) | Google Cloud Console 免費 API Key | PageSpeed(專屬配額)+ CrUX | PageSpeed 400 次/天,CrUX 150 次/天 |
/smart-blog-skills:google setup 輸入 key~/.config/smart-blog-skills/
├── config.json ← API key 和偏好設定
└── .gitignore ← 防止意外提交
{
"google_api_key": "",
"default_strategy": "mobile",
"locale": "zh-TW",
"created": "2026-04-06",
"updated": "2026-04-06"
}
chmod 600 config.json(Unix)~/.config/ 下,不會被 git commit* 排除規則SMART_BLOG_GOOGLE_API_KEY 環境變數mkdir -p ~/.config/smart-blog-skills
echo '*' > ~/.config/smart-blog-skills/.gitignore
問使用者:
要設定 Google API Key 嗎?
- 有 Key:輸入 key,解鎖 CrUX + 專屬 PageSpeed 配額
- 沒有 Key:按 Enter 跳過,仍可使用免費 PageSpeed(共用配額)
API Key 儲存在
~/.config/smart-blog-skills/config.json,不會進入 git。
將使用者提供的資訊寫入 ~/.config/smart-blog-skills/config.json。
chmod 600 ~/.config/smart-blog-skills/config.json
Windows 環境跳過此步驟(NTFS 權限由系統管理)。
~/.config/smart-blog-skills/config.jsongoogle_api_key 有值 → Tier 1 模式Tier 0(無 key):
WebFetch: https://www.googleapis.com/pagespeedonline/v5/runPagespeed?url={URL}&strategy=mobile&locale=zh-TW
Tier 1(有 key):
WebFetch: https://www.googleapis.com/pagespeedonline/v5/runPagespeed?url={URL}&strategy=mobile&locale=zh-TW&key={API_KEY}
從回傳的 JSON 提取:
| 指標 | 欄位路徑 | 好 | 待改善 | 差 |
|------|---------|---|--------|---|
| Performance Score | lighthouseResult.categories.performance.score | ≥0.9 | 0.5-0.89 | <0.5 |
| FCP | lighthouseResult.audits.first-contentful-paint | ≤1.8s | 1.8-3s | >3s |
| LCP | lighthouseResult.audits.largest-contentful-paint | ≤2.5s | 2.5-4s | >4s |
| TBT | lighthouseResult.audits.total-blocking-time | ≤200ms | 200-600ms | >600ms |
| CLS | lighthouseResult.audits.cumulative-layout-shift | ≤0.1 | 0.1-0.25 | >0.25 |
| Speed Index | lighthouseResult.audits.speed-index | ≤3.4s | 3.4-5.8s | >5.8s |
## PageSpeed 報告:{URL}
**策略:** Mobile
**Performance Score:** {score}/100
### Core Web Vitals
| 指標 | 數值 | 狀態 |
|------|------|------|
| LCP(最大內容繪製) | {value} | {好/待改善/差} |
| FCP(首次內容繪製) | {value} | {好/待改善/差} |
| TBT(總阻塞時間) | {value} | {好/待改善/差} |
| CLS(累積版面偏移) | {value} | {好/待改善/差} |
| Speed Index | {value} | {好/待改善/差} |
### 改善建議(前 5 項)
| 優先級 | 問題 | 預估節省 |
|--------|------|---------|
| {高/中/低} | {描述} | {時間} |
WebFetch: https://chromeuxreport.googleapis.com/v1/records:queryRecord?key={API_KEY}
POST body:
{
"url": "{URL}",
"formFactor": "PHONE"
}
提取真實用戶的 Core Web Vitals 分佈(p75 值):
附加到 PageSpeed 報告後方:
### CrUX 真實用戶數據(28 天)
| 指標 | p75 | 好 | 待改善 | 差 |
|------|-----|---|--------|---|
| LCP | {value} | {%} | {%} | {%} |
| INP | {value} | {%} | {%} | {%} |
| CLS | {value} | {%} | {%} | {%} |
當使用者執行 /smart-blog-skills:analyze 且文章的 frontmatter 包含 url 或 canonical 欄位時:
這讓 analyze 的「技術元素」類別(15 分)可以基於真實數據評分,而非只檢查 HTML 結構。
| 情境 | 行為 | |------|------| | 無 API Key + 被限流 | 提示使用者申請免費 API Key | | API Key 無效 | 提示檢查 key,退回 Tier 0 | | URL 無法存取 | 報告錯誤,跳過效能檢測 | | CrUX 無數據 | 說明該 URL 流量不足,CrUX 無法提供數據 |
documentation
Smart Blog 寫文章。從零寫一篇新的部落格文章,包含模板選擇、研究、 YouTube 影片嵌入、Humanizer 反 AI 審稿、品質檢查。 內建反幻覺驗證,繁體中文優先。 Use when user says "write blog", "寫文章", "寫部落格", "new blog post", "smart-blog write", "blog write".
testing
Translate existing blog posts into one or more target languages with SEO-optimized localization. Produces native-quality translations that preserve markdown structure, frontmatter, schema JSON-LD, image and chart embeds, and citation capsules. Localizes keywords, meta tags, numbers, dates, currencies, and quote styles per locale. Flags machine-translation artifacts for review. Run BEFORE localize: this handles language conversion; localize handles cultural adaptation after translation completes. Use when user says "translate blog", "blog translate", "uebersetzen", "traduire", "traducir", "translate post", "blog auf Deutsch", "blog en espanol".
development
Extract, suggest, and sync tags and categories for blog posts across all major CMS platforms. Supports WordPress REST API, Shopify GraphQL, Ghost Content API, Strapi REST/GraphQL, and Sanity GROQ. Generates tag suggestions from content analysis (keyword frequency, heading extraction, semantic grouping), enforces minimum post-count thresholds to prevent thin tag archives, and syncs taxonomy via authenticated API calls. Use when user says "tags", "categories", "taxonomy", "tag suggestions", "sync tags", "WordPress tags", "Shopify tags".
development
Blog strategy development including topic cluster architecture with hub-and-spoke design, audience mapping, competitive landscape analysis, AI citation surface strategy across ChatGPT/Perplexity/AI Overviews, distribution channel planning (YouTube, Reddit, review platforms for GEO), content scoring targets, measurement framework, and content differentiation through original research and first-hand experience. Use when user says "blog strategy", "content strategy", "blog positioning", "what should I blog about", "blog topics", "content pillars", "blog ideation".