nairon-bench 0.1.0 → 0.2.1

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 +206 -8
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -24184,13 +24184,62 @@ init_dist();
24184
24184
  init_client();
24185
24185
  import { existsSync as existsSync16, readFileSync as readFileSync13 } from "node:fs";
24186
24186
  import { join as join16 } from "node:path";
24187
+ import { execSync as execSync5 } from "node:child_process";
24187
24188
  var CYAN2 = "\x1B[36m";
24188
24189
  var YELLOW2 = "\x1B[33m";
24189
24190
  var GREEN2 = "\x1B[32m";
24191
+ var RED = "\x1B[31m";
24190
24192
  var DIM2 = "\x1B[2m";
24191
24193
  var BOLD2 = "\x1B[1m";
24192
24194
  var RESET2 = "\x1B[0m";
24193
24195
  var MAGENTA2 = "\x1B[35m";
24196
+ var SKILLS_SH_MAPPINGS = {
24197
+ testing: [
24198
+ { skill: "obra/superpowers/test-driven-development", name: "Test-Driven Development", reason: "Agentic TDD workflow for writing tests first", installs: 8400 },
24199
+ { skill: "anthropics/skills/webapp-testing", name: "Web App Testing", reason: "E2E testing patterns for web applications", installs: 9400 }
24200
+ ],
24201
+ debugging: [
24202
+ { skill: "obra/superpowers/systematic-debugging", name: "Systematic Debugging", reason: "Structured approach to finding and fixing bugs", installs: 10100 }
24203
+ ],
24204
+ planning: [
24205
+ { skill: "obra/superpowers/writing-plans", name: "Writing Plans", reason: "Better planning before implementation", installs: 8700 },
24206
+ { skill: "obra/superpowers/executing-plans", name: "Executing Plans", reason: "Follow through on plans systematically", installs: 7700 }
24207
+ ],
24208
+ code_review: [
24209
+ { skill: "obra/superpowers/requesting-code-review", name: "Requesting Code Review", reason: "Get better feedback on your code", installs: 7100 },
24210
+ { skill: "obra/superpowers/receiving-code-review", name: "Receiving Code Review", reason: "Process and apply code review feedback", installs: 5900 }
24211
+ ],
24212
+ browser_testing: [
24213
+ { skill: "vercel-labs/agent-browser/agent-browser", name: "Agent Browser", reason: "Browser automation for AI agents", installs: 33600 },
24214
+ { skill: "browser-use/browser-use/browser-use", name: "Browser Use", reason: "Let AI control the browser", installs: 28500 }
24215
+ ],
24216
+ frontend: [
24217
+ { skill: "anthropics/skills/frontend-design", name: "Frontend Design", reason: "Better UI/UX patterns for AI-generated code", installs: 65500 },
24218
+ { skill: "vercel-labs/agent-skills/web-design-guidelines", name: "Web Design Guidelines", reason: "Design best practices", installs: 96100 }
24219
+ ],
24220
+ react: [
24221
+ { skill: "vercel-labs/agent-skills/vercel-react-best-practices", name: "React Best Practices", reason: "Production-ready React patterns", installs: 128100 }
24222
+ ],
24223
+ nextjs: [
24224
+ { skill: "vercel-labs/next-skills/next-best-practices", name: "Next.js Best Practices", reason: "App router patterns and optimizations", installs: 11200 }
24225
+ ],
24226
+ supabase: [
24227
+ { skill: "supabase/agent-skills/supabase-postgres-best-practices", name: "Supabase Best Practices", reason: "Database and auth patterns", installs: 16700 }
24228
+ ],
24229
+ expo: [
24230
+ { skill: "expo/skills/building-native-ui", name: "Building Native UI", reason: "React Native UI patterns", installs: 9500 }
24231
+ ],
24232
+ parallel_agents: [
24233
+ { skill: "obra/superpowers/dispatching-parallel-agents", name: "Parallel Agents", reason: "Run multiple agents for faster work", installs: 5600 },
24234
+ { skill: "obra/superpowers/subagent-driven-development", name: "Subagent Development", reason: "Delegate work to specialized agents", installs: 6400 }
24235
+ ],
24236
+ brainstorming: [
24237
+ { skill: "obra/superpowers/brainstorming", name: "Brainstorming", reason: "Generate and evaluate ideas systematically", installs: 18300 }
24238
+ ],
24239
+ memory: [
24240
+ { skill: "obra/episodic-memory/remembering-conversations", name: "Remembering Conversations", reason: "Persistent memory across sessions", installs: 4800 }
24241
+ ]
24242
+ };
24194
24243
  var PAIN_POINT_TOOLS = {
24195
24244
  context: [
24196
24245
  { tool: "context7", reason: "Fetches up-to-date library docs directly into AI context", installCmd: "nb tools install context7" },
@@ -24249,6 +24298,16 @@ var recommendCommand = defineCommand2({
24249
24298
  type: "boolean",
24250
24299
  description: "Show all recommendations (not just top)",
24251
24300
  default: false
24301
+ },
24302
+ skills: {
24303
+ type: "boolean",
24304
+ description: "Show skills.sh recommendations based on workflow issues",
24305
+ default: false
24306
+ },
24307
+ install: {
24308
+ type: "boolean",
24309
+ description: "Auto-install recommended skills from skills.sh",
24310
+ default: false
24252
24311
  }
24253
24312
  },
24254
24313
  async run({ args }) {
@@ -24256,6 +24315,10 @@ var recommendCommand = defineCommand2({
24256
24315
  const contextPath = join16(projectPath, ".nairon", "context.json");
24257
24316
  const limit = parseInt(args.limit) || 5;
24258
24317
  consola.log("");
24318
+ if (args.skills || args.install) {
24319
+ await showSkillsRecommendations(projectPath, args.install);
24320
+ return;
24321
+ }
24259
24322
  console.log(`${YELLOW2}\uD83D\uDCCA Analyzing your project...${RESET2}`);
24260
24323
  let context = null;
24261
24324
  if (existsSync16(contextPath)) {
@@ -24398,9 +24461,133 @@ function getSourceIcon(source) {
24398
24461
  return "";
24399
24462
  }
24400
24463
  }
24464
+ async function showSkillsRecommendations(projectPath, autoInstall) {
24465
+ console.log(`${BOLD2}${CYAN2}SKILLS.SH RECOMMENDATIONS${RESET2}`);
24466
+ console.log(`${DIM2}Based on your workflow patterns${RESET2}`);
24467
+ console.log(`${DIM2}${"─".repeat(50)}${RESET2}`);
24468
+ consola.log("");
24469
+ const contextPath = join16(projectPath, ".nairon", "context.json");
24470
+ let techStack = [];
24471
+ let painPoints = [];
24472
+ if (existsSync16(contextPath)) {
24473
+ try {
24474
+ const context = JSON.parse(readFileSync13(contextPath, "utf-8"));
24475
+ techStack = context.techStack || [];
24476
+ painPoints = context.painPoints || [];
24477
+ } catch {}
24478
+ }
24479
+ const reportsDir = join16(projectPath, ".nairon", "reports");
24480
+ let detectedIssues = [];
24481
+ if (existsSync16(reportsDir)) {
24482
+ try {
24483
+ const files = __require("fs").readdirSync(reportsDir).filter((f3) => f3.endsWith(".md"));
24484
+ if (files.length > 0) {
24485
+ const latestReport = readFileSync13(join16(reportsDir, files[files.length - 1]), "utf-8");
24486
+ if (latestReport.includes("Testing") && latestReport.includes("0/100")) {
24487
+ detectedIssues.push("testing");
24488
+ }
24489
+ if (latestReport.includes("frustration") || latestReport.includes("Frustration")) {
24490
+ detectedIssues.push("debugging");
24491
+ }
24492
+ if (latestReport.includes("Planning") && latestReport.match(/Planning.*[0-4]\d\/100/)) {
24493
+ detectedIssues.push("planning");
24494
+ }
24495
+ }
24496
+ } catch {}
24497
+ }
24498
+ if (painPoints.includes("testing"))
24499
+ detectedIssues.push("testing");
24500
+ if (painPoints.includes("context"))
24501
+ detectedIssues.push("memory");
24502
+ if (painPoints.includes("prompting"))
24503
+ detectedIssues.push("planning");
24504
+ const recommendations = [];
24505
+ for (const tech of techStack) {
24506
+ const key = tech.toLowerCase();
24507
+ const skills = SKILLS_SH_MAPPINGS[key] || [];
24508
+ for (const skill of skills) {
24509
+ recommendations.push({
24510
+ skill: skill.skill,
24511
+ name: skill.name,
24512
+ reason: skill.reason,
24513
+ category: tech,
24514
+ installs: skill.installs
24515
+ });
24516
+ }
24517
+ }
24518
+ for (const issue of detectedIssues) {
24519
+ const skills = SKILLS_SH_MAPPINGS[issue] || [];
24520
+ for (const skill of skills) {
24521
+ if (!recommendations.some((r3) => r3.skill === skill.skill)) {
24522
+ recommendations.push({
24523
+ skill: skill.skill,
24524
+ name: skill.name,
24525
+ reason: skill.reason,
24526
+ category: issue,
24527
+ installs: skill.installs
24528
+ });
24529
+ }
24530
+ }
24531
+ }
24532
+ if (recommendations.length < 3) {
24533
+ const genericSkills = [
24534
+ ...SKILLS_SH_MAPPINGS["frontend"] || [],
24535
+ ...SKILLS_SH_MAPPINGS["brainstorming"] || [],
24536
+ ...SKILLS_SH_MAPPINGS["debugging"] || []
24537
+ ];
24538
+ for (const skill of genericSkills) {
24539
+ if (!recommendations.some((r3) => r3.skill === skill.skill)) {
24540
+ recommendations.push({
24541
+ skill: skill.skill,
24542
+ name: skill.name,
24543
+ reason: skill.reason,
24544
+ category: "general",
24545
+ installs: skill.installs
24546
+ });
24547
+ }
24548
+ }
24549
+ }
24550
+ recommendations.sort((a2, b2) => (b2.installs || 0) - (a2.installs || 0));
24551
+ const toShow = recommendations.slice(0, 5);
24552
+ if (toShow.length === 0) {
24553
+ console.log(`${DIM2}No skill recommendations at this time.${RESET2}`);
24554
+ console.log(`${DIM2}Run 'nb onboard' to set up your project context.${RESET2}`);
24555
+ return;
24556
+ }
24557
+ const toInstall = [];
24558
+ for (let i3 = 0;i3 < toShow.length; i3++) {
24559
+ const rec = toShow[i3];
24560
+ const installsStr = rec.installs ? `${DIM2}${(rec.installs / 1000).toFixed(1)}K installs${RESET2}` : "";
24561
+ console.log(`${BOLD2}${i3 + 1}. ${CYAN2}${rec.name}${RESET2} ${installsStr}`);
24562
+ console.log(` ${rec.reason}`);
24563
+ console.log(` ${DIM2}npx skills add ${rec.skill}${RESET2}`);
24564
+ consola.log("");
24565
+ toInstall.push(rec.skill);
24566
+ }
24567
+ if (autoInstall && toInstall.length > 0) {
24568
+ console.log(`${DIM2}${"─".repeat(50)}${RESET2}`);
24569
+ console.log(`${YELLOW2}Installing ${toInstall.length} skills...${RESET2}`);
24570
+ consola.log("");
24571
+ for (const skill of toInstall) {
24572
+ const skillName = skill.split("/").pop();
24573
+ try {
24574
+ console.log(`${DIM2}→ Installing ${skillName}...${RESET2}`);
24575
+ execSync5(`npx skills add ${skill}`, { stdio: "inherit" });
24576
+ console.log(`${GREEN2}✓${RESET2} Installed ${skillName}`);
24577
+ } catch (err) {
24578
+ console.log(`${RED}✗${RESET2} Failed to install ${skillName}`);
24579
+ }
24580
+ consola.log("");
24581
+ }
24582
+ console.log(`${GREEN2}Done!${RESET2} Skills are now available in your agent.`);
24583
+ } else if (!autoInstall) {
24584
+ console.log(`${DIM2}${"─".repeat(50)}${RESET2}`);
24585
+ console.log(`${DIM2}Run ${CYAN2}nb recommend --install${RESET2}${DIM2} to auto-install these skills${RESET2}`);
24586
+ }
24587
+ }
24401
24588
 
24402
24589
  // src/commands/upgrade.ts
24403
- import { execSync as execSync5 } from "node:child_process";
24590
+ import { execSync as execSync6 } from "node:child_process";
24404
24591
  var CYAN3 = "\x1B[36m";
24405
24592
  var GREEN3 = "\x1B[32m";
24406
24593
  var YELLOW3 = "\x1B[33m";
@@ -24409,6 +24596,17 @@ var BOLD3 = "\x1B[1m";
24409
24596
  var RESET3 = "\x1B[0m";
24410
24597
  var MAGENTA3 = "\x1B[35m";
24411
24598
  var CHANGELOG = [
24599
+ {
24600
+ version: "0.2.0",
24601
+ date: "2026-02-14",
24602
+ title: "Skills.sh Auto-Install",
24603
+ highlights: [
24604
+ "nb recommend --skills: Show skills.sh recommendations",
24605
+ "nb recommend --install: Auto-install skills with one command",
24606
+ "Maps pain points & tech stack to 50+ skills",
24607
+ "Slack notifications on new releases"
24608
+ ]
24609
+ },
24412
24610
  {
24413
24611
  version: "0.1.0",
24414
24612
  date: "2026-02-13",
@@ -24513,10 +24711,10 @@ var upgradeCommand = defineCommand2({
24513
24711
  console.log(`${DIM3} Checking for updates...${RESET3}`);
24514
24712
  let latestVersion;
24515
24713
  try {
24516
- latestVersion = execSync5("npm view nairon-bench version", { encoding: "utf-8" }).trim();
24714
+ latestVersion = execSync6("npm view nairon-bench version", { encoding: "utf-8" }).trim();
24517
24715
  } catch {
24518
24716
  console.log(` ${YELLOW3}⚠${RESET3} Could not check npm registry`);
24519
- console.log(` ${DIM3}Run 'bun upgrade -g nairon-bench' manually${RESET3}`);
24717
+ console.log(` ${DIM3}Run 'bun add -g nairon-bench@latest' manually${RESET3}`);
24520
24718
  return;
24521
24719
  }
24522
24720
  console.log();
@@ -24544,9 +24742,9 @@ var upgradeCommand = defineCommand2({
24544
24742
  console.log();
24545
24743
  try {
24546
24744
  try {
24547
- execSync5("bun upgrade -g nairon-bench", { stdio: "inherit" });
24745
+ execSync6("bun add -g nairon-bench@latest", { stdio: "inherit" });
24548
24746
  } catch {
24549
- execSync5("npm install -g nairon-bench@latest", { stdio: "inherit" });
24747
+ execSync6("npm install -g nairon-bench@latest", { stdio: "inherit" });
24550
24748
  }
24551
24749
  console.log();
24552
24750
  console.log(` ${GREEN3}✓${RESET3} Upgraded to ${GREEN3}v${latestVersion}${RESET3}`);
@@ -24556,7 +24754,7 @@ var upgradeCommand = defineCommand2({
24556
24754
  console.log();
24557
24755
  console.log(` ${YELLOW3}⚠${RESET3} Upgrade failed`);
24558
24756
  console.log(` ${DIM3}Try running manually:${RESET3}`);
24559
- console.log(` ${CYAN3}bun upgrade -g nairon-bench${RESET3}`);
24757
+ console.log(` ${CYAN3}bun add -g nairon-bench@latest${RESET3}`);
24560
24758
  console.log(` ${DIM3}or${RESET3}`);
24561
24759
  console.log(` ${CYAN3}npm install -g nairon-bench@latest${RESET3}`);
24562
24760
  }
@@ -24564,7 +24762,7 @@ var upgradeCommand = defineCommand2({
24564
24762
  });
24565
24763
  function getCurrentVersion() {
24566
24764
  try {
24567
- const output = execSync5("nb --version 2>/dev/null || nairon-bench --version 2>/dev/null", {
24765
+ const output = execSync6("nb --version 2>/dev/null || nairon-bench --version 2>/dev/null", {
24568
24766
  encoding: "utf-8",
24569
24767
  stdio: ["pipe", "pipe", "pipe"]
24570
24768
  });
@@ -24628,7 +24826,7 @@ function showFullChangelog() {
24628
24826
  // package.json
24629
24827
  var package_default = {
24630
24828
  name: "nairon-bench",
24631
- version: "0.1.0",
24829
+ version: "0.2.1",
24632
24830
  description: "AI workflow benchmarking CLI",
24633
24831
  type: "module",
24634
24832
  bin: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nairon-bench",
3
- "version": "0.1.0",
3
+ "version": "0.2.1",
4
4
  "description": "AI workflow benchmarking CLI",
5
5
  "type": "module",
6
6
  "bin": {