@claude-collective/cli 0.2.0 → 0.8.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.
Files changed (190) hide show
  1. package/CHANGELOG.md +178 -0
  2. package/README.md +1 -1
  3. package/dist/chunk-3HBTELJN.js +114 -0
  4. package/dist/chunk-3HBTELJN.js.map +1 -0
  5. package/dist/chunk-3ZCB5K33.js +54 -0
  6. package/dist/chunk-3ZCB5K33.js.map +1 -0
  7. package/dist/chunk-66UDJBF6.js +96 -0
  8. package/dist/chunk-66UDJBF6.js.map +1 -0
  9. package/dist/chunk-6LS7XO3H.js +31 -0
  10. package/dist/chunk-6LS7XO3H.js.map +1 -0
  11. package/dist/chunk-A3J6IAXK.js +57 -0
  12. package/dist/chunk-A3J6IAXK.js.map +1 -0
  13. package/dist/chunk-A65SBAAJ.js +69 -0
  14. package/dist/chunk-A65SBAAJ.js.map +1 -0
  15. package/dist/chunk-ALEPJ6YN.js +80 -0
  16. package/dist/chunk-ALEPJ6YN.js.map +1 -0
  17. package/dist/chunk-C4ZTIYFR.js +84 -0
  18. package/dist/chunk-C4ZTIYFR.js.map +1 -0
  19. package/dist/chunk-CIY5UBRB.js +453 -0
  20. package/dist/chunk-CIY5UBRB.js.map +1 -0
  21. package/dist/chunk-DHET7RCE.js +50 -0
  22. package/dist/chunk-DHET7RCE.js.map +1 -0
  23. package/dist/chunk-DHFFRMF6.js +31 -0
  24. package/dist/chunk-DHFFRMF6.js.map +1 -0
  25. package/dist/chunk-DKGL77IY.js +307 -0
  26. package/dist/chunk-DKGL77IY.js.map +1 -0
  27. package/dist/chunk-ED73HCW2.js +315 -0
  28. package/dist/chunk-ED73HCW2.js.map +1 -0
  29. package/dist/chunk-FNOYEXUE.js +308 -0
  30. package/dist/chunk-FNOYEXUE.js.map +1 -0
  31. package/dist/chunk-G2FBJOZG.js +141 -0
  32. package/dist/chunk-G2FBJOZG.js.map +1 -0
  33. package/dist/chunk-HNDT5QRB.js +120 -0
  34. package/dist/chunk-HNDT5QRB.js.map +1 -0
  35. package/dist/chunk-K7PTOVX4.js +158 -0
  36. package/dist/chunk-K7PTOVX4.js.map +1 -0
  37. package/dist/chunk-LQTST4WY.js +91 -0
  38. package/dist/chunk-LQTST4WY.js.map +1 -0
  39. package/dist/chunk-LVKRVFYR.js +54 -0
  40. package/dist/chunk-LVKRVFYR.js.map +1 -0
  41. package/dist/chunk-M7YCPFIX.js +108 -0
  42. package/dist/chunk-M7YCPFIX.js.map +1 -0
  43. package/dist/chunk-MJSFR562.js +57 -0
  44. package/dist/chunk-MJSFR562.js.map +1 -0
  45. package/dist/chunk-MMDXNZPF.js +69 -0
  46. package/dist/chunk-MMDXNZPF.js.map +1 -0
  47. package/dist/chunk-MYAVQ23U.js +356 -0
  48. package/dist/chunk-MYAVQ23U.js.map +1 -0
  49. package/dist/chunk-NGBFJJ7Q.js +124 -0
  50. package/dist/chunk-NGBFJJ7Q.js.map +1 -0
  51. package/dist/chunk-OLBOTK3O.js +64 -0
  52. package/dist/chunk-OLBOTK3O.js.map +1 -0
  53. package/dist/chunk-PPNTD5LO.js +330 -0
  54. package/dist/chunk-PPNTD5LO.js.map +1 -0
  55. package/dist/chunk-Q2LH2DAB.js +392 -0
  56. package/dist/chunk-Q2LH2DAB.js.map +1 -0
  57. package/dist/chunk-Q6DR5QUH.js +547 -0
  58. package/dist/chunk-Q6DR5QUH.js.map +1 -0
  59. package/dist/chunk-QESUUPOE.js +241 -0
  60. package/dist/chunk-QESUUPOE.js.map +1 -0
  61. package/dist/chunk-QGGSLMO3.js +607 -0
  62. package/dist/chunk-QGGSLMO3.js.map +1 -0
  63. package/dist/chunk-SEBPPFUW.js +478 -0
  64. package/dist/chunk-SEBPPFUW.js.map +1 -0
  65. package/dist/chunk-SYQ7R2JO.js +95 -0
  66. package/dist/chunk-SYQ7R2JO.js.map +1 -0
  67. package/dist/chunk-TOPAIL5W.js +22 -0
  68. package/dist/chunk-TOPAIL5W.js.map +1 -0
  69. package/dist/chunk-U4VYHKPM.js +110 -0
  70. package/dist/chunk-U4VYHKPM.js.map +1 -0
  71. package/dist/chunk-UOWHJ6BE.js +83 -0
  72. package/dist/chunk-UOWHJ6BE.js.map +1 -0
  73. package/dist/chunk-XKEG3SCV.js +86 -0
  74. package/dist/chunk-XKEG3SCV.js.map +1 -0
  75. package/dist/chunk-XY3XDVMI.js +15599 -0
  76. package/dist/chunk-XY3XDVMI.js.map +1 -0
  77. package/dist/chunk-Y3V43XCU.js +76 -0
  78. package/dist/chunk-Y3V43XCU.js.map +1 -0
  79. package/dist/chunk-YKXBGCFD.js +129 -0
  80. package/dist/chunk-YKXBGCFD.js.map +1 -0
  81. package/dist/cli-v2/defaults/agent-mappings.yaml +185 -0
  82. package/dist/commands/build/marketplace.js +254 -0
  83. package/dist/commands/build/marketplace.js.map +1 -0
  84. package/dist/commands/build/plugins.js +324 -0
  85. package/dist/commands/build/plugins.js.map +1 -0
  86. package/dist/commands/build/stack.js +169 -0
  87. package/dist/commands/build/stack.js.map +1 -0
  88. package/dist/commands/compile.js +461 -0
  89. package/dist/commands/compile.js.map +1 -0
  90. package/dist/commands/config/get.js +60 -0
  91. package/dist/commands/config/get.js.map +1 -0
  92. package/dist/commands/config/index.js +22 -0
  93. package/dist/commands/config/index.js.map +1 -0
  94. package/dist/commands/config/path.js +35 -0
  95. package/dist/commands/config/path.js.map +1 -0
  96. package/dist/commands/config/set-project.js +61 -0
  97. package/dist/commands/config/set-project.js.map +1 -0
  98. package/dist/commands/config/set.js +60 -0
  99. package/dist/commands/config/set.js.map +1 -0
  100. package/dist/commands/config/show.js +13 -0
  101. package/dist/commands/config/show.js.map +1 -0
  102. package/dist/commands/config/unset-project.js +57 -0
  103. package/dist/commands/config/unset-project.js.map +1 -0
  104. package/dist/commands/config/unset.js +56 -0
  105. package/dist/commands/config/unset.js.map +1 -0
  106. package/dist/commands/diff.js +755 -0
  107. package/dist/commands/diff.js.map +1 -0
  108. package/dist/commands/doctor.js +413 -0
  109. package/dist/commands/doctor.js.map +1 -0
  110. package/dist/commands/edit.js +254 -0
  111. package/dist/commands/edit.js.map +1 -0
  112. package/dist/commands/eject.js +208 -0
  113. package/dist/commands/eject.js.map +1 -0
  114. package/dist/commands/info.js +205 -0
  115. package/dist/commands/info.js.map +1 -0
  116. package/dist/commands/init.js +915 -0
  117. package/dist/commands/init.js.map +1 -0
  118. package/dist/commands/list.js +44 -0
  119. package/dist/commands/list.js.map +1 -0
  120. package/dist/commands/new/agent.js +230 -0
  121. package/dist/commands/new/agent.js.map +1 -0
  122. package/dist/commands/new/skill.js +204 -0
  123. package/dist/commands/new/skill.js.map +1 -0
  124. package/dist/commands/outdated.js +242 -0
  125. package/dist/commands/outdated.js.map +1 -0
  126. package/dist/commands/search.js +115 -0
  127. package/dist/commands/search.js.map +1 -0
  128. package/dist/commands/test-imports.js +92 -0
  129. package/dist/commands/test-imports.js.map +1 -0
  130. package/dist/commands/uninstall.js +309 -0
  131. package/dist/commands/uninstall.js.map +1 -0
  132. package/dist/commands/update.js +428 -0
  133. package/dist/commands/update.js.map +1 -0
  134. package/dist/commands/validate.js +375 -0
  135. package/dist/commands/validate.js.map +1 -0
  136. package/dist/commands/version/bump.js +95 -0
  137. package/dist/commands/version/bump.js.map +1 -0
  138. package/dist/commands/version/index.js +70 -0
  139. package/dist/commands/version/index.js.map +1 -0
  140. package/dist/commands/version/set.js +101 -0
  141. package/dist/commands/version/set.js.map +1 -0
  142. package/dist/commands/version/show.js +70 -0
  143. package/dist/commands/version/show.js.map +1 -0
  144. package/dist/components/common/confirm.js +9 -0
  145. package/dist/components/common/confirm.js.map +1 -0
  146. package/dist/components/common/message.js +24 -0
  147. package/dist/components/common/message.js.map +1 -0
  148. package/dist/components/common/spinner.js +14 -0
  149. package/dist/components/common/spinner.js.map +1 -0
  150. package/dist/components/wizard/category-grid.js +9 -0
  151. package/dist/components/wizard/category-grid.js.map +1 -0
  152. package/dist/components/wizard/category-grid.test.js +728 -0
  153. package/dist/components/wizard/category-grid.test.js.map +1 -0
  154. package/dist/components/wizard/section-progress.js +9 -0
  155. package/dist/components/wizard/section-progress.js.map +1 -0
  156. package/dist/components/wizard/section-progress.test.js +281 -0
  157. package/dist/components/wizard/section-progress.test.js.map +1 -0
  158. package/dist/components/wizard/step-approach.js +11 -0
  159. package/dist/components/wizard/step-approach.js.map +1 -0
  160. package/dist/components/wizard/step-build.js +15 -0
  161. package/dist/components/wizard/step-build.js.map +1 -0
  162. package/dist/components/wizard/step-build.test.js +729 -0
  163. package/dist/components/wizard/step-build.test.js.map +1 -0
  164. package/dist/components/wizard/step-confirm.js +9 -0
  165. package/dist/components/wizard/step-confirm.js.map +1 -0
  166. package/dist/components/wizard/step-refine.js +9 -0
  167. package/dist/components/wizard/step-refine.js.map +1 -0
  168. package/dist/components/wizard/step-refine.test.js +235 -0
  169. package/dist/components/wizard/step-refine.test.js.map +1 -0
  170. package/dist/components/wizard/step-stack-options.js +11 -0
  171. package/dist/components/wizard/step-stack-options.js.map +1 -0
  172. package/dist/components/wizard/step-stack.js +11 -0
  173. package/dist/components/wizard/step-stack.js.map +1 -0
  174. package/dist/components/wizard/wizard-tabs.js +11 -0
  175. package/dist/components/wizard/wizard-tabs.js.map +1 -0
  176. package/dist/components/wizard/wizard.js +20 -0
  177. package/dist/components/wizard/wizard.js.map +1 -0
  178. package/dist/hooks/init.js +41 -0
  179. package/dist/hooks/init.js.map +1 -0
  180. package/dist/index.js +10 -0
  181. package/dist/index.js.map +1 -0
  182. package/dist/magic-string.es-RGXYGAW3.js +1316 -0
  183. package/dist/magic-string.es-RGXYGAW3.js.map +1 -0
  184. package/dist/stores/wizard-store.js +10 -0
  185. package/dist/stores/wizard-store.js.map +1 -0
  186. package/dist/stores/wizard-store.test.js +405 -0
  187. package/dist/stores/wizard-store.test.js.map +1 -0
  188. package/package.json +44 -25
  189. package/dist/cli/index.js +0 -6314
  190. package/dist/cli/index.js.map +0 -1
