@hasnatools/skills 0.1.2 → 0.1.3

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 (2) hide show
  1. package/dist/index.js +22 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -21901,8 +21901,12 @@ function formatBytes(bytes) {
21901
21901
  // src/commands/marketplace.ts
21902
21902
  async function marketplaceCommand(options = {}) {
21903
21903
  const spinner = ora("Fetching skills from marketplace...").start();
21904
+ const limit = options.limit || 20;
21905
+ const page = options.page || 1;
21906
+ const offset = (page - 1) * limit;
21904
21907
  const result = await getMarketplaceSkills({
21905
- limit: options.limit || 200,
21908
+ limit,
21909
+ offset,
21906
21910
  category: options.category
21907
21911
  });
21908
21912
  if (result.error || !result.data) {
@@ -21911,13 +21915,15 @@ async function marketplaceCommand(options = {}) {
21911
21915
  return;
21912
21916
  }
21913
21917
  const skills = result.data.skills;
21918
+ const total = result.data.total;
21919
+ const totalPages = Math.ceil(total / limit);
21914
21920
  spinner.stop();
21915
21921
  if (skills.length === 0) {
21916
21922
  console.log(source_default.dim("No skills found in marketplace"));
21917
21923
  return;
21918
21924
  }
21919
21925
  console.log();
21920
- console.log(source_default.bold(`Skills Marketplace`) + source_default.dim(` (${skills.length} skills)`));
21926
+ console.log(source_default.bold(`Skills Marketplace`) + source_default.dim(` (page ${page}/${totalPages}, ${total} total skills)`));
21921
21927
  console.log();
21922
21928
  for (const skill of skills) {
21923
21929
  const verified = skill.isVerified ? source_default.blue(" ✓") : "";
@@ -21928,6 +21934,18 @@ async function marketplaceCommand(options = {}) {
21928
21934
  console.log();
21929
21935
  }
21930
21936
  console.log(source_default.dim("─".repeat(50)));
21937
+ if (totalPages > 1) {
21938
+ const navHints = [];
21939
+ if (page > 1) {
21940
+ navHints.push(`${source_default.cyan(`skills marketplace -p ${page - 1}`)} for previous`);
21941
+ }
21942
+ if (page < totalPages) {
21943
+ navHints.push(`${source_default.cyan(`skills marketplace -p ${page + 1}`)} for next`);
21944
+ }
21945
+ if (navHints.length > 0) {
21946
+ console.log(source_default.dim(navHints.join(" | ")));
21947
+ }
21948
+ }
21931
21949
  console.log(source_default.dim(`Run ${source_default.cyan("skills install <name>")} to install a skill`));
21932
21950
  console.log(source_default.dim(`Run ${source_default.cyan("skills search <query>")} to search for specific skills`));
21933
21951
  }
@@ -21944,9 +21962,10 @@ program2.command("login").description("Authenticate with skills.md").option("-k,
21944
21962
  program2.command("logout").description("Log out of skills.md").action(logoutCommand);
21945
21963
  program2.command("whoami").description("Show current user info").action(whoamiCommand);
21946
21964
  program2.command("search <query>").description("Search for skills").action(searchCommand);
21947
- program2.command("marketplace").alias("market").description("Browse skills from the marketplace").option("-l, --limit <number>", "Number of skills to show", "200").option("-c, --category <category>", "Filter by category").action((options) => {
21965
+ program2.command("marketplace").alias("market").description("Browse skills from the marketplace").option("-l, --limit <number>", "Number of skills per page", "20").option("-p, --page <number>", "Page number", "1").option("-c, --category <category>", "Filter by category").action((options) => {
21948
21966
  marketplaceCommand({
21949
21967
  limit: parseInt(options.limit, 10),
21968
+ page: parseInt(options.page, 10),
21950
21969
  category: options.category
21951
21970
  });
21952
21971
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasnatools/skills",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "CLI for skills.md - AI Agent Skills Marketplace",
5
5
  "type": "module",
6
6
  "bin": {