@hasnatools/skills 0.1.2 → 0.1.4

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 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -20702,8 +20702,8 @@ async function getMarketplaceSkills(options) {
20702
20702
  const params = new URLSearchParams;
20703
20703
  if (options?.limit)
20704
20704
  params.set("limit", options.limit.toString());
20705
- if (options?.offset)
20706
- params.set("offset", options.offset.toString());
20705
+ if (options?.page)
20706
+ params.set("page", options.page.toString());
20707
20707
  if (options?.category)
20708
20708
  params.set("category", options.category);
20709
20709
  const query = params.toString();
@@ -21901,8 +21901,11 @@ 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;
21904
21906
  const result = await getMarketplaceSkills({
21905
- limit: options.limit || 200,
21907
+ limit,
21908
+ page,
21906
21909
  category: options.category
21907
21910
  });
21908
21911
  if (result.error || !result.data) {
@@ -21911,13 +21914,14 @@ async function marketplaceCommand(options = {}) {
21911
21914
  return;
21912
21915
  }
21913
21916
  const skills = result.data.skills;
21917
+ const { total, totalPages } = result.data.pagination;
21914
21918
  spinner.stop();
21915
21919
  if (skills.length === 0) {
21916
21920
  console.log(source_default.dim("No skills found in marketplace"));
21917
21921
  return;
21918
21922
  }
21919
21923
  console.log();
21920
- console.log(source_default.bold(`Skills Marketplace`) + source_default.dim(` (${skills.length} skills)`));
21924
+ console.log(source_default.bold(`Skills Marketplace`) + source_default.dim(` (page ${page}/${totalPages}, ${total} total skills)`));
21921
21925
  console.log();
21922
21926
  for (const skill of skills) {
21923
21927
  const verified = skill.isVerified ? source_default.blue(" ✓") : "";
@@ -21928,6 +21932,18 @@ async function marketplaceCommand(options = {}) {
21928
21932
  console.log();
21929
21933
  }
21930
21934
  console.log(source_default.dim("─".repeat(50)));
21935
+ if (totalPages > 1) {
21936
+ const navHints = [];
21937
+ if (page > 1) {
21938
+ navHints.push(`${source_default.cyan(`skills marketplace -p ${page - 1}`)} for previous`);
21939
+ }
21940
+ if (page < totalPages) {
21941
+ navHints.push(`${source_default.cyan(`skills marketplace -p ${page + 1}`)} for next`);
21942
+ }
21943
+ if (navHints.length > 0) {
21944
+ console.log(source_default.dim(navHints.join(" | ")));
21945
+ }
21946
+ }
21931
21947
  console.log(source_default.dim(`Run ${source_default.cyan("skills install <name>")} to install a skill`));
21932
21948
  console.log(source_default.dim(`Run ${source_default.cyan("skills search <query>")} to search for specific skills`));
21933
21949
  }
@@ -21944,9 +21960,10 @@ program2.command("login").description("Authenticate with skills.md").option("-k,
21944
21960
  program2.command("logout").description("Log out of skills.md").action(logoutCommand);
21945
21961
  program2.command("whoami").description("Show current user info").action(whoamiCommand);
21946
21962
  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) => {
21963
+ 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
21964
  marketplaceCommand({
21949
21965
  limit: parseInt(options.limit, 10),
21966
+ page: parseInt(options.page, 10),
21950
21967
  category: options.category
21951
21968
  });
21952
21969
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasnatools/skills",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "CLI for skills.md - AI Agent Skills Marketplace",
5
5
  "type": "module",
6
6
  "bin": {