MCPcopy Create free account
hub / github.com/CreminiAI/skillpack / interactiveCreate

Function interactiveCreate

src/commands/create.ts:184–336  ·  view source on GitHub ↗
(workDir: string)

Source from the content-addressed store, hash-verified

182// ---------------------------------------------------------------------------
183
184async function interactiveCreate(workDir: string): Promise<void> {
185 if (configExists(workDir)) {
186 const { overwrite } = await inquirer.prompt([
187 {
188 type: "confirm",
189 name: "overwrite",
190 message: `Overwrite the existing ${PACK_FILE}?`,
191 default: false,
192 },
193 ]);
194 if (!overwrite) {
195 console.log(chalk.yellow("Cancelled"));
196 return;
197 }
198 }
199
200 console.log(chalk.blue("\n Create a new Skill App\n"));
201
202 const { name, description } = await inquirer.prompt([
203 {
204 type: "input",
205 name: "name",
206 message: "App name:",
207 validate: (value: string) => (value.trim() ? true : "Name is required"),
208 },
209 {
210 type: "input",
211 name: "description",
212 message: "Description:",
213 default: "A skill App, powered by SkillPack.sh",
214 },
215 ]);
216
217 const config = createDefaultConfig(name.trim(), description.trim());
218 const requestedSkills: SkillEntry[] = [];
219
220 console.log(
221 chalk.blue("\n Add Skills (enter a skill source, leave blank to skip)\n"),
222 );
223 console.log(
224 chalk.dim(" Supported formats: owner/repo, GitHub URL, or local path"),
225 );
226 console.log(chalk.dim(" Example source: vercel-labs/agent-skills"));
227 console.log(
228 chalk.dim(" Example inline skill: vercel-labs/agent-skills --skill find-skills"),
229 );
230 console.log();
231
232 while (true) {
233 const { source } = await inquirer.prompt([
234 {
235 type: "input",
236 name: "source",
237 message: "Skill source (leave blank to skip):",
238 },
239 ]);
240
241 if (!source.trim()) {

Callers 1

createCommandFunction · 0.85

Calls 10

configExistsFunction · 0.85
createDefaultConfigFunction · 0.85
parseSourceInputFunction · 0.85
parseSkillNamesFunction · 0.85
upsertSkillsFunction · 0.85
saveConfigFunction · 0.85
installConfiguredSkillsFunction · 0.85
zipCommandFunction · 0.85
copyStartTemplatesFunction · 0.70

Tested by

no test coverage detected