cue-ai 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,168 @@
1
+ ---
2
+ description: "When user asks to record a high-quality CLI demo GIF that needs Kitty graphics protocol (real PNG icons inline) — use this headless Xvfb + Kitty + tmux + ffmpeg pipeline instead of vhs/asciinema which don't speak the Kitty protocol"
3
+ requires_mcps: []
4
+ allowed-tools: Bash(Xvfb:*), Bash(kitty:*), Bash(tmux:*), Bash(xdotool:*), Bash(ffmpeg:*), Bash(/usr/bin/ffmpeg:*), Read(*), Write(*)
5
+ ---
6
+
7
+ # Headless GIF demos with Kitty + tmux + Xvfb + ffmpeg
8
+
9
+ When you need a demo GIF of a CLI tool that uses **Kitty graphics protocol** (e.g. cue's brand-logo PNGs in `cue optimizer`), `vhs` and `asciinema` won't work — they render in `ttyd` which doesn't speak the protocol. Logos show as garbled placeholder boxes or fall back to emoji.
10
+
11
+ This skill captures the working pipeline: spin up a virtual X display, run real Kitty inside it (no monitor needed), drive the demo with `tmux send-keys`, and screen-record with `ffmpeg x11grab`.
12
+
13
+ ## When to use
14
+
15
+ - ✅ Demo of a CLI that uses Kitty graphics (inline images, brand logos, plots)
16
+ - ✅ Demo of a TUI that depends on truecolor + Unicode + Nerd Font glyphs
17
+ - ✅ Demo that must show interactive prompts (pickers, confirmations)
18
+ - ❌ Plain shell-output demos → use `vhs` (simpler, no X needed)
19
+ - ❌ Real session recordings → use `asciinema` (escape-sequence based)
20
+
21
+ ## Required tools
22
+
23
+ | Tool | Install (apt) | Install (nix) |
24
+ |---|---|---|
25
+ | `Xvfb` | `sudo apt install xvfb` | `nix profile install nixpkgs#xorg.xorgserver` |
26
+ | `xdotool` | `sudo apt install xdotool` | `nix profile install nixpkgs#xdotool` |
27
+ | `ffmpeg` with `x11grab` | `sudo apt install ffmpeg` (**not** nix-pure ffmpeg — that one lacks x11grab) | `nix profile install nixpkgs#ffmpeg-full` |
28
+ | `kitty` | already on your box | — |
29
+ | `tmux` | already on your box | — |
30
+
31
+ **Gotcha:** verify ffmpeg has x11grab with `ffmpeg -devices | grep x11`. nix's stock `ffmpeg` doesn't ship it — use `/usr/bin/ffmpeg` (apt) or `ffmpeg-full` (nix).
32
+
33
+ ## The pipeline
34
+
35
+ ```
36
+ Xvfb :99 → kitty (--start-as=fullscreen, attached to tmux session)
37
+
38
+ tmux send-keys (drives demo non-interactively)
39
+
40
+ ffmpeg x11grab :99 (records the virtual display to mp4)
41
+
42
+ ffmpeg palettegen + paletteuse (2-pass → sharp gif)
43
+ ```
44
+
45
+ ## Key parameters that matter
46
+
47
+ 1. **Strip cue/claude env vars before launching the inner shell** — `unset CUE_LAUNCHING CLAUDE_CONFIG_DIR CLAUDECODE CLAUDE_CODE_SESSION_ID CLAUDE_EFFORT AI_AGENT CODEX_HOME`. Otherwise the shim's recursion guard fires the moment you type `claude`.
48
+
49
+ 2. **PATH ordering inside the inner shell.** `~/.local/bin` (shim) must come first so `claude` resolves to the shim; the real binary (e.g. `~/.nvm/versions/node/<v>/bin`) must come next so `cue launch` can `exec` it. nvm-installed binaries are NOT inherited by ttyd's bash — set PATH explicitly.
50
+
51
+ 3. **tmux passthrough for Kitty graphics.** Inner tmux config needs:
52
+ ```
53
+ set -g allow-passthrough on
54
+ set -g default-terminal "xterm-kitty"
55
+ set -as terminal-features ",xterm-kitty:RGB"
56
+ ```
57
+ Plus `export TERM=xterm-kitty` and `export CUE_KITTY=1` inside the tmux pane so cue uses the kitty path through tmux.
58
+
59
+ 4. **Kitty must fill the Xvfb display.** Use `--start-as=fullscreen` (no WM needed). If that fails on a minimal Xvfb, `xdotool search --class <cls> windowsize <W> <H>` as a fallback. Without this, kitty opens at 80×24 in a corner and ffmpeg captures mostly blank pixels — the GIF comes out ~20 KB instead of ~1 MB.
60
+
61
+ 5. **Kitty option values are raw — never `px`.** `--override initial_window_width=1500`, not `1500px`. The parser rejects the suffix and kitty silently fails to start; xdotool then finds no window and ffmpeg records the empty Xvfb root.
62
+
63
+ 6. **Verify before recording.** After kitty launches, grab a single frame:
64
+ ```bash
65
+ DISPLAY=:99 xwd -root | convert xwd:- /tmp/preflight.png
66
+ ```
67
+ If `/tmp/preflight.png` is solid color → kitty isn't on Xvfb. If it shows your terminal → start ffmpeg.
68
+
69
+ 7. **Pickers ask twice.** After Enter selects a profile, cue's picker shows a second "Pin to this directory? Yes/No" prompt. Need a second Enter to confirm or your demo hangs.
70
+
71
+ ## Skeleton script
72
+
73
+ See [`scripts/record-demo-kitty.sh`](../../../../../scripts/record-demo-kitty.sh) for the complete working version. Structure:
74
+
75
+ ```bash
76
+ #!/usr/bin/env bash
77
+ set -euo pipefail
78
+
79
+ DISPLAY_NUM=:99
80
+ WIDTH=1500; HEIGHT=900
81
+ FFMPEG=/usr/bin/ffmpeg # the apt build — has x11grab
82
+
83
+ # 1. virtual display
84
+ Xvfb $DISPLAY_NUM -screen 0 ${WIDTH}x${HEIGHT}x24 &
85
+ XVFB_PID=$!
86
+ trap "kill $XVFB_PID 2>/dev/null" EXIT
87
+ sleep 1.5
88
+
89
+ # 2. tmux config + detached session
90
+ cat > /tmp/tmux.conf <<'EOF'
91
+ set -g allow-passthrough on
92
+ set -g default-terminal "xterm-kitty"
93
+ set -g status off
94
+ EOF
95
+ DISPLAY=$DISPLAY_NUM tmux -L demo -f /tmp/tmux.conf \
96
+ new-session -d -s d -x $((WIDTH/10)) -y $((HEIGHT/22)) \
97
+ "cd /tmp/cue-demo && bash --noprofile --norc -i"
98
+
99
+ SEND() { tmux -L demo send-keys -t d "$@"; }
100
+ SEND 'unset CUE_LAUNCHING CLAUDE_CONFIG_DIR CLAUDECODE' Enter
101
+ SEND 'export PATH="$HOME/.local/bin:$HOME/.nvm/versions/node/v22.22.0/bin:$PATH"' Enter
102
+ SEND 'export TERM=xterm-kitty CUE_KITTY=1' Enter
103
+ SEND 'clear' Enter
104
+ sleep 0.5
105
+
106
+ # 3. real kitty on the virtual display
107
+ DISPLAY=$DISPLAY_NUM kitty \
108
+ --class cue-demo --start-as=fullscreen \
109
+ --override font_family="JetBrainsMono Nerd Font" \
110
+ --override font_size=14 \
111
+ --override initial_window_width=$WIDTH \
112
+ --override initial_window_height=$HEIGHT \
113
+ -- tmux -L demo attach -t d &
114
+ sleep 2.5
115
+
116
+ # 4. preflight
117
+ DISPLAY=$DISPLAY_NUM xwd -root | convert xwd:- /tmp/preflight.png
118
+ echo "preflight: $(identify -format '%[mean]' /tmp/preflight.png) mean intensity"
119
+
120
+ # 5. record
121
+ $FFMPEG -y -f x11grab -video_size ${WIDTH}x${HEIGHT} -framerate 15 \
122
+ -i $DISPLAY_NUM -t 40 -c:v libx264 -preset ultrafast -pix_fmt yuv420p \
123
+ /tmp/raw.mp4 &
124
+ FFMPEG_PID=$!
125
+ sleep 1
126
+
127
+ # 6. drive the demo
128
+ SEND 'cue optimizer readme-writer' Enter
129
+ sleep 7
130
+ SEND 'claude' Enter
131
+ sleep 3
132
+ for i in $(seq 1 14); do SEND Down; sleep 0.08; done
133
+ sleep 0.7
134
+ SEND Enter # selects profile
135
+ sleep 1.6
136
+ SEND Enter # answers "Pin to this directory? Yes" prompt
137
+ sleep 7
138
+
139
+ wait $FFMPEG_PID
140
+
141
+ # 7. 2-pass mp4 → gif (sharp colors)
142
+ $FFMPEG -y -i /tmp/raw.mp4 \
143
+ -vf "fps=12,scale=1200:-1:flags=lanczos,palettegen=stats_mode=diff" \
144
+ /tmp/palette.png
145
+ $FFMPEG -y -i /tmp/raw.mp4 -i /tmp/palette.png \
146
+ -lavfi "fps=12,scale=1200:-1:flags=lanczos [x]; [x][1:v] paletteuse=dither=bayer:bayer_scale=4" \
147
+ docs/assets/demo.gif
148
+ ```
149
+
150
+ ## Sanity check the output
151
+
152
+ Healthy capture:
153
+ - raw mp4 ≥ 500 KB for ~30 s recording
154
+ - output gif 400 KB – 2 MB
155
+ - `ffmpeg -i raw.mp4` reports bitrate in the hundreds of kbps, not single digits
156
+
157
+ Pathological capture (means kitty didn't render to Xvfb):
158
+ - raw mp4 < 50 KB (4 kbps bitrate is the smoking gun)
159
+ - gif comes out 10–20 KB
160
+ - single extracted frame compresses to a few KB (solid color)
161
+
162
+ ## Workflow
163
+
164
+ 1. Verify tools: `which Xvfb xdotool kitty tmux && /usr/bin/ffmpeg -devices | grep x11`
165
+ 2. Copy the skeleton from [`scripts/record-demo-kitty.sh`](../../../../../scripts/record-demo-kitty.sh) — adapt the demo commands
166
+ 3. Test-run; check the preflight screenshot is non-empty
167
+ 4. Iterate on timing — pickers and Claude Code splash both need 2–3 s headroom
168
+ 5. Commit both the script and the resulting GIF — re-running gives byte-identical output for a fixed tape
@@ -0,0 +1,152 @@
1
+ ---
2
+ name: kiro-powers
3
+ description: >-
4
+ When user says "import kiro power", "add power to profile", or "use X power" —
5
+ import a Kiro Power (POWER.md + MCP config) from GitHub into a cue profile as
6
+ a skill + MCP entry. Bridges the Kiro Powers ecosystem into cue.
7
+ tags: [meta, cue, kiro, powers, interop]
8
+ category: meta
9
+ version: 1.0.0
10
+ requires_mcps: []
11
+ allowed-tools: Bash(curl:*), Bash(gh:*), Bash(git:*), Read(*), Write(*)
12
+ ---
13
+
14
+ # Kiro Powers → cue Profile Importer
15
+
16
+ Import Kiro Powers (from kiro.dev or GitHub) into cue profiles. A Kiro Power is:
17
+ - `POWER.md` — steering file with activation keywords + workflow instructions
18
+ - MCP server configuration
19
+ - Optional hooks and slash commands
20
+
21
+ cue can use these directly by converting them to skill + MCP entries.
22
+
23
+ ## When to activate
24
+
25
+ - User says "import kiro power X" or "add the Stripe power"
26
+ - User says "use kiro powers" or "convert power to skill"
27
+ - User mentions a known Kiro power partner (Supabase, Stripe, Neon, Netlify, Figma, Postman, Datadog)
28
+
29
+ ## Power → cue Mapping
30
+
31
+ | Kiro Power component | cue equivalent |
32
+ |---------------------|----------------|
33
+ | `POWER.md` | Skill `SKILL.md` (rename + adapt frontmatter) |
34
+ | MCP server config | Entry in `resources/mcps/configs/` |
35
+ | Activation keywords | Skill `description` field (triggers matching) |
36
+ | Hooks | Skill body instructions |
37
+ | Slash commands | Skill body sections |
38
+
39
+ ## Workflow
40
+
41
+ ### 1. Find the Power
42
+
43
+ ```bash
44
+ # From GitHub URL
45
+ git clone --depth 1 <power-repo-url> /tmp/power-import
46
+
47
+ # Or from known partners
48
+ # Supabase: github.com/supabase/kiro-power
49
+ # Stripe: github.com/stripe/kiro-power
50
+ # Neon: github.com/neondatabase/kiro-power
51
+ ```
52
+
53
+ Check for `POWER.md` at the root or in a `power/` subdirectory.
54
+
55
+ ### 2. Parse the Power
56
+
57
+ Read `POWER.md` and extract:
58
+
59
+ ```
60
+ ---
61
+ name: supabase
62
+ keywords: [database, postgres, supabase, rls, edge-functions]
63
+ mcp:
64
+ command: npx
65
+ args: ["-y", "@supabase/mcp-server"]
66
+ env:
67
+ SUPABASE_ACCESS_TOKEN: "${SUPABASE_ACCESS_TOKEN}"
68
+ ---
69
+
70
+ # Supabase Power
71
+
72
+ ## Onboarding
73
+ ...
74
+
75
+ ## Workflows
76
+ ...
77
+ ```
78
+
79
+ ### 3. Convert to cue skill
80
+
81
+ Create `resources/skills/skills/kiro/<power-name>/SKILL.md`:
82
+
83
+ ```markdown
84
+ ---
85
+ name: <power-name>
86
+ description: "<keywords joined as natural language trigger>"
87
+ tags: [kiro-power, <power-name>]
88
+ category: kiro
89
+ version: 1.0.0
90
+ requires_mcps: [<power-name>]
91
+ allowed-tools: mcp__<power-name>__*
92
+ ---
93
+
94
+ <POWER.md body content here>
95
+ ```
96
+
97
+ ### 4. Add MCP config
98
+
99
+ Add to `resources/mcps/configs/claude_runtime.sanitized.json`:
100
+
101
+ ```json
102
+ {
103
+ "servers": {
104
+ "<power-name>": {
105
+ "command": "npx",
106
+ "args": ["-y", "@supabase/mcp-server"],
107
+ "env": {
108
+ "SUPABASE_ACCESS_TOKEN": "${SUPABASE_ACCESS_TOKEN}"
109
+ }
110
+ }
111
+ }
112
+ }
113
+ ```
114
+
115
+ ### 5. Add to profile
116
+
117
+ ```yaml
118
+ # In profiles/<target>/profile.yaml
119
+ skills:
120
+ local:
121
+ - kiro/<power-name>
122
+ mcps:
123
+ - <power-name>
124
+ ```
125
+
126
+ ### 6. Verify
127
+
128
+ ```bash
129
+ cue validate <profile>
130
+ cue doctor --profile <profile>
131
+ ```
132
+
133
+ ## Known Kiro Power Partners
134
+
135
+ | Power | MCP Package | Keywords |
136
+ |-------|------------|----------|
137
+ | Supabase | `@supabase/mcp-server` | database, postgres, supabase, rls |
138
+ | Stripe | `@stripe/mcp` | payment, checkout, billing, stripe |
139
+ | Neon | `@neondatabase/mcp-server` | postgres, neon, serverless-db |
140
+ | Netlify | `@netlify/mcp-server` | deploy, netlify, hosting |
141
+ | Figma | `@figma/mcp-server` | design, figma, ui, components |
142
+ | Postman | `@postman/mcp-server` | api, testing, postman, collections |
143
+ | Datadog | `@datadog/mcp-server` | monitoring, datadog, observability |
144
+
145
+ ## Rules
146
+
147
+ - Always preserve the original POWER.md content — it contains the expertise
148
+ - Map `keywords` to the skill `description` for cue's matching
149
+ - Add `requires_mcps` so cue warns if the MCP isn't configured
150
+ - Keep the MCP env vars as `${PLACEHOLDER}` — user fills them in
151
+ - If the power has multiple steering files, create one skill per workflow OR bundle them as references/
152
+ - Confirm with user before writing to the MCP registry
@@ -1,143 +1,168 @@
1
1
  ---
2
2
  name: find-skills
3
3
  description: >-
4
- Use when user says "find skills", "available skills", or "skill search". Catalog search, matching, install suggestions.
4
+ When user says "find skills for X", "search for skills", "what skills exist for Y",
5
+ or "add SVG/diagram/testing/etc skills to my profile" — search GitHub for open-source
6
+ Claude Code skills, evaluate them, and add the best ones to the active profile.
7
+ tags: [meta, cue, research, skills]
8
+ category: research
9
+ version: 1.0.0
10
+ requires_mcps: []
11
+ allowed-tools: Bash(curl:*), Bash(gh:*), WebFetch, WebSearch, Read(*), Write(*)
5
12
  ---
6
13
 
7
- # Find Skills
14
+ # Find & Install Open-Source Skills
8
15
 
9
- This skill helps you discover and install skills from the open agent skills ecosystem.
16
+ Search GitHub for Claude Code / Codex skills that match a user's need, evaluate quality, and add them to the active cue profile.
10
17
 
11
- ## When to Use This Skill
18
+ ## When to activate
12
19
 
13
- Use this skill when the user:
20
+ - User says "find skills for X" or "search for X skills"
21
+ - User says "what open-source skills exist for Y?"
22
+ - User says "add diagram/testing/deployment/etc skills to my profile"
23
+ - User describes a capability gap and you think a public skill could fill it
14
24
 
15
- - Asks "how do I do X" where X might be a common task with an existing skill
16
- - Says "find a skill for X" or "is there a skill for X"
17
- - Asks "can you do X" where X is a specialized capability
18
- - Expresses interest in extending agent capabilities
19
- - Wants to search for tools, templates, or workflows
20
- - Mentions they wish they had help with a specific domain (design, testing, deployment, etc.)
25
+ ## Workflow
21
26
 
22
- ## What is the Skills CLI?
27
+ ### 1. Search GitHub for skills
23
28
 
24
- The Skills CLI (`npx skills`) is the package manager for the open agent skills ecosystem. Skills are modular packages that extend agent capabilities with specialized knowledge, workflows, and tools.
29
+ Use multiple search strategies:
25
30
 
26
- **Key commands:**
27
-
28
- - `npx skills find [query]` - Search for skills interactively or by keyword
29
- - `npx skills add <package>` - Install a skill from GitHub or other sources
30
- - `npx skills check` - Check for skill updates
31
- - `npx skills update` - Update all installed skills
32
-
33
- **Browse skills at:** https://skills.sh/
34
-
35
- ## How to Help Users Find Skills
36
-
37
- ### Step 1: Understand What They Need
38
-
39
- When a user asks for help with something, identify:
40
-
41
- 1. The domain (e.g., React, testing, design, deployment)
42
- 2. The specific task (e.g., writing tests, creating animations, reviewing PRs)
43
- 3. Whether this is a common enough task that a skill likely exists
44
-
45
- ### Step 2: Check the Leaderboard First
46
-
47
- Before running a CLI search, check the [skills.sh leaderboard](https://skills.sh/) to see if a well-known skill already exists for the domain. The leaderboard ranks skills by total installs, surfacing the most popular and battle-tested options.
48
-
49
- For example, top skills for web development include:
50
- - `vercel-labs/agent-skills` — React, Next.js, web design (100K+ installs each)
51
- - `anthropics/skills` — Frontend design, document processing (100K+ installs)
52
-
53
- ### Step 3: Search for Skills
31
+ ```bash
32
+ # Strategy A: GitHub topic search (most reliable)
33
+ curl -sL "https://api.github.com/search/repositories?q=topic:claude-code-skill+topic:$TOPIC&sort=stars&per_page=10" \
34
+ -H "Accept: application/vnd.github.v3+json" | jq '.items[] | {name: .full_name, stars: .stargazers_count, desc: .description, url: .html_url}'
54
35
 
55
- If the leaderboard doesn't cover the user's need, run the find command:
36
+ # Strategy B: Search for SKILL.md files (catches skills not tagged)
37
+ curl -sL "https://api.github.com/search/code?q=filename:SKILL.md+$KEYWORD&per_page=10" \
38
+ -H "Accept: application/vnd.github.v3+json" | jq '.items[] | {repo: .repository.full_name, path: .path}'
56
39
 
57
- ```bash
58
- npx skills find [query]
40
+ # Strategy C: Topic-based discovery
41
+ curl -sL "https://api.github.com/search/repositories?q=$KEYWORD+claude+skill+in:name,description,readme&sort=stars&per_page=10" \
42
+ -H "Accept: application/vnd.github.v3+json" | jq '.items[] | {name: .full_name, stars: .stargazers_count, desc: .description}'
59
43
  ```
60
44
 
61
- For example:
62
-
63
- - User asks "how do I make my React app faster?" → `npx skills find react performance`
64
- - User asks "can you help me with PR reviews?" → `npx skills find pr review`
65
- - User asks "I need to create a changelog" → `npx skills find changelog`
45
+ Also search for known high-quality skill collections:
46
+ - `anthropics/skills` — official Anthropic skills
47
+ - `daymade/claude-code-skills` curated collection
48
+ - `levnikolaevich/claude-code-skills` delivery workflow skills
49
+ - `yizhiyanhua-ai/fireworks-tech-graph` SVG diagram generation
50
+ - `cathrynlavery/diagram-design` — editorial diagrams
51
+ - `oh-my-mermaid/oh-my-mermaid` — architecture diagrams from code
66
52
 
67
- ### Step 4: Verify Quality Before Recommending
53
+ ### 2. Evaluate each candidate
68
54
 
69
- **Do not recommend a skill based solely on search results.** Always verify:
55
+ For each promising repo, check:
70
56
 
71
- 1. **Install count** — Prefer skills with 1K+ installs. Be cautious with anything under 100.
72
- 2. **Source reputation** Official sources (`vercel-labs`, `anthropics`, `microsoft`) are more trustworthy than unknown authors.
73
- 3. **GitHub stars** — Check the source repository. A skill from a repo with <100 stars should be treated with skepticism.
57
+ ```bash
58
+ # Check if it has a SKILL.md (required for cue compatibility)
59
+ curl -sL "https://api.github.com/repos/$REPO/contents/" \
60
+ -H "Accept: application/vnd.github.v3+json" | jq '.[].name' | grep -i "skill"
74
61
 
75
- ### Step 5: Present Options to the User
62
+ # Check stars, last commit, license
63
+ curl -sL "https://api.github.com/repos/$REPO" \
64
+ -H "Accept: application/vnd.github.v3+json" | jq '{stars: .stargazers_count, updated: .updated_at, license: .license.spdx_id, archived: .archived}'
65
+ ```
76
66
 
77
- When you find relevant skills, present them to the user with:
67
+ **Quality criteria (score 1-5):**
68
+ - ⭐ Stars: >1k = 5, >500 = 4, >100 = 3, >20 = 2, <20 = 1
69
+ - 📅 Last updated: <1 month = 5, <3 months = 4, <6 months = 3, <1 year = 2, >1 year = 1
70
+ - 📄 Has SKILL.md: required (skip if missing)
71
+ - 📜 License: MIT/Apache/ISC = ✓, no license = ⚠️ warn user
72
+ - 🏗️ Structure: has references/, templates/, or examples/ = bonus
78
73
 
79
- 1. The skill name and what it does
80
- 2. The install count and source
81
- 3. The install command they can run
82
- 4. A link to learn more at skills.sh
74
+ ### 3. Present findings to user
83
75
 
84
- Example response:
76
+ Format results as a ranked table:
85
77
 
86
78
  ```
87
- I found a skill that might help! The "react-best-practices" skill provides
88
- React and Next.js performance optimization guidelines from Vercel Engineering.
89
- (185K installs)
90
-
91
- To install it:
92
- npx skills add vercel-labs/agent-skills@react-best-practices
93
-
94
- Learn more: https://skills.sh/vercel-labs/agent-skills/react-best-practices
79
+ 🔍 Found 4 skills for "SVG diagrams":
80
+
81
+ ⭐⭐⭐⭐⭐ yizhiyanhua-ai/fireworks-tech-graph (7k stars)
82
+ "Generate production-quality SVG+PNG technical diagrams from natural language"
83
+ 7 styles, 14 diagram types, AI/Agent patterns
84
+ License: MIT | Updated: 2 weeks ago
85
+ Install: npx ref → yizhiyanhua-ai/fireworks-tech-graph
86
+
87
+ ⭐⭐⭐⭐ cathrynlavery/diagram-design (2.4k stars)
88
+ "Thirteen editorial diagram types for Claude Code. Self-contained HTML+SVG."
89
+ Brand-aware, no Mermaid, editorial quality
90
+ License: MIT | Updated: 1 month ago
91
+ Install: npx ref → cathrynlavery/diagram-design
92
+
93
+ ⭐⭐⭐ oh-my-mermaid/oh-my-mermaid (800 stars)
94
+ "Turn complex codebases into clear architecture diagrams"
95
+ Mermaid-based, auto-generates from code
96
+ License: MIT | Updated: 3 weeks ago
97
+ Install: npx ref → oh-my-mermaid/oh-my-mermaid
98
+
99
+ ⚠️ some-user/svg-tool (15 stars)
100
+ Skipped: too few stars, no SKILL.md found
95
101
  ```
96
102
 
97
- ### Step 6: Offer to Install
103
+ ### 4. Add to profile (with user confirmation)
98
104
 
99
- If the user wants to proceed, you can install the skill for them:
105
+ After user picks which skills to add:
100
106
 
101
107
  ```bash
102
- npx skills add <owner/repo@skill> -g -y
108
+ # Check current profile
109
+ PROFILE=$(cat .cue-profile 2>/dev/null || cue current --json 2>/dev/null | jq -r '.profile')
110
+
111
+ # Show what will be added
112
+ echo "Adding to profile: $PROFILE"
113
+ echo " npx:"
114
+ echo " - repo: yizhiyanhua-ai/fireworks-tech-graph"
115
+ echo " skills: [fireworks-tech-graph]"
103
116
  ```
104
117
 
105
- The `-g` flag installs globally (user-level) and `-y` skips confirmation prompts.
106
-
107
- ## Common Skill Categories
108
-
109
- When searching, consider these common categories:
110
-
111
- | Category | Example Queries |
112
- | --------------- | ---------------------------------------- |
113
- | Web Development | react, nextjs, typescript, css, tailwind |
114
- | Testing | testing, jest, playwright, e2e |
115
- | DevOps | deploy, docker, kubernetes, ci-cd |
116
- | Documentation | docs, readme, changelog, api-docs |
117
- | Code Quality | review, lint, refactor, best-practices |
118
- | Design | ui, ux, design-system, accessibility |
119
- | Productivity | workflow, automation, git |
118
+ Then edit the profile YAML:
120
119
 
121
- ## Tips for Effective Searches
120
+ ```bash
121
+ # Read current profile
122
+ cat profiles/$PROFILE/profile.yaml
122
123
 
123
- 1. **Use specific keywords**: "react testing" is better than just "testing"
124
- 2. **Try alternative terms**: If "deploy" doesn't work, try "deployment" or "ci-cd"
125
- 3. **Check popular sources**: Many skills come from `vercel-labs/agent-skills` or `ComposioHQ/awesome-claude-skills`
124
+ # Add the npx entry under skills.npx
125
+ # (use the agent to edit the YAML properly)
126
+ ```
126
127
 
127
- ## When No Skills Are Found
128
+ Or use the cue CLI if available:
128
129
 
129
- If no relevant skills exist:
130
+ ```bash
131
+ cue skills add-to-profile --npx "yizhiyanhua-ai/fireworks-tech-graph:fireworks-tech-graph" --profile $PROFILE
132
+ ```
130
133
 
131
- 1. Acknowledge that no existing skill was found
132
- 2. Offer to help with the task directly using your general capabilities
133
- 3. Suggest the user could create their own skill with `npx skills init`
134
+ ### 5. Verify installation
134
135
 
135
- Example:
136
+ ```bash
137
+ # Validate the updated profile
138
+ cue validate $PROFILE
136
139
 
140
+ # Show the updated skill count
141
+ cue current
137
142
  ```
138
- I searched for skills related to "xyz" but didn't find any matches.
139
- I can still help you with this task directly! Would you like me to proceed?
140
143
 
141
- If this is something you do often, you could create your own skill:
142
- npx skills init my-xyz-skill
143
- ```
144
+ ## Search Shortcuts
145
+
146
+ Common searches the user might ask for:
147
+
148
+ | User says | Search terms |
149
+ |-----------|-------------|
150
+ | "diagram skills" | `svg diagram architecture claude-code-skill` |
151
+ | "testing skills" | `testing test-runner claude skill` |
152
+ | "deployment skills" | `deploy docker kubernetes claude skill` |
153
+ | "documentation skills" | `readme docs markdown claude skill` |
154
+ | "security skills" | `security audit owasp claude skill` |
155
+ | "API skills" | `api rest graphql openapi claude skill` |
156
+ | "database skills" | `database postgres migration claude skill` |
157
+ | "frontend skills" | `react nextjs frontend ui claude skill` |
158
+
159
+ ## Rules
160
+
161
+ - Always show stars, last update, and license before recommending
162
+ - Never add a skill without user confirmation
163
+ - Prefer skills with >100 stars and recent activity
164
+ - Warn if a skill has no license (legal risk)
165
+ - Warn if a skill is archived or >1 year stale
166
+ - Show max 5 results, ranked by quality score
167
+ - If no good skills found, suggest creating one with `cue skills-new`
168
+ - Always verify the skill has a SKILL.md — repos without one won't work with cue
@@ -49,6 +49,10 @@ export const COMMANDS = {
49
49
  summary: "Resolve+materialize a profile then exec claude/codex (hot path)",
50
50
  load: () => import("./launch"),
51
51
  },
52
+ materialize: {
53
+ summary: "Write skills + MCPs for any agent (cursor, cline, gemini, copilot, etc.)",
54
+ load: () => import("./materialize"),
55
+ },
52
56
  quick: {
53
57
  summary: "One-shot bare launch — no profile, no skills, fastest cold start",
54
58
  load: () => import("./quick"),
@@ -161,6 +165,10 @@ export const COMMANDS = {
161
165
  summary: "Export a profile as portable YAML",
162
166
  load: () => import("./import-profile"),
163
167
  },
168
+ share: {
169
+ summary: "Publish & browse community profiles on the marketplace",
170
+ load: () => import("./share"),
171
+ },
164
172
  "colony-dispatch": {
165
173
  summary: "Resolve profile for a Colony task based on keywords",
166
174
  load: () => import("./colony-dispatch"),
@@ -586,6 +586,17 @@ export async function run(args: string[]): Promise<number> {
586
586
  const duration_s = Math.round((Date.now() - new Date(startTs).getTime()) / 1000);
587
587
  recordEvent({ ts: new Date().toISOString(), event: "end", profile: profileName, agent: agentKind, cwd: process.cwd(), duration_s });
588
588
  } catch { /* best-effort */ }
589
+ // Sync refreshed credentials back to source so next launch has valid tokens
590
+ if (credentialsSource) {
591
+ try {
592
+ const { copyFileSync, existsSync: ex } = require("node:fs");
593
+ const runtimeCreds = join(runtime.runtimeDir, ".credentials.json");
594
+ const sourceCreds = join(credentialsSource, ".credentials.json");
595
+ if (ex(runtimeCreds)) {
596
+ copyFileSync(runtimeCreds, sourceCreds);
597
+ }
598
+ } catch { /* best-effort */ }
599
+ }
589
600
  });
590
601
  } catch { /* analytics non-fatal */ }
591
602