enhance-glyph
关于
This skill audits and improves existing R-based pictogram glyphs for visualizations. It diagnoses and fixes issues like poor proportions, readability at small sizes, and unbalanced neon glow effects. Developers should use it to refine skill, agent, or team glyphs after pipeline changes or when a glyph's visual metaphor is unclear.
快速安装
Claude Code
推荐npx skills add pjt222/agent-almanac -a claude-code/plugin add https://github.com/pjt222/agent-almanacgit clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/enhance-glyph在 Claude Code 中复制并粘贴此命令以安装该技能
技能文档
Enhance Glyph
Improve existing pictogram glyph in viz/ → audit render, diagnose issues, targeted mods, re-render, compare before/after. Works skill/agent/team.
Use When
- Glyph renders poor small sizes (details lost, shapes merge)
- Metaphor unclear / mismatch entity
- Proportion issues (too big/small, off-center)
- Neon glow overpowers or underwhelms
- Good in 1 palette, poor others
- Batch improve after new palettes / pipeline change
In
- Required: Entity type —
skill,agent,team - Required: Entity ID (e.g.,
commit-changes,mystic,tending) - Required: Specific issue (readability, proportions, glow, palette compat)
- Optional: Reference glyph showing desired quality
- Optional: Target palette(s) (default: all)
Do
Step 1: Audit
Examine current, identify issues.
- Locate glyph fn by entity type:
- Skills:
viz/R/primitives*.R(19 domain files), mapviz/R/glyphs.R - Agents:
viz/R/agent_primitives.R, mapviz/R/agent_glyphs.R - Teams:
viz/R/team_primitives.R, mapviz/R/team_glyphs.R
- Skills:
- Read fn structure:
- How many layers?
- Which primitives?
- Scale + position?
- View rendered output:
- Skills:
viz/public/icons/cyberpunk/<domain>/<skillId>.webp - Agents:
viz/public/icons/cyberpunk/agents/<agentId>.webp - Teams:
viz/public/icons/cyberpunk/teams/<teamId>.webp - Check 2-3 other palettes
- View icon (~48px) + panel (~160px)
- Skills:
- Score on quality dimensions:
Glyph Quality Dimensions:
+----------------+------+-----------------------------------------------+
| Dimension | 1-5 | Assessment Criteria |
+----------------+------+-----------------------------------------------+
| Readability | | Recognizable at 48px? Clear at 160px? |
| Proportions | | Well-centered? Good use of the 100x100 canvas?|
| Metaphor | | Does the shape clearly represent the entity? |
| Glow balance | | Glow enhances without overwhelming? |
| Palette compat | | Looks good across cyberpunk + viridis palettes?|
| Complexity | | Appropriate layer count (not too busy/sparse)? |
+----------------+------+-----------------------------------------------+
- Identify 1-2 lowest dims → enhancement targets
→ Clear diagnosis. Specific: "proportions: uses 40% canvas" not "looks bad."
If err: fn missing or entity not in *_glyphs.R → glyph not created → use create-glyph.
Step 2: Diagnose
Root cause.
- Readability:
- Too many fine details merge small?
- Low contrast between elements?
- Lines too thin (< 1.5
sizeat s=1.0)? - Elements too close?
- Proportion:
- Scale
stoo small/large? - Center offset from (50, 50)?
- Elements beyond safe area (10-90)?
- Scale
- Glow:
- Stroke width +
ggfx::with_outer_glow():- Thin lines → glow fuzzy
- Thick fills → excessive bloom
- Multiple overlapping → compound glow hot spots
- Stroke width +
- Palette compat:
- Hardcoded colors not
col/bright? - Low-contrast palettes (cividis, mako) make invisible?
- Relies on color variation some palettes lack?
- Hardcoded colors not
- Document specific root cause each issue
→ Root causes point to code changes. "Too small" → "s=0.6, should be 0.8." "Glow overwhelms" → "3 overlapping filled polygons each generate glow."
If err: root cause not obvious from code → render isolation w/ diff params. render_glyph() single glyph to test.
Step 3: Modify
Edit fn → targeted fixes.
- Open file containing fn
- Mods per diagnosis:
- Scale/proportion: Adjust
smultiplier or element offsets - Readability: Simplify, increase stroke width, spacing
- Glow balance: Reduce overlapping fills, outlines where bloom
- Palette compat: All colors from
col/bright, alpha for depth
- Scale/proportion: Adjust
- Follow contract:
glyph_name <- function(cx, cy, s, col, bright) { # cx, cy = center (50, 50) # s = scale (1.0 = ~70% of canvas) # col = domain color, bright = brightened variant # Returns: list() of ggplot2 layers } - Preserve signature — no param change
- Minimal mods — fix diagnosed, no redesign
→ Modified fn addresses Step 1-2 issues. Targeted + minimal.
If err: mods make other dims worse → revert, try diff. Needs redesign → create-glyph.
Step 4: Re-render
Render + verify. Always build.sh → handles platform + R binary. See render-icon-pipeline for flags.
-
Re-render by entity:
# From project root — use --no-cache to force re-render of modified glyph bash viz/build.sh --only <domain> --no-cache # skills bash viz/build.sh --type agent --only <id> --no-cache # agents bash viz/build.sh --type team --only <id> --no-cache # teams -
Verify output exists each palette
-
Check sizes — icons 2-15 KB (WebP):
- Under 2 KB: too simple or render failed
- Over 15 KB: too complex (too many layers)
→ Fresh icons each palette. Sizes in range.
If err: build errs → R console for specific. Common: missing paren, undefined primitives, non-list return. Renders but blank → layers outside canvas.
Step 5: Compare
Verify enhancement improved targets.
- Compare old/new:
- Cyberpunk at icon (48px) + panel (160px)
- ≥2 other palettes (light = turbo, dark = mako)
- Re-score dims from Step 1:
- Target dims ↑ ≥1 pt
- Non-target dims no ↓
- If in force-graph, test there:
- HTTP server:
python3 -m http.server 8080fromviz/ - Load graph, find entity node
- Verify renders default zoom + zoomed in
- HTTP server:
- Document changes + improvement
→ Measurable improvement on targets, no regression others. Better both sizes + all palettes.
If err: marginal improvement or regression → revert, reconsider diagnosis. Sometimes orig limit = inherent to metaphor → metaphor itself needs change (escalate create-glyph).
Check
- Audited w/ specific issue diagnosis
- Root cause each issue
- Mods targeted to diagnosed (no over-edit)
- Fn contract preserved (sig unchanged)
- Re-rendered all palettes
- Before/after shows target improvement
- No regression non-target
- Sizes 2-15 KB WebP
- Renders correctly force-graph (if applicable)
Traps
- Over-enhance: Fix 1 + tweak all. Stick to diagnosed.
- Break contract: Sig change breaks pipeline. 5-param contract immutable.
- Palette-specific opt: Perfect cyberpunk but poor viridis. Check 3+ palettes.
- Ignore small-size: Beautiful 160px that blobs at 48px = fail.
- Forget re-render: Edit fn no build → changes invisible.
- Wrong build cmd: Skills
build-icons.R, agentsbuild-agent-icons.R, teamsbuild-team-icons.R.
→
- create-glyph — new glyph scratch (enhancement insufficient)
- audit-icon-pipeline — detect which need enhance pipeline-wide
- render-icon-pipeline — full pipeline after enhancements
- ornament-style-mono — design principles applied to composition
- chrysopoeia — value extraction parallels optimization (amplify gold, remove dross)
GitHub 仓库
相关推荐技能
content-collections
元Content Collections 是一个 TypeScript 优先的构建工具,可将本地 Markdown/MDX 文件转换为类型安全的数据集合。它专为构建博客、文档站和内容密集型 Vite+React 应用而设计,提供基于 Zod 的自动模式验证。该工具涵盖从 Vite 插件配置、MDX 编译到生产环境部署的完整工作流。
polymarket
元这个Claude Skill为开发者提供完整的Polymarket预测市场开发支持,涵盖API调用、交易执行和市场数据分析。关键特性包括实时WebSocket数据流,可监控实时交易、订单和市场动态。开发者可用它构建预测市场应用、实施交易策略并集成实时市场预测功能。
creating-opencode-plugins
元该Skill帮助开发者创建OpenCode插件,用于接入命令、文件、LSP等25+种事件。它提供了插件结构、事件API规范和JavaScript/TypeScript实现模式,适合需要拦截操作、扩展功能或自定义事件处理的场景。开发者可通过它快速构建响应式模块来增强OpenCode AI助手的能力。
sglang
元SGLang是一个专为LLM设计的高性能推理框架,特别适用于需要结构化输出的场景。它通过RadixAttention前缀缓存技术,在处理JSON、正则表达式、工具调用等具有重复前缀的复杂工作流时,能实现极速生成。如果你正在构建智能体或多轮对话系统,并追求远超vLLM的推理性能,SGLang是理想选择。