@@ -0,0 +1,205 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ discoverLocalSkills,
4
+ loadSkillsMatrixFromSource
5
+ } from "../chunk-DKGL77IY.js";
6
+ import "../chunk-QGGSLMO3.js";
7
+ import "../chunk-NGBFJJ7Q.js";
8
+ import "../chunk-QESUUPOE.js";
9
+ import "../chunk-A3J6IAXK.js";
10
+ import {
11
+ BaseCommand
12
+ } from "../chunk-SYQ7R2JO.js";
13
+ import "../chunk-TOPAIL5W.js";
14
+ import {
15
+ fileExists,
16
+ readFile
17
+ } from "../chunk-MMDXNZPF.js";
18
+ import {
19
+ init_esm_shims
20
+ } from "../chunk-DHET7RCE.js";
21
+
22
+ // src/cli-v2/commands/info.ts
23
+ init_esm_shims();
24
+ import { Args, Flags } from "@oclif/core";
25
+ import path from "path";
26
+ var CONTENT_PREVIEW_LINES = 10;
27
+ var MAX_LINE_LENGTH = 80;
28
+ var MAX_SUGGESTIONS = 5;
29
+ function stripFrontmatter(content) {
30
+ const lines = content.split("\n");
31
+ let inFrontmatter = false;
32
+ let frontmatterEndIndex = 0;
33
+ for (let i = 0; i < lines.length; i++) {
34
+ const line = lines[i].trim();
35
+ if (line === "---") {
36
+ if (!inFrontmatter) {
37
+ inFrontmatter = true;
38
+ } else {
39
+ frontmatterEndIndex = i + 1;
40
+ break;
41
+ }
42
+ }
43
+ }
44
+ return lines.slice(frontmatterEndIndex).join("\n");
45
+ }
46
+ function getPreviewLines(content, maxLines) {
47
+ const body = stripFrontmatter(content);
48
+ const lines = body.split("\n");
49
+ const result = [];
50
+ for (const line of lines) {
51
+ if (result.length >= maxLines) break;
52
+ if (line.trim() || result.length > 0) {
53
+ const truncated = line.length > MAX_LINE_LENGTH ? line.slice(0, MAX_LINE_LENGTH - 3) + "..." : line;
54
+ result.push(truncated);
55
+ }
56
+ }
57
+ return result;
58
+ }
59
+ function formatRelations(relations) {
60
+ if (relations.length === 0) {
61
+ return "(none)";
62
+ }
63
+ return relations.map((r) => r.skillId).join(", ");
64
+ }
65
+ function formatRequirements(requirements) {
66
+ if (requirements.length === 0) {
67
+ return "(none)";
68
+ }
69
+ return requirements.map((req) => {
70
+ const prefix = req.needsAny ? "any of: " : "";
71
+ return prefix + req.skillIds.join(", ");
72
+ }).join("; ");
73
+ }
74
+ function formatTags(tags) {
75
+ if (tags.length === 0) {
76
+ return "(none)";
77
+ }
78
+ return tags.join(", ");
79
+ }
80
+ function findSuggestions(skills, query, maxSuggestions) {
81
+ const lowerQuery = query.toLowerCase();
82
+ const matches = [];
83
+ for (const skill of Object.values(skills)) {
84
+ if (matches.length >= maxSuggestions) break;
85
+ if (skill.id.toLowerCase().includes(lowerQuery) || skill.alias?.toLowerCase().includes(lowerQuery) || skill.name.toLowerCase().includes(lowerQuery)) {
86
+ matches.push(skill.id);
87
+ }
88
+ }
89
+ return matches;
90
+ }
91
+ function formatSkillInfo(skill, isInstalled) {
92
+ const lines = [];
93
+ lines.push(`Skill: ${skill.id}`);
94
+ if (skill.alias) {
95
+ lines.push(`Alias: ${skill.alias}`);
96
+ }
97
+ lines.push(`Author: ${skill.author}`);
98
+ lines.push(`Category: ${skill.category}`);
99
+ lines.push("");
100
+ lines.push("Description:");
101
+ lines.push(` ${skill.description}`);
102
+ lines.push("");
103
+ lines.push(`Tags: ${formatTags(skill.tags)}`);
104
+ lines.push("");
105
+ lines.push(`Requires: ${formatRequirements(skill.requires)}`);
106
+ lines.push(`Conflicts with: ${formatRelations(skill.conflictsWith)}`);
107
+ lines.push(`Recommends: ${formatRelations(skill.recommends)}`);
108
+ if (skill.usageGuidance) {
109
+ lines.push("");
110
+ lines.push("Usage Guidance:");
111
+ lines.push(` ${skill.usageGuidance}`);
112
+ }
113
+ lines.push("");
114
+ lines.push(`Local Status: ${isInstalled ? "Installed" : "Not installed"}`);
115
+ return lines.join("\n");
116
+ }
117
+ var Info = class _Info extends BaseCommand {
118
+ static summary = "Show detailed information about a skill";
119
+ static description = "Display comprehensive information about a skill including metadata, relationships, and content preview";
120
+ static args = {
121
+ skill: Args.string({
122
+ description: "Skill ID or alias to look up",
123
+ required: true
124
+ })
125
+ };
126
+ static flags = {
127
+ ...BaseCommand.baseFlags,
128
+ preview: Flags.boolean({
129
+ description: "Show content preview from SKILL.md",
130
+ default: true,
131
+ allowNo: true
132
+ })
133
+ };
134
+ async run() {
135
+ const { args, flags } = await this.parse(_Info);
136
+ try {
137
+ this.log("Loading skills...");
138
+ const { matrix, sourcePath, isLocal } = await loadSkillsMatrixFromSource({
139
+ sourceFlag: flags.source
140
+ });
141
+ this.log(`Loaded from ${isLocal ? "local" : "remote"}: ${sourcePath}`);
142
+ let skill = matrix.skills[args.skill];
143
+ if (!skill) {
144
+ const fullId = matrix.aliases[args.skill];
145
+ if (fullId) {
146
+ skill = matrix.skills[fullId];
147
+ }
148
+ }
149
+ if (!skill) {
150
+ const suggestions = findSuggestions(
151
+ matrix.skills,
152
+ args.skill,
153
+ MAX_SUGGESTIONS
154
+ );
155
+ this.log("");
156
+ this.error(`Skill "${args.skill}" not found.`, { exit: false });
157
+ if (suggestions.length > 0) {
158
+ this.log("");
159
+ this.log("Did you mean one of these?");
160
+ for (const suggestion of suggestions) {
161
+ this.log(` - ${suggestion}`);
162
+ }
163
+ }
164
+ this.log("");
165
+ this.logInfo("Use 'cc search <query>' to find available skills.");
166
+ this.log("");
167
+ this.exit(1);
168
+ }
169
+ const localSkillsResult = await discoverLocalSkills(process.cwd());
170
+ const localSkillIds = localSkillsResult?.skills.map((s) => s.id) || [];
171
+ const isInstalled = localSkillIds.includes(skill.id);
172
+ this.log("");
173
+ this.log(formatSkillInfo(skill, isInstalled));
174
+ if (flags.preview) {
175
+ let skillMdPath;
176
+ if (skill.local && skill.localPath) {
177
+ skillMdPath = path.join(process.cwd(), skill.localPath, "SKILL.md");
178
+ } else {
179
+ const sourceDir = isLocal ? sourcePath : path.dirname(sourcePath);
180
+ skillMdPath = path.join(sourceDir, skill.path, "SKILL.md");
181
+ }
182
+ if (await fileExists(skillMdPath)) {
183
+ const content = await readFile(skillMdPath);
184
+ const previewLines = getPreviewLines(content, CONTENT_PREVIEW_LINES);
185
+ if (previewLines.length > 0) {
186
+ this.log("");
187
+ this.log(
188
+ `--- Content Preview (first ${CONTENT_PREVIEW_LINES} lines) ---`
189
+ );
190
+ for (const line of previewLines) {
191
+ this.log(line);
192
+ }
193
+ }
194
+ }
195
+ }
196
+ this.log("");
197
+ } catch (error) {
198
+ this.handleError(error);
199
+ }
200
+ }
201
+ };
202
+ export {
203
+ Info as default
204
+ };
205
+ //# sourceMappingURL=info.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/cli-v2/commands/info.ts"],"sourcesContent":["import { Args, Flags } from \"@oclif/core\";\nimport path from \"path\";\nimport { BaseCommand } from \"../base-command.js\";\nimport { loadSkillsMatrixFromSource } from \"../lib/source-loader.js\";\nimport { discoverLocalSkills } from \"../lib/local-skill-loader.js\";\nimport { fileExists, readFile } from \"../utils/fs.js\";\nimport type {\n ResolvedSkill,\n SkillRelation,\n SkillRequirement,\n} from \"../types-matrix.js\";\n\n/**\n * Maximum number of lines to show in content preview\n */\nconst CONTENT_PREVIEW_LINES = 10;\n\n/**\n * Maximum line length before truncation\n */\nconst MAX_LINE_LENGTH = 80;\n\n/**\n * Maximum number of suggestions to show when skill not found\n */\nconst MAX_SUGGESTIONS = 5;\n\n/**\n * Strip frontmatter from SKILL.md content and return body\n */\nfunction stripFrontmatter(content: string): string {\n const lines = content.split(\"\\n\");\n let inFrontmatter = false;\n let frontmatterEndIndex = 0;\n\n for (let i = 0; i < lines.length; i++) {\n const line = lines[i].trim();\n if (line === \"---\") {\n if (!inFrontmatter) {\n inFrontmatter = true;\n } else {\n frontmatterEndIndex = i + 1;\n break;\n }\n }\n }\n\n return lines.slice(frontmatterEndIndex).join(\"\\n\");\n}\n\n/**\n * Get first N non-empty lines from content\n */\nfunction getPreviewLines(content: string, maxLines: number): string[] {\n const body = stripFrontmatter(content);\n const lines = body.split(\"\\n\");\n const result: string[] = [];\n\n for (const line of lines) {\n if (result.length >= maxLines) break;\n // Include non-empty lines or blank lines after content has started\n if (line.trim() || result.length > 0) {\n const truncated =\n line.length > MAX_LINE_LENGTH\n ? line.slice(0, MAX_LINE_LENGTH - 3) + \"...\"\n : line;\n result.push(truncated);\n }\n }\n\n return result;\n}\n\n/**\n * Format an array of skill relations for display\n */\nfunction formatRelations(relations: SkillRelation[]): string {\n if (relations.length === 0) {\n return \"(none)\";\n }\n return relations.map((r) => r.skillId).join(\", \");\n}\n\n/**\n * Format an array of skill requirements for display\n */\nfunction formatRequirements(requirements: SkillRequirement[]): string {\n if (requirements.length === 0) {\n return \"(none)\";\n }\n return requirements\n .map((req) => {\n const prefix = req.needsAny ? \"any of: \" : \"\";\n return prefix + req.skillIds.join(\", \");\n })\n .join(\"; \");\n}\n\n/**\n * Format tags array for display\n */\nfunction formatTags(tags: string[]): string {\n if (tags.length === 0) {\n return \"(none)\";\n }\n return tags.join(\", \");\n}\n\n/**\n * Find skills that match a partial query for suggestions\n */\nfunction findSuggestions(\n skills: Record<string, ResolvedSkill>,\n query: string,\n maxSuggestions: number,\n): string[] {\n const lowerQuery = query.toLowerCase();\n const matches: string[] = [];\n\n for (const skill of Object.values(skills)) {\n if (matches.length >= maxSuggestions) break;\n if (\n skill.id.toLowerCase().includes(lowerQuery) ||\n skill.alias?.toLowerCase().includes(lowerQuery) ||\n skill.name.toLowerCase().includes(lowerQuery)\n ) {\n matches.push(skill.id);\n }\n }\n\n return matches;\n}\n\n/**\n * Format skill info for display\n */\nfunction formatSkillInfo(skill: ResolvedSkill, isInstalled: boolean): string {\n const lines: string[] = [];\n\n lines.push(`Skill: ${skill.id}`);\n if (skill.alias) {\n lines.push(`Alias: ${skill.alias}`);\n }\n lines.push(`Author: ${skill.author}`);\n lines.push(`Category: ${skill.category}`);\n lines.push(\"\");\n lines.push(\"Description:\");\n lines.push(` ${skill.description}`);\n lines.push(\"\");\n lines.push(`Tags: ${formatTags(skill.tags)}`);\n lines.push(\"\");\n lines.push(`Requires: ${formatRequirements(skill.requires)}`);\n lines.push(`Conflicts with: ${formatRelations(skill.conflictsWith)}`);\n lines.push(`Recommends: ${formatRelations(skill.recommends)}`);\n\n if (skill.usageGuidance) {\n lines.push(\"\");\n lines.push(\"Usage Guidance:\");\n lines.push(` ${skill.usageGuidance}`);\n }\n\n lines.push(\"\");\n lines.push(`Local Status: ${isInstalled ? \"Installed\" : \"Not installed\"}`);\n\n return lines.join(\"\\n\");\n}\n\nexport default class Info extends BaseCommand {\n static summary = \"Show detailed information about a skill\";\n static description =\n \"Display comprehensive information about a skill including metadata, relationships, and content preview\";\n\n static args = {\n skill: Args.string({\n description: \"Skill ID or alias to look up\",\n required: true,\n }),\n };\n\n static flags = {\n ...BaseCommand.baseFlags,\n preview: Flags.boolean({\n description: \"Show content preview from SKILL.md\",\n default: true,\n allowNo: true,\n }),\n };\n\n async run(): Promise<void> {\n const { args, flags } = await this.parse(Info);\n\n try {\n this.log(\"Loading skills...\");\n\n const { matrix, sourcePath, isLocal } = await loadSkillsMatrixFromSource({\n sourceFlag: flags.source,\n });\n\n this.log(`Loaded from ${isLocal ? \"local\" : \"remote\"}: ${sourcePath}`);\n\n // Look up skill by ID or alias\n let skill: ResolvedSkill | undefined = matrix.skills[args.skill];\n\n if (!skill) {\n // Try alias lookup\n const fullId = matrix.aliases[args.skill];\n if (fullId) {\n skill = matrix.skills[fullId];\n }\n }\n\n if (!skill) {\n // Skill not found - show error with suggestions\n const suggestions = findSuggestions(\n matrix.skills,\n args.skill,\n MAX_SUGGESTIONS,\n );\n\n this.log(\"\");\n this.error(`Skill \"${args.skill}\" not found.`, { exit: false });\n\n if (suggestions.length > 0) {\n this.log(\"\");\n this.log(\"Did you mean one of these?\");\n for (const suggestion of suggestions) {\n this.log(` - ${suggestion}`);\n }\n }\n\n this.log(\"\");\n this.logInfo(\"Use 'cc search <query>' to find available skills.\");\n this.log(\"\");\n this.exit(1);\n }\n\n // Check local installation status\n const localSkillsResult = await discoverLocalSkills(process.cwd());\n const localSkillIds = localSkillsResult?.skills.map((s) => s.id) || [];\n const isInstalled = localSkillIds.includes(skill.id);\n\n // Display skill info\n this.log(\"\");\n this.log(formatSkillInfo(skill, isInstalled));\n\n // Show content preview if enabled\n if (flags.preview) {\n // Determine source path for SKILL.md\n let skillMdPath: string;\n\n if (skill.local && skill.localPath) {\n // Local skill - path is relative to cwd\n skillMdPath = path.join(process.cwd(), skill.localPath, \"SKILL.md\");\n } else {\n // Remote skill - path is relative to source\n const sourceDir = isLocal ? sourcePath : path.dirname(sourcePath);\n skillMdPath = path.join(sourceDir, skill.path, \"SKILL.md\");\n }\n\n if (await fileExists(skillMdPath)) {\n const content = await readFile(skillMdPath);\n const previewLines = getPreviewLines(content, CONTENT_PREVIEW_LINES);\n\n if (previewLines.length > 0) {\n this.log(\"\");\n this.log(\n `--- Content Preview (first ${CONTENT_PREVIEW_LINES} lines) ---`,\n );\n for (const line of previewLines) {\n this.log(line);\n }\n }\n }\n }\n\n this.log(\"\");\n } catch (error) {\n this.handleError(error);\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,SAAS,MAAM,aAAa;AAC5B,OAAO,UAAU;AAcjB,IAAM,wBAAwB;AAK9B,IAAM,kBAAkB;AAKxB,IAAM,kBAAkB;AAKxB,SAAS,iBAAiB,SAAyB;AACjD,QAAM,QAAQ,QAAQ,MAAM,IAAI;AAChC,MAAI,gBAAgB;AACpB,MAAI,sBAAsB;AAE1B,WAAS,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;AACrC,UAAM,OAAO,MAAM,CAAC,EAAE,KAAK;AAC3B,QAAI,SAAS,OAAO;AAClB,UAAI,CAAC,eAAe;AAClB,wBAAgB;AAAA,MAClB,OAAO;AACL,8BAAsB,IAAI;AAC1B;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,SAAO,MAAM,MAAM,mBAAmB,EAAE,KAAK,IAAI;AACnD;AAKA,SAAS,gBAAgB,SAAiB,UAA4B;AACpE,QAAM,OAAO,iBAAiB,OA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