Commit 40c34cd
authored
feat(skill): treat bare owner/repo as skill-first install (#419)
* feat(skill): treat bare owner/repo as skill-first install (source-auto)
Previously, `skill add owner/repo` with no flags was misclassified as a
skill-name lookup and failed. This mirrors how `npx skills add owner/repo`
works: the repo is just a transport for its skills, not a named entity.
New behaviour: when the positional is a GitHub source (owner/repo,
gh:owner/repo, or https://github.com/owner/repo) with no subpath and no
selector flag (--skill/--list/--all), classifySkillAddPositional now
returns shape 'source-auto', and the handler installs all skills from
that source — equivalent to --all but without the flag.
Subpath forms (owner/repo/skills/foo, deep GitHub URLs) remain as the
legacy 'skill-name' shape handled by resolveSkillFromUrl, so existing
behaviour is preserved.
- Adds `source-auto` shape to classifySkillAddPositional return type
- Handler routes source-auto through installAllSkillsFromSource
- Updates skillsAddMeta examples and positional description
- Updates cli.mdx and quick-start.mdx with the new bare-source pattern
- Adds 4 new unit tests; total 11 pass
* feat(skill): show interactive skill picker for bare owner/repo on TTY
When `skill add owner/repo` is run interactively (TTY), show a
multiselect picker with all discovered skills pre-selected, so the
user can deselect any they don't want before confirming — mirroring the
npx-skills UX.
Falls back to silent install-all when:
- stdout/stdin is not a TTY (CI, pipes)
- --json mode
- The source is a marketplace (complex multi-plugin picker not worth
duplicating here)
- The source has only one skill (no choice to make)
All-selected shortcut: if the user confirms with all skills still
selected, routes through the existing installAllSkillsFromSource for
efficiency. For a subset, builds the allowlist with the chosen names
and syncs once.1 parent 3abda9d commit 40c34cd
5 files changed
Lines changed: 234 additions & 36 deletions
File tree
- docs/src/content/docs/docs
- getting-started
- reference
- src/cli
- commands
- metadata
- tests/unit/cli
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
44 | 50 | | |
45 | 51 | | |
46 | 52 | | |
47 | 53 | | |
48 | 54 | | |
49 | | - | |
| 55 | + | |
50 | 56 | | |
51 | 57 | | |
52 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
| 198 | + | |
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
203 | 206 | | |
204 | 207 | | |
205 | 208 | | |
206 | | - | |
| 209 | + | |
207 | 210 | | |
208 | | - | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
209 | 233 | | |
210 | 234 | | |
211 | | - | |
212 | 235 | | |
| 236 | + | |
| 237 | + | |
213 | 238 | | |
214 | | - | |
215 | | - | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
216 | 243 | | |
217 | 244 | | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
222 | 250 | | |
223 | 251 | | |
224 | 252 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
747 | 747 | | |
748 | 748 | | |
749 | 749 | | |
750 | | - | |
| 750 | + | |
751 | 751 | | |
752 | | - | |
753 | | - | |
754 | | - | |
755 | | - | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
756 | 760 | | |
757 | 761 | | |
758 | 762 | | |
| |||
762 | 766 | | |
763 | 767 | | |
764 | 768 | | |
765 | | - | |
| 769 | + | |
| 770 | + | |
766 | 771 | | |
767 | 772 | | |
768 | 773 | | |
| |||
771 | 776 | | |
772 | 777 | | |
773 | 778 | | |
774 | | - | |
775 | | - | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
776 | 784 | | |
777 | 785 | | |
778 | 786 | | |
| |||
1093 | 1101 | | |
1094 | 1102 | | |
1095 | 1103 | | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
1096 | 1216 | | |
1097 | 1217 | | |
1098 | 1218 | | |
| |||
1459 | 1579 | | |
1460 | 1580 | | |
1461 | 1581 | | |
1462 | | - | |
1463 | | - | |
1464 | | - | |
1465 | | - | |
| 1582 | + | |
1466 | 1583 | | |
1467 | 1584 | | |
1468 | 1585 | | |
1469 | 1586 | | |
1470 | 1587 | | |
1471 | 1588 | | |
1472 | 1589 | | |
1473 | | - | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
1474 | 1594 | | |
1475 | 1595 | | |
1476 | 1596 | | |
| |||
1483 | 1603 | | |
1484 | 1604 | | |
1485 | 1605 | | |
1486 | | - | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
1487 | 1611 | | |
1488 | 1612 | | |
1489 | 1613 | | |
| |||
1612 | 1736 | | |
1613 | 1737 | | |
1614 | 1738 | | |
1615 | | - | |
1616 | | - | |
| 1739 | + | |
| 1740 | + | |
1617 | 1741 | | |
1618 | 1742 | | |
1619 | 1743 | | |
| |||
1637 | 1761 | | |
1638 | 1762 | | |
1639 | 1763 | | |
1640 | | - | |
1641 | | - | |
1642 | | - | |
1643 | | - | |
1644 | | - | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
1645 | 1780 | | |
1646 | 1781 | | |
1647 | 1782 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
132 | 133 | | |
133 | 134 | | |
134 | 135 | | |
| |||
147 | 148 | | |
148 | 149 | | |
149 | 150 | | |
150 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
151 | 155 | | |
152 | 156 | | |
153 | 157 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
40 | 65 | | |
41 | 66 | | |
42 | 67 | | |
| |||
0 commit comments