@hasnatools/skills 0.1.6 → 0.1.8
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 +99 -35
- 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,64 +21922,127 @@ 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
|
|
21954
|
-
var
|
|
21953
|
+
var import_prompts2 = __toESM(require_prompts3(), 1);
|
|
21954
|
+
var indigo2 = source_default.hex("#6366f1");
|
|
21955
|
+
var indigoBold = source_default.hex("#6366f1").bold;
|
|
21956
|
+
async function submitFeedback(type, title, description) {
|
|
21957
|
+
const spinner = ora("Submitting feedback...").start();
|
|
21958
|
+
try {
|
|
21959
|
+
const res = await makeApiRequest("/feedback", {
|
|
21960
|
+
method: "POST",
|
|
21961
|
+
body: JSON.stringify({
|
|
21962
|
+
type,
|
|
21963
|
+
title,
|
|
21964
|
+
description,
|
|
21965
|
+
page: "cli"
|
|
21966
|
+
})
|
|
21967
|
+
});
|
|
21968
|
+
if (!res.ok) {
|
|
21969
|
+
const data = await res.json();
|
|
21970
|
+
spinner.fail("Failed to submit feedback");
|
|
21971
|
+
console.log(source_default.red(" " + (data.error || "Unknown error")));
|
|
21972
|
+
return false;
|
|
21973
|
+
}
|
|
21974
|
+
spinner.succeed("Feedback submitted!");
|
|
21975
|
+
console.log();
|
|
21976
|
+
console.log(indigo2(" Thank you for your feedback! \uD83D\uDE4F"));
|
|
21977
|
+
console.log(source_default.dim(" We'll review it and get back to you if needed."));
|
|
21978
|
+
return true;
|
|
21979
|
+
} catch (error) {
|
|
21980
|
+
spinner.fail("Failed to submit feedback");
|
|
21981
|
+
console.log(source_default.red(" " + (error instanceof Error ? error.message : "Network error")));
|
|
21982
|
+
return false;
|
|
21983
|
+
}
|
|
21984
|
+
}
|
|
21955
21985
|
async function feedbackCommand(options = {}) {
|
|
21956
21986
|
console.log();
|
|
21957
|
-
console.log(
|
|
21987
|
+
console.log(indigoBold("\uD83D\uDCDD Submit Feedback"));
|
|
21958
21988
|
console.log();
|
|
21959
|
-
|
|
21960
|
-
|
|
21961
|
-
|
|
21962
|
-
console.log(source_default.
|
|
21963
|
-
} else {
|
|
21964
|
-
console.log(source_default.dim("How to reach us:"));
|
|
21965
|
-
console.log();
|
|
21966
|
-
console.log(" " + source_default.bold("GitHub Issues") + source_default.dim(" (bugs & features)"));
|
|
21967
|
-
console.log(" " + source_default.cyan(GITHUB_ISSUES_URL));
|
|
21968
|
-
console.log();
|
|
21969
|
-
console.log(" " + source_default.bold("Email"));
|
|
21970
|
-
console.log(" " + source_default.cyan(EMAIL));
|
|
21989
|
+
const apiKey = getApiKey();
|
|
21990
|
+
if (!apiKey) {
|
|
21991
|
+
console.log(source_default.yellow("⚠") + " You need to be logged in to submit feedback.");
|
|
21992
|
+
console.log(source_default.dim(" Run ") + indigo2("skills login") + source_default.dim(" first."));
|
|
21971
21993
|
console.log();
|
|
21972
|
-
|
|
21973
|
-
|
|
21994
|
+
return;
|
|
21995
|
+
}
|
|
21996
|
+
if (options.type && options.title && options.message) {
|
|
21997
|
+
const validTypes = ["bug", "feature", "improvement", "other"];
|
|
21998
|
+
if (!validTypes.includes(options.type)) {
|
|
21999
|
+
console.log(source_default.red(" Invalid type. Must be one of: " + validTypes.join(", ")));
|
|
22000
|
+
console.log();
|
|
22001
|
+
return;
|
|
22002
|
+
}
|
|
22003
|
+
await submitFeedback(options.type, options.title, options.message);
|
|
21974
22004
|
console.log();
|
|
21975
|
-
|
|
21976
|
-
|
|
22005
|
+
return;
|
|
22006
|
+
}
|
|
22007
|
+
const response = await import_prompts2.default([
|
|
22008
|
+
{
|
|
22009
|
+
type: "select",
|
|
22010
|
+
name: "type",
|
|
22011
|
+
message: "What type of feedback?",
|
|
22012
|
+
choices: [
|
|
22013
|
+
{ title: "\uD83D\uDC1B Bug Report", value: "bug" },
|
|
22014
|
+
{ title: "✨ Feature Request", value: "feature" },
|
|
22015
|
+
{ title: "\uD83D\uDCA1 Improvement", value: "improvement" },
|
|
22016
|
+
{ title: "\uD83D\uDCAC Other", value: "other" }
|
|
22017
|
+
],
|
|
22018
|
+
initial: options.type === "bug" ? 0 : options.type === "feature" ? 1 : options.type === "improvement" ? 2 : options.type === "other" ? 3 : 0
|
|
22019
|
+
},
|
|
22020
|
+
{
|
|
22021
|
+
type: "text",
|
|
22022
|
+
name: "title",
|
|
22023
|
+
message: "Title (short summary)",
|
|
22024
|
+
initial: options.title || "",
|
|
22025
|
+
validate: (value) => value.length > 0 ? true : "Title is required"
|
|
22026
|
+
},
|
|
22027
|
+
{
|
|
22028
|
+
type: "text",
|
|
22029
|
+
name: "description",
|
|
22030
|
+
message: "Description (details)",
|
|
22031
|
+
initial: options.message || "",
|
|
22032
|
+
validate: (value) => value.length > 0 ? true : "Description is required"
|
|
22033
|
+
}
|
|
22034
|
+
]);
|
|
22035
|
+
if (!response.type || !response.title || !response.description) {
|
|
22036
|
+
console.log(source_default.dim(`
|
|
22037
|
+
Feedback cancelled.`));
|
|
22038
|
+
return;
|
|
21977
22039
|
}
|
|
22040
|
+
await submitFeedback(response.type, response.title, response.description);
|
|
21978
22041
|
console.log();
|
|
21979
22042
|
}
|
|
21980
22043
|
|
|
21981
22044
|
// src/index.ts
|
|
22045
|
+
var indigo3 = source_default.hex("#6366f1");
|
|
21982
22046
|
var program2 = new Command;
|
|
21983
22047
|
program2.name("skills").description("CLI for skills.md - AI Agent Skills Marketplace").version("0.1.0");
|
|
21984
22048
|
program2.command("init").description("Initialize skills.md in current project").option("-f, --force", "Force re-initialization (removes existing .skills/)").action((options) => {
|
|
@@ -22053,14 +22117,15 @@ program2.command("logs <skill>").description("View execution logs for a skill").
|
|
|
22053
22117
|
tail: parseInt(options.tail, 10)
|
|
22054
22118
|
});
|
|
22055
22119
|
});
|
|
22056
|
-
program2.command("feedback").description("
|
|
22120
|
+
program2.command("feedback").description("Submit feedback, bug reports, or feature requests").option("-t, --type <type>", "Feedback type (bug, feature, improvement, other)").option("--title <title>", "Feedback title (required for non-interactive mode)").option("-m, --message <message>", "Feedback description (required for non-interactive mode)").action((options) => {
|
|
22057
22121
|
feedbackCommand({
|
|
22058
|
-
|
|
22059
|
-
|
|
22122
|
+
type: options.type,
|
|
22123
|
+
title: options.title,
|
|
22124
|
+
message: options.message
|
|
22060
22125
|
});
|
|
22061
22126
|
});
|
|
22062
22127
|
program2.addHelpText("after", `
|
|
22063
|
-
${
|
|
22128
|
+
${indigo3.bold("Examples:")}
|
|
22064
22129
|
${source_default.dim("# Initialize in current project")}
|
|
22065
22130
|
$ skills init
|
|
22066
22131
|
|
|
@@ -22095,11 +22160,10 @@ ${source_default.bold("Examples:")}
|
|
|
22095
22160
|
${source_default.dim("# View logs for a skill")}
|
|
22096
22161
|
$ skills logs code-review
|
|
22097
22162
|
|
|
22098
|
-
${source_default.dim("#
|
|
22163
|
+
${source_default.dim("# Submit feedback")}
|
|
22099
22164
|
$ skills feedback
|
|
22100
|
-
$ skills feedback --bug
|
|
22101
22165
|
|
|
22102
|
-
${
|
|
22103
|
-
https://skills.md/docs
|
|
22166
|
+
${indigo3.bold("Documentation:")}
|
|
22167
|
+
${indigo3("https://skills.md/docs")}
|
|
22104
22168
|
`);
|
|
22105
22169
|
program2.parse();
|