check
檢查 tracked 儲存庫與已安裝 skills 是否有可用更新,但不套用任何變更。
skillshare check # 檢查所有儲存庫與 skills
skillshare check my-skill # 檢查單一 skill
skillshare check a b c # 檢查多個 skills
skillshare check --group frontend # 檢查 frontend/ 下所有 skills
skillshare check x -G backend # 混用名稱與群組
skillshare check --json # 機器可讀輸出
使用時機
更新前
在執行 update 之前先預覽會有什麼變更:
skillshare check # 查看有哪些更新
skillshare update --all # 套用更新
skillshare sync # 分發變更
CI/CD Pipeline
在 CI 中檢查過期的 skills:
result=$(skillshare check --json)
# 解析 JSON 以偵測過期的 skills
執行內容
check 會檢查你的 source 目錄,並回報以下項目的更新狀態:
- Tracked 儲存庫 — 從 origin fetch,顯示落後多少個 commits
- 已安裝的 skills(含 metadata) — 比較已安裝版本與遠端 HEAD
- 過期的 skills — 偵測上游儲存庫中已刪除的子目錄
- 本機 skills — 標記為「local source」(沒有遠端可比較)
- Skill 層級的
targets驗證 — 對 SKILL.mdtargetsfrontmatter 欄位中未知的 target 名稱發出警告
與 update 不同,check 絕不會修改任何檔案。
輸出範例
skillshare check
Tracked Repos
─────────────────────────────────────────
✓ _team-skills up to date
⬇ _shared-rules 3 commits behind
! _design-system has uncommitted changes
Installed Skills (remote)
─────────────────────────────────────────
✓ pdf up to date anthropics/skills
⬇ commit update available anthropics/skills
⚠ old-helper stale (deleted upstream)
• local-skill local source
⚠ 1 skill(s) stale (deleted upstream) — run 'skillshare update --all --prune' to remove
Summary: 1 repo + 1 skill have updates available
Run 'skillshare update <name>' or 'skillshare update --all'
檢查特定 Skills
你可以指定一個或多個 skill 名稱來檢查,而不用掃描全部:
skillshare check my-skill # 單一 skill
skillshare check skill-a skill-b # 多個 skills
使用 --group / -G 檢查群組目錄下所有可更新的 skills:
skillshare check --group frontend # frontend/ 下所有 skills
skillshare check -G frontend -G backend # 多個群組
skillshare check my-skill -G frontend # 混用名稱與群組
若某個位置參數對應到一個群組目錄(而非儲存庫或 skill 本身),會自動展開:
skillshare check frontend # 自動偵測為群組
沒有 metadata 的本機 skills 在展開群組時會被跳過。
選項
| Flag | 說明 |
|---|---|
--group, -G <name> | 檢查群組中所有可更新的 skills(可重複指定) |
--project, -p | 檢查 project 層級的 skills(.skillshare/) |
--global, -g | 檢查 global skills(~/.config/skillshare) |
--json | 以 JSON 輸出(供 scripting/CI 使用) |
--help, -h | 顯示說明 |
自動偵測
若未指定 --project 或 --global,skillshare 會自動偵測:若目前目錄存在 .skillshare/config.yaml,預設使用 project 模式;否則使用 global 模式。
JSON 輸出
skillshare check --json
{
"tracked_repos": [
{"name": "_team-skills", "status": "up_to_date", "behind": 0, "branch": "main"},
{"name": "_shared-rules", "status": "behind", "behind": 3, "branch": "develop"}
],
"skills": [
{"name": "pdf", "source": "anthropics/skills", "version": "a1b2c3d",
"status": "up_to_date", "installed_at": "2024-06-01T10:00:00Z"},
{"name": "commit", "source": "anthropics/skills", "version": "x9y8z7w",
"status": "update_available", "installed_at": "2024-05-15T08:30:00Z"},
{"name": "old-helper", "source": "anthropics/skills", "version": "d4e5f6g",
"status": "stale", "installed_at": "2024-03-10T09:00:00Z"},
{"name": "local-skill", "source": "", "version": "",
"status": "local", "installed_at": "2024-04-20T12:00:00Z"}
]
}
狀態圖示
| 圖示 | 意義 |
|---|---|
✓ | 已是最新 |
⬇ | 有可用更新(tracked 儲存庫:落後的 commits 數;skill:有新版本) |
⚠ | 過期 — 上游子目錄已刪除或重新命名 |
! | 有未提交的變更 |
• | 本機來源(沒有遠端可比較) |
過期的 skills
當某個 skill 的子目錄在上游被重新命名或刪除,check 會回報為 stale(過期)。使用 update --prune 清除過期的 skills。
Monorepo 感知
對於從子目錄安裝的 skills,check 只有在該特定目錄有變更時才回報「update available」— 而不是儲存庫其他不相關部分有新 commits 時。
Project 模式
skillshare check -p # 檢查所有 project skills
skillshare check -p my-skill # 檢查特定 project skill
skillshare check -p --group frontend # 檢查 project 群組
skillshare check -p --json # project 的 JSON 輸出
Agent 支援
skillshare check agents 會將檢查範圍限定於 agents,回報 agents source 目錄中 .md 檔案的漂移與更新狀態:
skillshare check agents # 檢查所有 agents
skillshare check agents --json # agents 的 JSON 輸出
skillshare check agents -p # 檢查 project agents
若不加 agents 參數,check 僅針對 skills 運作(預設行為)。詳見 Agents 了解背景概念。