技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
render-icon-pipeline【数据与研究】Run viz pipeline → render icons from existing glyphs. Entry for viz subproject: palette gen, data build, manifest create, icon render for skills, agents, teams. Always use build.sh as entry — never call Rscript direct.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Run viz pipeline end-to-end → render icons from existing glyphs. Palette gen, data build, manifest create, icon render for skills, agents, teams.
Canonical entry: bash viz/build.sh [flags] from project root, or bash build.sh [flags] from viz/. Script handles platform detection (WSL, Docker, native), R binary select, step ordering. Never call Rscript direct for build scripts — that path only for MCP server config.
skill, agent, team, all (default all)all (default all)git, design)full, incremental, dry-run (default incremental)Ensure env ready for rendering.
viz/build.sh exists:
ls -la viz/build.sh
node --version
viz/config.yml exists (platform-specific R path profiles):
ls viz/config.yml
build.sh handles R binary resolution auto — no need verify R paths manually. WSL → /usr/local/bin/Rscript (WSL-native R), Docker → container R, native Linux/macOS → Rscript from PATH.
→ build.sh, Node.js, config.yml present.
If err: config.yml missing → pipeline falls back to system defaults. Node.js missing → install via nvm.
build.sh exec 5 steps in order:
palette-colors.json + colors-generated.jsskills.jsonicon-manifest.json, agent-icon-manifest.json, team-icon-manifest.jsonicons/ + icons-hd/ WebP filescli/lib/glyph-data.jsonFull pipeline (all types, all palettes, std + HD):
bash viz/build.sh
Incremental (skip icons existing on disk):
bash viz/build.sh --skip-existing
Single domain (skills only):
bash viz/build.sh --only design
Single entity type:
bash viz/build.sh --type skill
bash viz/build.sh --type agent
bash viz/build.sh --type team
Dry run (preview no rendering):
bash viz/build.sh --dry-run
Std size only (skip HD):
bash viz/build.sh --no-hd
All flags after build.sh passed through to build-all-icons.R.
→ Icons rendered to viz/public/icons/<palette>/ + viz/public/icons-hd/<palette>/.
If err:
.Rprofile bypasses renv/activate.R + sets .libPaths() direct. Ensure run from viz/ (build.sh does auto via cd "$(dirname "$0")")Rscript -e "install.packages(c('ggplot2', 'ggforce', 'ggfx', 'ragg', 'magick', 'future', 'furrr', 'digest'))" from R env build.sh selectscreate-glyph before renderingConfirm render completed.
find viz/public/icons/cyberpunk -name "*.webp" | wc -l
find viz/public/icons-hd/cyberpunk -name "*.webp" | wc -l
audit-icon-pipeline for comprehensive check→ File counts match manifest entry counts. Sizes in expected range.
If err: counts don't match → some glyphs errored during render. Check build log for [ERROR] lines.
All flags passed through build.sh → build-all-icons.R:
| Flag | Default | Description |
|---|---|---|
--type <types> | all | Comma-separated: skill, agent, team |
--palette <name> | all | Single palette or all (9 palettes) |
--only <filter> | none | Domain (skills) or entity ID (agents/teams) |
--skip-existing | off | Skip icons with existing WebP files |
--dry-run | off | List what would be generated |
--size <n> | 512 | Output dimension in pixels |
--glow-sigma <n> | 4 | Glow blur radius |
--workers <n> | auto | Parallel workers (detectCores()-1) |
--no-cache | off | Ignore content-hash cache |
--hd | on | Enable HD variants (1024px) |
--no-hd | off | Skip HD variants |
--strict | off | Exit on first sub-script failure |
For ref only — do NOT run these manually:
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
Pipeline can also run in Docker:
cd viz
docker compose up --build
Runs full pipeline in isolated Linux env + serves on port 8080.
bash viz/build.sh (not bare Rscript)Rscript build-icons.R or Rscript generate-palette-colors.R manually. Always bash build.sh [flags]. Direct calls bypass platform detection + may use wrong R binary (Windows R via ~/bin/Rscript wrapper instead of WSL-native R at /usr/local/bin/Rscript). Note: Windows R path in CLAUDE.md + guides for MCP server config only, not build scripts.build.sh CDs to own dir auto (cd "$(dirname "$0")"), so call from anywhere: bash viz/build.sh from project root works.build.sh runs Steps 1-5 in order, manifests always regen before render. Only need manifests no render → node viz/build-data.js && node viz/build-icon-manifest.js (Node steps no need R)..Rprofile workaround needs running from viz/ — build.sh handles. Using --vanilla or running R from another dir skips it.multisession via config.yml.