技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
render-icon-pipeline【数据与研究】Run the viz pipeline to render icons from existing glyphs. Entry point for the viz subproject covering palette generation, data building, manifest creation, and icon rendering for skills, agents, and teams. Always use build.sh as the pipeline entry point — never call Rscript directly.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
端對端跑 viz 管線,自既有字符渲染圖示。涵蓋調色板生成、資料建構、清單建立及為技能、代理人、團隊渲染圖示。
標準入口點:自項目根目錄之 bash viz/build.sh [flags],或自 viz/ 之 bash build.sh [flags]。此腳本處理平台偵測(WSL、Docker、原生)、R 二進位選擇與步驟次序。建構腳本永勿直接呼 Rscript——該路徑僅供 MCP 伺服器配置。
skill、agent、team 或 all(預設 all)all(預設 all)git、design)full、incremental 或 dry-run(預設 incremental)確保環境已備渲染。
viz/build.sh 存在:
ls -la viz/build.sh
node --version
viz/config.yml 存在(平台特定 R 路徑配置):
ls viz/config.yml
build.sh 自動處理 R 二進位解析——無須手動驗 R 路徑。WSL 用 /usr/local/bin/Rscript(WSL 原生 R),Docker 用容器內 R,原生 Linux/macOS 用 PATH 中之 Rscript。
預期: build.sh、Node.js 與 config.yml 皆存。
失敗時: 若 config.yml 缺,管線回退至系統預設。若 Node.js 缺,藉 nvm 安裝。
build.sh 按序執五步:
palette-colors.json + colors-generated.jsskills.jsonicon-manifest.json、agent-icon-manifest.json、team-icon-manifest.jsonicons/ 與 icons-hd/ WebP 文件cli/lib/glyph-data.json完整管線(所有類型、所有調色板、標準與 HD):
bash viz/build.sh
增量(略過已存在之圖示):
bash viz/build.sh --skip-existing
單一領域(僅技能):
bash viz/build.sh --only design
單一實體類型:
bash viz/build.sh --type skill
bash viz/build.sh --type agent
bash viz/build.sh --type team
乾跑(預覽不渲):
bash viz/build.sh --dry-run
僅標準大小(略 HD):
bash viz/build.sh --no-hd
build.sh 之後所有旗標皆透傳至 build-all-icons.R。
預期: 圖示渲染至 viz/public/icons/<palette>/ 與 viz/public/icons-hd/<palette>/。
失敗時:
.Rprofile 繞過 renv/activate.R 並直接設 .libPaths()。確保自 viz/ 跑(build.sh 透過 cd "$(dirname "$0")" 自動處理)build.sh 所選之 R 環境跑 Rscript -e "install.packages(c('ggplot2', 'ggforce', 'ggfx', 'ragg', 'magick', 'future', 'furrr', 'digest'))"create-glyph 技能確認渲染成功完成。
find viz/public/icons/cyberpunk -name "*.webp" | wc -l
find viz/public/icons-hd/cyberpunk -name "*.webp" | wc -l
audit-icon-pipeline 技能作完整檢預期: 文件數合清單條目數。文件大小於預期範圍。
失敗時: 若數不符,部分字符渲染時恐錯。檢構建日誌之 [ERROR] 行。
所有旗標皆透傳 build.sh 至 build-all-icons.R:
| 旗標 | 預設 | 描述 |
|---|---|---|
--type <types> | all | 逗號分隔:skill, agent, team |
--palette <name> | all | 單一調色板或 all(9 調色板) |
--only <filter> | 無 | 領域(技能)或實體 ID(代理/團隊) |
--skip-existing | 關 | 略過已有 WebP 之圖示 |
--dry-run | 關 | 列將生之物 |
--size <n> | 512 | 像素之輸出尺寸 |
--glow-sigma <n> | 4 | 光暈模糊半徑 |
--workers <n> | 自動 | 平行工作者(detectCores()-1) |
--no-cache | 關 | 忽略內容雜湊快取 |
--hd | 開 | 啟用 HD 變體(1024px) |
--no-hd | 關 | 略 HD 變體 |
--strict | 關 | 子腳本首敗即退 |
僅供參考——切勿手動跑此等步驟:
cd viz/
# 1. Platform detection: sets R_CONFIG_ACTIVE (wsl, docker, or unset)
# 2. R binary selection: WSL → /usr/local/bin/Rscript, Docker → same, native → Rscript
# 3. $RSCRIPT generate-palette-colors.R
# 4. node build-data.js
# 5. node build-icon-manifest.js --type all
# 6. $RSCRIPT build-all-icons.R "$@" (flags passed through)
# 7. node build-terminal-glyphs.js
管線亦可於 Docker 中跑:
cd viz
docker compose up --build
此於孤立 Linux 環境跑完整管線並於 8080 埠提供結果。
bash viz/build.sh(非裸 Rscript)Rscript build-icons.R 或 Rscript generate-palette-colors.R。務必用 bash build.sh [flags]。直接 Rscript 呼叫繞過平台偵測,可能用錯之 R 二進位(透過 ~/bin/Rscript 包裝之 Windows R 而非 /usr/local/bin/Rscript 之 WSL 原生 R)。注意:CLAUDE.md 與指南中之 Windows R 路徑僅為 MCP 伺服器配置,非建構腳本所用build.sh 自動 cd 至自身目錄(cd "$(dirname "$0")"),故可自任處呼叫:自項目根之 bash viz/build.sh 正常運作build.sh 按序跑步驟一至五,故清單於渲染前必重建。若僅需清單不渲,用 node viz/build-data.js && node viz/build-icon-manifest.js(Node 步不需 R).Rprofile 之變通需自 viz/ 跑——build.sh 處理之。用 --vanilla 旗標或自他目錄跑 R 將略之config.yml 自選 multisession