@hasnatools/skills 0.1.5 → 0.1.7
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.
- package/dist/index.js +82 -32
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -21899,6 +21899,7 @@ function formatBytes(bytes) {
|
|
|
21899
21899
|
}
|
|
21900
21900
|
|
|
21901
21901
|
// src/commands/marketplace.ts
|
|
21902
|
+
var indigo = source_default.hex("#6366f1");
|
|
21902
21903
|
async function marketplaceCommand(options = {}) {
|
|
21903
21904
|
const spinner = ora("Fetching skills from marketplace...").start();
|
|
21904
21905
|
const limit = options.limit || 20;
|
|
@@ -21921,60 +21922,111 @@ async function marketplaceCommand(options = {}) {
|
|
|
21921
21922
|
return;
|
|
21922
21923
|
}
|
|
21923
21924
|
console.log();
|
|
21924
|
-
console.log(
|
|
21925
|
+
console.log(indigo.bold(`Skills Marketplace`) + source_default.dim(` (page ${page}/${totalPages}, ${total} total skills)`));
|
|
21925
21926
|
console.log();
|
|
21926
21927
|
for (const skill of skills) {
|
|
21927
|
-
const verified = skill.isVerified ?
|
|
21928
|
+
const verified = skill.isVerified ? indigo(" ✓") : "";
|
|
21928
21929
|
const downloads = skill.downloadCount > 0 ? source_default.dim(` (${skill.downloadCount} installs)`) : "";
|
|
21929
21930
|
console.log(" " + source_default.bold(skill.name) + verified + source_default.dim(` v${skill.version}`) + downloads);
|
|
21930
21931
|
console.log(" " + source_default.dim(skill.description || "No description"));
|
|
21931
|
-
console.log(" " +
|
|
21932
|
+
console.log(" " + indigo(`skills install ${skill.slug}`));
|
|
21932
21933
|
console.log();
|
|
21933
21934
|
}
|
|
21934
21935
|
console.log(source_default.dim("─".repeat(50)));
|
|
21935
21936
|
if (totalPages > 1) {
|
|
21936
21937
|
const navHints = [];
|
|
21937
21938
|
if (page > 1) {
|
|
21938
|
-
navHints.push(`${
|
|
21939
|
+
navHints.push(`${indigo(`skills marketplace -p ${page - 1}`)} for previous`);
|
|
21939
21940
|
}
|
|
21940
21941
|
if (page < totalPages) {
|
|
21941
|
-
navHints.push(`${
|
|
21942
|
+
navHints.push(`${indigo(`skills marketplace -p ${page + 1}`)} for next`);
|
|
21942
21943
|
}
|
|
21943
21944
|
if (navHints.length > 0) {
|
|
21944
21945
|
console.log(source_default.dim(navHints.join(" | ")));
|
|
21945
21946
|
}
|
|
21946
21947
|
}
|
|
21947
|
-
console.log(source_default.dim(`Run ${
|
|
21948
|
-
console.log(source_default.dim(`Run ${
|
|
21948
|
+
console.log(source_default.dim(`Run ${indigo("skills install <name>")} to install a skill`));
|
|
21949
|
+
console.log(source_default.dim(`Run ${indigo("skills search <query>")} to search for specific skills`));
|
|
21949
21950
|
}
|
|
21950
21951
|
|
|
21951
21952
|
// src/commands/feedback.ts
|
|
21952
|
-
var
|
|
21953
|
-
var
|
|
21953
|
+
var import_prompts2 = __toESM(require_prompts3(), 1);
|
|
21954
|
+
var indigo2 = source_default.hex("#6366f1");
|
|
21955
|
+
var indigoBold = source_default.hex("#6366f1").bold;
|
|
21954
21956
|
async function feedbackCommand(options = {}) {
|
|
21955
21957
|
console.log();
|
|
21956
|
-
console.log(
|
|
21958
|
+
console.log(indigoBold("\uD83D\uDCDD Submit Feedback"));
|
|
21957
21959
|
console.log();
|
|
21958
|
-
|
|
21959
|
-
|
|
21960
|
-
|
|
21961
|
-
console.log(source_default.
|
|
21962
|
-
|
|
21963
|
-
|
|
21964
|
-
|
|
21965
|
-
|
|
21966
|
-
|
|
21967
|
-
|
|
21968
|
-
|
|
21960
|
+
const apiKey = getApiKey();
|
|
21961
|
+
if (!apiKey) {
|
|
21962
|
+
console.log(source_default.yellow("⚠") + " You need to be logged in to submit feedback.");
|
|
21963
|
+
console.log(source_default.dim(" Run ") + indigo2("skills login") + source_default.dim(" first."));
|
|
21964
|
+
console.log();
|
|
21965
|
+
return;
|
|
21966
|
+
}
|
|
21967
|
+
const response = await import_prompts2.default([
|
|
21968
|
+
{
|
|
21969
|
+
type: "select",
|
|
21970
|
+
name: "type",
|
|
21971
|
+
message: "What type of feedback?",
|
|
21972
|
+
choices: [
|
|
21973
|
+
{ title: "\uD83D\uDC1B Bug Report", value: "bug" },
|
|
21974
|
+
{ title: "✨ Feature Request", value: "feature" },
|
|
21975
|
+
{ title: "\uD83D\uDCA1 Improvement", value: "improvement" },
|
|
21976
|
+
{ title: "\uD83D\uDCAC Other", value: "other" }
|
|
21977
|
+
],
|
|
21978
|
+
initial: options.type === "bug" ? 0 : options.type === "feature" ? 1 : 0
|
|
21979
|
+
},
|
|
21980
|
+
{
|
|
21981
|
+
type: "text",
|
|
21982
|
+
name: "title",
|
|
21983
|
+
message: "Title (short summary)",
|
|
21984
|
+
initial: options.title || "",
|
|
21985
|
+
validate: (value) => value.length > 0 ? true : "Title is required"
|
|
21986
|
+
},
|
|
21987
|
+
{
|
|
21988
|
+
type: "text",
|
|
21989
|
+
name: "description",
|
|
21990
|
+
message: "Description (details)",
|
|
21991
|
+
initial: options.message || "",
|
|
21992
|
+
validate: (value) => value.length > 0 ? true : "Description is required"
|
|
21993
|
+
}
|
|
21994
|
+
]);
|
|
21995
|
+
if (!response.type || !response.title || !response.description) {
|
|
21996
|
+
console.log(source_default.dim(`
|
|
21997
|
+
Feedback cancelled.`));
|
|
21998
|
+
return;
|
|
21999
|
+
}
|
|
22000
|
+
const spinner = ora("Submitting feedback...").start();
|
|
22001
|
+
try {
|
|
22002
|
+
const res = await makeApiRequest("/feedback", {
|
|
22003
|
+
method: "POST",
|
|
22004
|
+
body: JSON.stringify({
|
|
22005
|
+
type: response.type,
|
|
22006
|
+
title: response.title,
|
|
22007
|
+
description: response.description,
|
|
22008
|
+
page: "cli"
|
|
22009
|
+
})
|
|
22010
|
+
});
|
|
22011
|
+
if (!res.ok) {
|
|
22012
|
+
const data = await res.json();
|
|
22013
|
+
spinner.fail("Failed to submit feedback");
|
|
22014
|
+
console.log(source_default.red(" " + (data.error || "Unknown error")));
|
|
22015
|
+
return;
|
|
22016
|
+
}
|
|
22017
|
+
spinner.succeed("Feedback submitted!");
|
|
21969
22018
|
console.log();
|
|
21970
|
-
console.log(
|
|
21971
|
-
console.log(
|
|
21972
|
-
|
|
22019
|
+
console.log(indigo2(" Thank you for your feedback! \uD83D\uDE4F"));
|
|
22020
|
+
console.log(source_default.dim(" We'll review it and get back to you if needed."));
|
|
22021
|
+
} catch (error) {
|
|
22022
|
+
spinner.fail("Failed to submit feedback");
|
|
22023
|
+
console.log(source_default.red(" " + (error instanceof Error ? error.message : "Network error")));
|
|
21973
22024
|
}
|
|
21974
22025
|
console.log();
|
|
21975
22026
|
}
|
|
21976
22027
|
|
|
21977
22028
|
// src/index.ts
|
|
22029
|
+
var indigo3 = source_default.hex("#6366f1");
|
|
21978
22030
|
var program2 = new Command;
|
|
21979
22031
|
program2.name("skills").description("CLI for skills.md - AI Agent Skills Marketplace").version("0.1.0");
|
|
21980
22032
|
program2.command("init").description("Initialize skills.md in current project").option("-f, --force", "Force re-initialization (removes existing .skills/)").action((options) => {
|
|
@@ -22049,14 +22101,13 @@ program2.command("logs <skill>").description("View execution logs for a skill").
|
|
|
22049
22101
|
tail: parseInt(options.tail, 10)
|
|
22050
22102
|
});
|
|
22051
22103
|
});
|
|
22052
|
-
program2.command("feedback").description("
|
|
22104
|
+
program2.command("feedback").description("Submit feedback, bug reports, or feature requests").option("-t, --type <type>", "Feedback type (bug, feature, improvement, other)").action((options) => {
|
|
22053
22105
|
feedbackCommand({
|
|
22054
|
-
|
|
22055
|
-
feature: options.feature
|
|
22106
|
+
type: options.type
|
|
22056
22107
|
});
|
|
22057
22108
|
});
|
|
22058
22109
|
program2.addHelpText("after", `
|
|
22059
|
-
${
|
|
22110
|
+
${indigo3.bold("Examples:")}
|
|
22060
22111
|
${source_default.dim("# Initialize in current project")}
|
|
22061
22112
|
$ skills init
|
|
22062
22113
|
|
|
@@ -22091,11 +22142,10 @@ ${source_default.bold("Examples:")}
|
|
|
22091
22142
|
${source_default.dim("# View logs for a skill")}
|
|
22092
22143
|
$ skills logs code-review
|
|
22093
22144
|
|
|
22094
|
-
${source_default.dim("#
|
|
22145
|
+
${source_default.dim("# Submit feedback")}
|
|
22095
22146
|
$ skills feedback
|
|
22096
|
-
$ skills feedback --bug
|
|
22097
22147
|
|
|
22098
|
-
${
|
|
22099
|
-
https://skills.md/docs
|
|
22148
|
+
${indigo3.bold("Documentation:")}
|
|
22149
|
+
${indigo3("https://skills.md/docs")}
|
|
22100
22150
|
`);
|
|
22101
22151
|
program2.parse();
|