@crafter/skillkit 0.2.3 → 0.2.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crafter/skillkit",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "Local-first analytics for AI agent skills. Track usage, measure context budget, and prune what you don't use.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -70,6 +70,7 @@ export async function runStats(): Promise<void> {
70
70
  console.log(` ${bold(showAll ? "ALL SKILLS" : "TOP SKILLS")}\n`);
71
71
 
72
72
  const maxCount = topSkills.length > 0 ? (topSkills[0]?.total ?? 1) : 1;
73
+ const maxNameLen = Math.max(16, ...topSkills.map((s) => s.skill_name.length));
73
74
  const barWidth = 20;
74
75
 
75
76
  for (const skill of topSkills) {
@@ -77,7 +78,7 @@ export async function runStats(): Promise<void> {
77
78
  const filled = Math.round((skill.total / maxCount) * barWidth);
78
79
  const bar = "█".repeat(filled);
79
80
  const spark = sparkline(daily.map((d) => d.count));
80
- const name = cyan(skill.skill_name.padEnd(16));
81
+ const name = cyan(skill.skill_name.padEnd(maxNameLen));
81
82
  console.log(
82
83
  ` ${name} ${bar.padEnd(barWidth)} ${String(skill.total).padStart(4)} ${spark}`,
83
84
  );