@sysvv/ai-skill 1.1.0 → 1.2.0
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/dist/index.js +50 -22
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -18,18 +18,33 @@ const PINK = '\x1b[38;2;238;54;141m';
|
|
|
18
18
|
const BLUE = '\x1b[38;2;14;93;171m';
|
|
19
19
|
const RED = '\x1b[38;2;255;70;70m';
|
|
20
20
|
const GREEN = '\x1b[38;2;80;200;120m';
|
|
21
|
-
|
|
21
|
+
const WHITE = '\x1b[97m';
|
|
22
|
+
// ── Inquirer Theme ──────────────────────────────────────────────────────
|
|
23
|
+
const sysTheme = {
|
|
24
|
+
icon: {
|
|
25
|
+
cursor: PINK + '❯' + ANSI.reset,
|
|
26
|
+
checked: PINK + '◉' + ANSI.reset,
|
|
27
|
+
unchecked: ANSI.dim + '○' + ANSI.reset,
|
|
28
|
+
},
|
|
29
|
+
style: {
|
|
30
|
+
highlight: (text) => PINK + ANSI.bold + text + ANSI.reset,
|
|
31
|
+
answer: (text) => BLUE + ANSI.bold + text + ANSI.reset,
|
|
32
|
+
message: (text) => WHITE + ANSI.bold + text + ANSI.reset,
|
|
33
|
+
},
|
|
34
|
+
helpMode: 'always',
|
|
35
|
+
};
|
|
36
|
+
// ── ASCII Art Letters (7 lines, bigger) ─────────────────────────────────
|
|
22
37
|
const LETTERS = {
|
|
23
|
-
A: ['
|
|
24
|
-
I: ['██', '██', '██', '██', '██'],
|
|
25
|
-
K: ['██
|
|
26
|
-
L: ['██
|
|
27
|
-
S: ['
|
|
28
|
-
Y: ['██
|
|
38
|
+
A: [' ██████ ', ' ██ ██ ', '██ ██', '██████████', '██ ██', '██ ██', '██ ██'],
|
|
39
|
+
I: ['████', ' ██ ', ' ██ ', ' ██ ', ' ██ ', ' ██ ', '████'],
|
|
40
|
+
K: ['██ ██', '██ ██ ', '██ ██ ', '█████ ', '██ ██ ', '██ ██ ', '██ ██'],
|
|
41
|
+
L: ['██ ', '██ ', '██ ', '██ ', '██ ', '██ ', '█████████'],
|
|
42
|
+
S: [' ████████ ', '██ ', '██ ', ' ████████ ', ' ██ ', ' ██ ', ' ████████ '],
|
|
43
|
+
Y: ['██ ██', ' ██ ██ ', ' ██ ██ ', ' ███ ', ' ███ ', ' ███ ', ' ███ '],
|
|
29
44
|
};
|
|
30
|
-
function joinLetters(keys, gap = '
|
|
45
|
+
function joinLetters(keys, gap = ' ') {
|
|
31
46
|
const letters = keys.map(k => LETTERS[k]);
|
|
32
|
-
return Array.from({ length:
|
|
47
|
+
return Array.from({ length: 7 }, (_, i) => letters.map(l => l[i]).join(gap));
|
|
33
48
|
}
|
|
34
49
|
function centerPad(line, totalWidth) {
|
|
35
50
|
const spaces = Math.max(0, Math.floor((totalWidth - line.length) / 2));
|
|
@@ -46,28 +61,35 @@ function showBanner() {
|
|
|
46
61
|
const aiLines = joinLetters(['A', 'I']);
|
|
47
62
|
const skillsLines = joinLetters(['S', 'K', 'I', 'L', 'L', 'S']);
|
|
48
63
|
const maxWidth = Math.max(sysLines[0].length, aiLines[0].length, skillsLines[0].length);
|
|
49
|
-
const indent = '
|
|
64
|
+
const indent = ' ';
|
|
65
|
+
const separator = ANSI.dim + indent + centerPad('─'.repeat(maxWidth), maxWidth) + ANSI.reset;
|
|
66
|
+
console.log('');
|
|
50
67
|
console.log('');
|
|
51
68
|
for (const line of sysLines) {
|
|
52
69
|
console.log(indent + PINK + ANSI.bold + centerPad(line, maxWidth) + ANSI.reset);
|
|
53
70
|
}
|
|
54
71
|
console.log('');
|
|
55
72
|
for (const line of aiLines) {
|
|
56
|
-
console.log(indent + BLUE + centerPad(line, maxWidth) + ANSI.reset);
|
|
73
|
+
console.log(indent + BLUE + ANSI.bold + centerPad(line, maxWidth) + ANSI.reset);
|
|
57
74
|
}
|
|
75
|
+
console.log('');
|
|
58
76
|
for (const line of skillsLines) {
|
|
59
77
|
console.log(indent + BLUE + centerPad(line, maxWidth) + ANSI.reset);
|
|
60
78
|
}
|
|
61
79
|
console.log('');
|
|
62
|
-
console.log(
|
|
80
|
+
console.log(separator);
|
|
81
|
+
console.log('');
|
|
82
|
+
console.log(indent + WHITE + ANSI.bold + centerPad(`v${version}`, maxWidth) + ANSI.reset);
|
|
63
83
|
console.log('');
|
|
64
84
|
const desc = 'Skills para turbinar seus agentes de codigo';
|
|
65
|
-
const boxInner = desc.length +
|
|
85
|
+
const boxInner = desc.length + 4;
|
|
66
86
|
console.log(indent + ANSI.dim + centerPad('┌' + '─'.repeat(boxInner) + '┐', maxWidth) + ANSI.reset);
|
|
67
|
-
console.log(indent + ANSI.dim + centerPad('│
|
|
87
|
+
console.log(indent + ANSI.dim + centerPad('│ ' + WHITE + desc + ANSI.reset + ANSI.dim + ' │', maxWidth) + ANSI.reset);
|
|
68
88
|
console.log(indent + ANSI.dim + centerPad('└' + '─'.repeat(boxInner) + '┘', maxWidth) + ANSI.reset);
|
|
69
89
|
console.log('');
|
|
70
|
-
console.log(indent + ANSI.dim + '
|
|
90
|
+
console.log(indent + ANSI.dim + centerPad('npx @sysvv/ai-skill --claude | --codex | --gemini | --clear', maxWidth) + ANSI.reset);
|
|
91
|
+
console.log('');
|
|
92
|
+
console.log(separator);
|
|
71
93
|
console.log('');
|
|
72
94
|
}
|
|
73
95
|
// ── Config ──────────────────────────────────────────────────────────────
|
|
@@ -102,22 +124,24 @@ async function installSkills(agent) {
|
|
|
102
124
|
});
|
|
103
125
|
}
|
|
104
126
|
if (available.length === 0) {
|
|
105
|
-
console.log("Nenhuma skill encontrada.");
|
|
127
|
+
console.log(" Nenhuma skill encontrada.");
|
|
106
128
|
process.exit(1);
|
|
107
129
|
}
|
|
108
130
|
const { selected } = await inquirer.prompt([
|
|
109
131
|
{
|
|
110
132
|
type: "checkbox",
|
|
111
133
|
name: "selected",
|
|
112
|
-
message: "Escolha as skills
|
|
134
|
+
message: "Escolha as skills:",
|
|
113
135
|
choices: available.map((s) => ({
|
|
114
|
-
name: `${s.title} — ${s.description}`,
|
|
136
|
+
name: `${s.title} ${ANSI.dim}— ${s.description}${ANSI.reset}`,
|
|
115
137
|
value: s.file
|
|
116
138
|
})),
|
|
117
|
-
validate: (answer) => answer.length > 0 ? true : "Selecione pelo menos uma skill."
|
|
139
|
+
validate: (answer) => answer.length > 0 ? true : "Selecione pelo menos uma skill.",
|
|
140
|
+
theme: sysTheme
|
|
118
141
|
}
|
|
119
142
|
]);
|
|
120
143
|
const destBase = path.resolve(AGENT_DIRS[agent]);
|
|
144
|
+
console.log('');
|
|
121
145
|
for (const file of selected) {
|
|
122
146
|
const skill = await loadSkill(file, agent);
|
|
123
147
|
const skillDir = path.join(destBase, skill.metadata.name);
|
|
@@ -150,7 +174,8 @@ async function clearSkills() {
|
|
|
150
174
|
type: "confirm",
|
|
151
175
|
name: "confirm",
|
|
152
176
|
message: "Tem certeza que deseja apagar TODAS as pastas de skills?",
|
|
153
|
-
default: false
|
|
177
|
+
default: false,
|
|
178
|
+
theme: sysTheme
|
|
154
179
|
}
|
|
155
180
|
]);
|
|
156
181
|
if (!confirm) {
|
|
@@ -176,13 +201,16 @@ async function main() {
|
|
|
176
201
|
await installSkills(agent);
|
|
177
202
|
return;
|
|
178
203
|
}
|
|
179
|
-
// Modo interativo
|
|
180
204
|
const { chosenAgent } = await inquirer.prompt([
|
|
181
205
|
{
|
|
182
206
|
type: "list",
|
|
183
207
|
name: "chosenAgent",
|
|
184
208
|
message: "Qual IA você usa?",
|
|
185
|
-
choices: Object.keys(AGENT_DIRS)
|
|
209
|
+
choices: Object.keys(AGENT_DIRS).map((key) => ({
|
|
210
|
+
name: `${ANSI.bold}${key.charAt(0).toUpperCase() + key.slice(1)}${ANSI.reset}`,
|
|
211
|
+
value: key
|
|
212
|
+
})),
|
|
213
|
+
theme: sysTheme
|
|
186
214
|
}
|
|
187
215
|
]);
|
|
188
216
|
await installSkills(chosenAgent);
|