agentskillsdk 0.3.1 → 0.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentskillsdk",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Install agent skills from agentskills.dk",
5
5
  "type": "module",
6
6
  "bin": {
@@ -16,7 +16,7 @@ export async function addCommand(skillName, options) {
16
16
 
17
17
  // --- resolve scope flags ---
18
18
  if (options.global && options.project) {
19
- error('Cannot use both --global and --project. Pick one.');
19
+ error('kan ikke bruge både --global og --project. vælg én.');
20
20
  process.exit(1);
21
21
  }
22
22
 
@@ -38,17 +38,17 @@ export async function addCommand(skillName, options) {
38
38
  (options.skill ? ` (skill: ${chalk.bold(options.skill)})` : ''));
39
39
  } else {
40
40
  installName = skillName;
41
- const spinner = ora({ text: `Looking up ${chalk.bold(skillName)}...`, indent: 2 }).start();
41
+ const spinner = ora({ text: `søger efter ${chalk.bold(skillName)}...`, indent: 2 }).start();
42
42
  try {
43
43
  skill = await fetchSkill(skillName);
44
44
  } catch (err) {
45
- spinner.fail('Registry lookup failed');
45
+ spinner.fail('opslag i registret fejlede');
46
46
  error(err.message);
47
47
  process.exit(1);
48
48
  }
49
49
 
50
50
  if (!skill) {
51
- spinner.fail(`Skill "${skillName}" not found`);
51
+ spinner.fail(`skill "${skillName}" ikke fundet`);
52
52
 
53
53
  let suggestions = [];
54
54
  try {
@@ -61,14 +61,14 @@ export async function addCommand(skillName, options) {
61
61
  }
62
62
 
63
63
  if (suggestions.length > 0) {
64
- console.error('\n Did you mean:');
64
+ console.error('\n mente du:');
65
65
  suggestions.forEach(s => console.error(` - ${chalk.bold(s.name)}`));
66
66
  }
67
- console.error(`\n Browse all skills: ${chalk.underline('https://agentskills.dk/skills')}\n`);
67
+ console.error(`\n se alle skills: ${chalk.underline('https://agentskills.dk/skills')}\n`);
68
68
  process.exit(1);
69
69
  }
70
70
 
71
- spinner.succeed(`Found skill: ${chalk.bold(skill.name)}`);
71
+ spinner.succeed(`fundet skill: ${chalk.bold(skill.name)}`);
72
72
  }
73
73
 
74
74
  // --- agent selection + scope prompt (with back navigation) ---
@@ -84,9 +84,9 @@ export async function addCommand(skillName, options) {
84
84
  agents = detected;
85
85
  } else if (detected.length > 1) {
86
86
  // Prompt: all detected vs choose specific
87
- const choice = await selectPrompt('how would you like to install?', [
88
- { label: `all detected agents (${detected.length})`, value: 'all' },
89
- { label: 'choose specific agents', value: 'choose' },
87
+ const choice = await selectPrompt('hvordan vil du installere?', [
88
+ { label: `alle fundne agenter (${detected.length})`, value: 'all' },
89
+ { label: 'vælg specifikke agenter', value: 'choose' },
90
90
  ]);
91
91
 
92
92
  if (choice === null) {
@@ -99,14 +99,14 @@ export async function addCommand(skillName, options) {
99
99
  } else {
100
100
  // Checkbox from detected agents
101
101
  const choices = detected.map(a => ({ label: a.name, value: a }));
102
- const selected = await checkboxPrompt('select agents:', choices);
102
+ const selected = await checkboxPrompt('vælg agenter:', choices);
103
103
  if (selected === null) continue agentSelection; // Esc → back to all/choose
104
104
  agents = selected;
105
105
  }
106
106
  } else {
107
107
  // No agents detected — show checkbox of all known agents
108
108
  const choices = AGENTS.map(a => ({ label: a.name, value: a }));
109
- const selected = await checkboxPrompt('select agents:', choices);
109
+ const selected = await checkboxPrompt('vælg agenter:', choices);
110
110
  if (selected === null) {
111
111
  // Esc with no detected agents → cancel
112
112
  process.exit(0);
@@ -122,9 +122,9 @@ export async function addCommand(skillName, options) {
122
122
  } else {
123
123
  // Build hint using first agent (representative)
124
124
  const a = agents[0];
125
- const result = await selectPrompt('install scope:', [
126
- { label: 'project', hint: `(local ${a.folder}/skills/)`, value: 'project' },
127
- { label: 'global', hint: `(~/${a.globalFolder}/skills/)`, value: 'global' },
125
+ const result = await selectPrompt('installationsomfang:', [
126
+ { label: 'projekt', hint: `(lokalt ${a.folder}/skills/)`, value: 'project' },
127
+ { label: 'globalt', hint: `(~/${a.globalFolder}/skills/)`, value: 'global' },
128
128
  ]);
129
129
 
130
130
  if (result === null) {
@@ -146,18 +146,18 @@ export async function addCommand(skillName, options) {
146
146
  }
147
147
 
148
148
  // --- download to each agent ---
149
- const spinner = ora({ text: 'Downloading skill files...', indent: 2 }).start();
149
+ const spinner = ora({ text: 'downloader skill-filer...', indent: 2 }).start();
150
150
  try {
151
151
  for (const agent of agents) {
152
152
  const destDir = agent.path(installName, { cwd, scope });
153
153
  await downloadSkill(skill, destDir);
154
154
  }
155
155
  } catch (err) {
156
- spinner.fail('Download failed');
156
+ spinner.fail('download fejlede');
157
157
  error(err.message);
158
158
  process.exit(1);
159
159
  }
160
- spinner.succeed('Downloaded skill files');
160
+ spinner.succeed('skill-filer downloadet');
161
161
 
162
162
  // --- completion summary ---
163
163
  printCompletionSummary({
@@ -13,11 +13,11 @@ export async function listCommand() {
13
13
  }
14
14
 
15
15
  if (skills.length === 0) {
16
- console.log('\n No skills available yet.\n');
16
+ console.log('\n ingen skills tilgængelige endnu.\n');
17
17
  return;
18
18
  }
19
19
 
20
- console.log(chalk.bold('\n Available skills:\n'));
20
+ console.log(chalk.bold('\n tilgængelige skills:\n'));
21
21
 
22
22
  const maxName = Math.max(...skills.map(s => s.name.length));
23
23
 
@@ -25,6 +25,6 @@ export async function listCommand() {
25
25
  console.log(` ${chalk.cyan(skill.name.padEnd(maxName + 2))} ${skill.description}`);
26
26
  }
27
27
 
28
- console.log(`\n Install: ${chalk.bold('npx agentskillsdk add <skill-name>')}`);
29
- console.log(` Browse: ${chalk.underline('https://agentskills.dk/skills')}\n`);
28
+ console.log(`\n installer: ${chalk.bold('npx agentskillsdk add <skill-name>')}`);
29
+ console.log(` gennemse: ${chalk.underline('https://agentskills.dk/skills')}\n`);
30
30
  }
package/src/index.js CHANGED
@@ -10,21 +10,21 @@ const program = new Command();
10
10
 
11
11
  program
12
12
  .name('agentskillsdk')
13
- .description('Install agent skills from agentskills.dk')
13
+ .description('installer agent-skills fra agentskills.dk')
14
14
  .version(pkg.version);
15
15
 
16
16
  program
17
17
  .command('add')
18
- .description('Install a skill into your project')
19
- .argument('<skill-name>', 'name of the skill to install (or owner/repo for GitHub)')
20
- .option('--skill <path>', 'path within repo, e.g. skills/twitter')
21
- .option('-g, --global', 'install globally to ~/.claude/skills/')
22
- .option('-p, --project', 'install to project .claude/skills/ (default)')
18
+ .description('installer en skill i dit projekt')
19
+ .argument('<skill-name>', 'navn skill (eller owner/repo for GitHub)')
20
+ .option('--skill <path>', 'sti i repo, f.eks. skills/twitter')
21
+ .option('-g, --global', 'installer globalt i ~/.claude/skills/')
22
+ .option('-p, --project', 'installer i projekt .claude/skills/ (standard)')
23
23
  .action(addCommand);
24
24
 
25
25
  program
26
26
  .command('list')
27
- .description('Show all available skills')
27
+ .description('vis alle tilgængelige skills')
28
28
  .action(listCommand);
29
29
 
30
30
  program.parse();
@@ -17,10 +17,10 @@ export async function downloadSkill(skill, destDir) {
17
17
  redirect: 'follow',
18
18
  });
19
19
  } catch {
20
- throw new Error('Failed to download skill files. Check your internet connection.');
20
+ throw new Error('kunne ikke downloade skill-filer. tjek din internetforbindelse.');
21
21
  }
22
22
 
23
- if (!res.ok) throw new Error(`GitHub download failed: ${res.status}`);
23
+ if (!res.ok) throw new Error(`GitHub download fejlede: ${res.status}`);
24
24
 
25
25
  const extract = tar.extract();
26
26
  const skillPath = skill.githubPath;
package/src/lib/prompt.js CHANGED
@@ -41,7 +41,7 @@ export function selectPrompt(question, choices, { defaultIndex = 0 } = {}) {
41
41
  return ` ${marker} ${label}${hint}`;
42
42
  });
43
43
  lines.push('');
44
- lines.push(chalk.dim(' ↑↓ navigate · enter select · esc back'));
44
+ lines.push(chalk.dim(' ↑↓ naviger · enter vælg · esc tilbage'));
45
45
  return lines;
46
46
  }
47
47
 
@@ -155,7 +155,7 @@ export function checkboxPrompt(question, choices) {
155
155
  return ` ${box} ${label}`;
156
156
  });
157
157
  lines.push('');
158
- lines.push(chalk.dim(' ↑↓ navigate · space toggle · enter confirm · esc back'));
158
+ lines.push(chalk.dim(' ↑↓ naviger · space skift · enter bekræft · esc tilbage'));
159
159
  return lines;
160
160
  }
161
161
 
package/src/lib/ui.js CHANGED
@@ -36,7 +36,7 @@ export function box(lines, { borderColor, padding = 2 } = {}) {
36
36
  export function printBanner() {
37
37
  const lines = [
38
38
  `${chalk.bold('agentskillsdk')} ${chalk.dim(`v${pkg.version}`)}`,
39
- chalk.dim('Install skills for AI agents'),
39
+ chalk.dim('installer skills til AI-agenter'),
40
40
  ];
41
41
  console.log('');
42
42
  console.log(box(lines));
@@ -47,26 +47,26 @@ export function printBanner() {
47
47
 
48
48
  export function printCompletionSummary({ skillName, scope, agents, isGithub, namespace }) {
49
49
  const scopeLabel = scope === 'global'
50
- ? 'Global (all projects)'
51
- : 'Project (local)';
50
+ ? 'globalt (alle projekter)'
51
+ : 'projekt (lokalt)';
52
52
 
53
53
  const isSingle = agents.length === 1;
54
54
  const agentNames = agents.map(a => a.name).join(', ');
55
55
  const paths = agents.map(a => a.displayPath(skillName, scope));
56
56
 
57
57
  const lines = [
58
- chalk.bold.green('Skill installed successfully!'),
58
+ chalk.bold.green('skill installeret!'),
59
59
  '',
60
- ` ${chalk.dim('Skill:')} ${skillName}`,
61
- ` ${chalk.dim('Scope:')} ${scopeLabel}`,
60
+ ` ${chalk.dim('skill:')} ${skillName}`,
61
+ ` ${chalk.dim('omfang:')} ${scopeLabel}`,
62
62
  ];
63
63
 
64
64
  if (isSingle) {
65
- lines.push(` ${chalk.dim('Agent:')} ${agentNames}`);
66
- lines.push(` ${chalk.dim('Path:')} ${paths[0]}`);
65
+ lines.push(` ${chalk.dim('agent:')} ${agentNames}`);
66
+ lines.push(` ${chalk.dim('sti:')} ${paths[0]}`);
67
67
  } else {
68
- lines.push(` ${chalk.dim('Agents:')} ${agentNames}`);
69
- lines.push(` ${chalk.dim('Paths:')} ${paths[0]}`);
68
+ lines.push(` ${chalk.dim('agenter:')} ${agentNames}`);
69
+ lines.push(` ${chalk.dim('stier:')} ${paths[0]}`);
70
70
  for (let i = 1; i < paths.length; i++) {
71
71
  lines.push(` ${paths[i]}`);
72
72
  }
@@ -74,13 +74,13 @@ export function printCompletionSummary({ skillName, scope, agents, isGithub, nam
74
74
 
75
75
  lines.push('');
76
76
  if (isSingle) {
77
- lines.push(`Start a new ${agents[0].name} session to use it.`);
77
+ lines.push(`start en ny ${agents[0].name}-session for at bruge den.`);
78
78
  } else {
79
- lines.push('Start a new session in any of these agents to use it.');
79
+ lines.push('start en ny session i en af disse agenter for at bruge den.');
80
80
  }
81
81
 
82
82
  if (!isGithub && namespace) {
83
- lines.push(`Learn more: ${chalk.underline(`https://agentskills.dk/skills/${namespace}`)}`);
83
+ lines.push(`læs mere: ${chalk.underline(`https://agentskills.dk/skills/${namespace}`)}`);
84
84
  }
85
85
 
86
86
  console.log('');