claude-agent-skills 1.5.1 → 1.5.2
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/commands/hub.js +8 -23
- package/lib/banner.js +16 -5
- package/package.json +1 -1
- package/skills.json +1 -1
package/commands/hub.js
CHANGED
|
@@ -2,10 +2,8 @@ import updateNotifier from 'update-notifier';
|
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { fileURLToPath } from 'node:url';
|
|
4
4
|
import { dirname, join } from 'node:path';
|
|
5
|
-
import
|
|
6
|
-
import { showIntro } from '../lib/banner.js';
|
|
5
|
+
import { showIntro, showIntroStatic } from '../lib/banner.js';
|
|
7
6
|
import { CliCancel } from '../lib/prompts.js';
|
|
8
|
-
import { brand, muted, white } from '../lib/theme.js';
|
|
9
7
|
import { inlineSelect } from '../lib/inlineSelect.js';
|
|
10
8
|
|
|
11
9
|
const req = createRequire(import.meta.url);
|
|
@@ -31,30 +29,23 @@ const MENU = [
|
|
|
31
29
|
{ value: 'quit', label: 'Quit' },
|
|
32
30
|
];
|
|
33
31
|
|
|
34
|
-
function printCompactHeader() {
|
|
35
|
-
const silver = s => ansis.rgb(190, 190, 190)(s);
|
|
36
|
-
process.stdout.write('\n');
|
|
37
|
-
process.stdout.write(brand('◈ CLAUDE SKILLS') + ' ' + silver('Agent Skills for Claude Code') + '\n');
|
|
38
|
-
process.stdout.write('\n');
|
|
39
|
-
}
|
|
40
|
-
|
|
41
32
|
function restoreScreen() {
|
|
42
33
|
process.stdout.write('\x1b[?1049l');
|
|
43
34
|
}
|
|
44
35
|
|
|
45
36
|
export async function runHub() {
|
|
46
|
-
//
|
|
47
|
-
// Original terminal content is restored when we exit (same as vim/less/claude-code).
|
|
37
|
+
// Alternate screen buffer — isolated viewport, no scrollback. Restored on exit like vim/less.
|
|
48
38
|
process.stdout.write('\x1b[?1049h\x1b[2J\x1b[H');
|
|
49
|
-
process.on('exit', restoreScreen);
|
|
39
|
+
process.on('exit', restoreScreen);
|
|
50
40
|
|
|
51
|
-
await showIntro();
|
|
41
|
+
await showIntro(); // animated banner on first load
|
|
52
42
|
|
|
53
43
|
let first = true;
|
|
54
44
|
for (;;) {
|
|
55
45
|
if (!first) {
|
|
46
|
+
// Clear alt screen and re-render the static banner so it's always visible
|
|
56
47
|
process.stdout.write('\x1b[2J\x1b[H');
|
|
57
|
-
|
|
48
|
+
await showIntroStatic();
|
|
58
49
|
}
|
|
59
50
|
first = false;
|
|
60
51
|
|
|
@@ -65,10 +56,7 @@ export async function runHub() {
|
|
|
65
56
|
options: MENU,
|
|
66
57
|
});
|
|
67
58
|
|
|
68
|
-
if (choice === 'quit') {
|
|
69
|
-
restoreScreen();
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
59
|
+
if (choice === 'quit') { restoreScreen(); return; }
|
|
72
60
|
|
|
73
61
|
if (choice === 'add') await runAdd(SKIP);
|
|
74
62
|
if (choice === 'update') await runUpdate(SKIP);
|
|
@@ -78,10 +66,7 @@ export async function runHub() {
|
|
|
78
66
|
if (choice === 'check') await runCheck(SKIP);
|
|
79
67
|
} catch (e) {
|
|
80
68
|
if (e instanceof CliCancel) continue; // sub-command ESC → back to menu
|
|
81
|
-
if (e?.isCancel) {
|
|
82
|
-
restoreScreen();
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
69
|
+
if (e?.isCancel) { restoreScreen(); return; } // hub menu ESC → quit
|
|
85
70
|
restoreScreen();
|
|
86
71
|
throw e;
|
|
87
72
|
}
|
package/lib/banner.js
CHANGED
|
@@ -89,6 +89,13 @@ async function renderStatic() {
|
|
|
89
89
|
renderFrame(staticColor);
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
function printSubtitle() {
|
|
93
|
+
const silver = s => ansis.rgb(190, 190, 190)(s);
|
|
94
|
+
process.stdout.write('\n');
|
|
95
|
+
process.stdout.write(silver('Agent Skills for Claude Code by Pavithran Francis') + '\n\n');
|
|
96
|
+
process.stdout.write(muted('Repository: ') + silver(REPO) + '\n\n');
|
|
97
|
+
}
|
|
98
|
+
|
|
92
99
|
/**
|
|
93
100
|
* showIntro() — full two-sweep entrance + subtitle (call ONCE at startup)
|
|
94
101
|
* showIntro({ skip:true }) — no-op (used inside sub-commands called from hub)
|
|
@@ -100,10 +107,14 @@ export async function showIntro({ skip = false } = {}) {
|
|
|
100
107
|
|
|
101
108
|
await runSweep({ step: 3, fps: 55 }); // first sweep (~0.8 s)
|
|
102
109
|
await runSweep({ step: 3, fps: 55 }); // second sweep (~0.8 s)
|
|
103
|
-
await renderStatic(); // settle to metallic
|
|
110
|
+
await renderStatic(); // settle to metallic state
|
|
104
111
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
112
|
+
printSubtitle();
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/** Static banner with no animation — used on hub loop iterations after the first. */
|
|
116
|
+
export async function showIntroStatic() {
|
|
117
|
+
process.stdout.write('\n'.repeat(ART.length));
|
|
118
|
+
await renderStatic();
|
|
119
|
+
printSubtitle();
|
|
109
120
|
}
|
package/package.json
CHANGED