@agentskill.sh/cli 1.0.6 → 1.0.8
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/README.md +9 -23
- package/dist/api.js +1 -1
- package/dist/commands/search.js +7 -9
- package/dist/commands/setup.d.ts +1 -0
- package/dist/commands/setup.js +41 -0
- package/dist/index.js +9 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
Copy-paste this into your AI agent (Claude Code, Cursor, Copilot, Codex, Windsurf, Gemini CLI, etc.):
|
|
18
18
|
|
|
19
19
|
```
|
|
20
|
-
|
|
20
|
+
Run: npx @agentskill.sh/cli@latest setup
|
|
21
|
+
Then search for skills relevant to this project using /learn
|
|
21
22
|
```
|
|
22
23
|
|
|
23
24
|
That's it. Your agent will install `/learn`, analyze your project, and suggest relevant skills from a directory of 100,000+.
|
|
@@ -25,37 +26,22 @@ That's it. Your agent will install `/learn`, analyze your project, and suggest r
|
|
|
25
26
|
<details>
|
|
26
27
|
<summary>Other install methods</summary>
|
|
27
28
|
|
|
28
|
-
**
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
/plugin marketplace add https://agentskill.sh/marketplace.json
|
|
32
|
-
/plugin install learn@agentskill-sh
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
**CLI (terminal)**
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
npx ags search "react best practices"
|
|
39
|
-
npx ags install seo-optimizer
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Or install globally:
|
|
29
|
+
**Install globally (then use `ags` directly)**
|
|
43
30
|
|
|
44
31
|
```bash
|
|
45
32
|
npm install -g @agentskill.sh/cli
|
|
46
|
-
ags
|
|
33
|
+
ags setup
|
|
47
34
|
```
|
|
48
35
|
|
|
49
|
-
**
|
|
36
|
+
**Plugin marketplace (Claude Code only)**
|
|
50
37
|
|
|
51
38
|
```bash
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
# Cursor
|
|
56
|
-
git clone https://github.com/agentskill-sh/ags.git ~/.cursor/skills/ags
|
|
39
|
+
/plugin marketplace add https://agentskill.sh/marketplace.json
|
|
40
|
+
/plugin install learn@agentskill-sh
|
|
57
41
|
```
|
|
58
42
|
|
|
43
|
+
Note: the plugin marketplace only installs the `/learn` skill. Use `npx @agentskill.sh/cli setup` to get all skills.
|
|
44
|
+
|
|
59
45
|
</details>
|
|
60
46
|
|
|
61
47
|
---
|
package/dist/api.js
CHANGED
package/dist/commands/search.js
CHANGED
|
@@ -32,26 +32,24 @@ export async function searchCommand(args) {
|
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
34
34
|
console.log(`\nSkills matching "${query}" (${data.total} results)\n`);
|
|
35
|
-
|
|
35
|
+
const truncate = (s, max) => s.length > max ? s.slice(0, max - 1) + '\u2026' : s;
|
|
36
36
|
const rows = data.results.map(s => ({
|
|
37
37
|
name: s.name,
|
|
38
38
|
owner: `@${s.owner}`,
|
|
39
|
-
|
|
40
|
-
quality: s.contentQualityScore != null ? `${s.contentQualityScore}/100` : '\u2014',
|
|
39
|
+
desc: truncate(s.description || '', 60),
|
|
41
40
|
security: s.securityScore != null ? `${s.securityScore}/100` : '\u2014',
|
|
42
41
|
}));
|
|
43
42
|
const cols = {
|
|
44
43
|
name: Math.max(4, ...rows.map(r => r.name.length)),
|
|
45
44
|
owner: Math.max(6, ...rows.map(r => r.owner.length)),
|
|
46
|
-
|
|
47
|
-
quality: Math.max(7, ...rows.map(r => r.quality.length)),
|
|
45
|
+
desc: Math.max(11, ...rows.map(r => r.desc.length)),
|
|
48
46
|
security: Math.max(8, ...rows.map(r => r.security.length)),
|
|
49
47
|
};
|
|
50
48
|
const pad = (s, w) => s + ' '.repeat(Math.max(0, w - s.length));
|
|
51
|
-
console.log(` ${pad('Name', cols.name)} ${pad('Author', cols.owner)} ${pad('
|
|
52
|
-
console.log(` ${'-'.repeat(cols.name)} ${'-'.repeat(cols.owner)} ${'-'.repeat(cols.
|
|
49
|
+
console.log(` ${pad('Name', cols.name)} ${pad('Author', cols.owner)} ${pad('Security', cols.security)} Description`);
|
|
50
|
+
console.log(` ${'-'.repeat(cols.name)} ${'-'.repeat(cols.owner)} ${'-'.repeat(cols.security)} ${'-'.repeat(11)}`);
|
|
53
51
|
for (const r of rows) {
|
|
54
|
-
console.log(` ${pad(r.name, cols.name)} ${pad(r.owner, cols.owner)} ${pad(r.
|
|
52
|
+
console.log(` ${pad(r.name, cols.name)} ${pad(r.owner, cols.owner)} ${pad(r.security, cols.security)} ${r.desc}`);
|
|
55
53
|
}
|
|
56
|
-
console.log(`\nInstall:
|
|
54
|
+
console.log(`\nInstall: npx @agentskill.sh/cli install <slug>`);
|
|
57
55
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function setupCommand(args: string[]): Promise<void>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { installCommand } from './install.js';
|
|
2
|
+
// Official skills bundled with the ags CLI
|
|
3
|
+
const OFFICIAL_SKILLS = [
|
|
4
|
+
'agentskill-sh/learn',
|
|
5
|
+
'agentskill-sh/review-skill',
|
|
6
|
+
];
|
|
7
|
+
export async function setupCommand(args) {
|
|
8
|
+
const jsonFlag = args.includes('--json');
|
|
9
|
+
const results = [];
|
|
10
|
+
if (!jsonFlag) {
|
|
11
|
+
console.log(`\nInstalling ${OFFICIAL_SKILLS.length} official skills...\n`);
|
|
12
|
+
}
|
|
13
|
+
// Temporarily suppress console.log from installCommand --json output
|
|
14
|
+
const origLog = console.log;
|
|
15
|
+
for (const slug of OFFICIAL_SKILLS) {
|
|
16
|
+
try {
|
|
17
|
+
console.log = () => { }; // suppress install JSON output
|
|
18
|
+
await installCommand([slug, '--json']);
|
|
19
|
+
console.log = origLog;
|
|
20
|
+
results.push({ slug, status: 'installed' });
|
|
21
|
+
if (!jsonFlag) {
|
|
22
|
+
console.log(` Installed: ${slug}`);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
catch (err) {
|
|
26
|
+
console.log = origLog;
|
|
27
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
28
|
+
results.push({ slug, status: `failed: ${msg}` });
|
|
29
|
+
if (!jsonFlag) {
|
|
30
|
+
console.error(` Failed: ${slug} - ${msg}`);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
if (jsonFlag) {
|
|
35
|
+
console.log(JSON.stringify({ skills: results }, null, 2));
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
console.log(`\nDone. ${results.filter((r) => r.status === 'installed').length}/${OFFICIAL_SKILLS.length} skills installed.`);
|
|
39
|
+
console.log('Restart your agent or open a new session to activate.');
|
|
40
|
+
}
|
|
41
|
+
}
|
package/dist/index.js
CHANGED
|
@@ -5,12 +5,14 @@ import { listCommand } from './commands/list.js';
|
|
|
5
5
|
import { removeCommand } from './commands/remove.js';
|
|
6
6
|
import { feedbackCommand } from './commands/feedback.js';
|
|
7
7
|
import { updateCommand } from './commands/update.js';
|
|
8
|
-
|
|
8
|
+
import { setupCommand } from './commands/setup.js';
|
|
9
|
+
const VERSION = '1.0.8';
|
|
9
10
|
const HELP = `ags v${VERSION} — search, install, and manage AI agent skills
|
|
10
11
|
|
|
11
12
|
Usage:
|
|
12
13
|
ags search <query> [--json] [--limit N] [--platform NAME]
|
|
13
14
|
ags install <slug> [--json] [--platform NAME]
|
|
15
|
+
ags setup # Install all official skills
|
|
14
16
|
ags list [--json]
|
|
15
17
|
ags remove <slug>
|
|
16
18
|
ags feedback <slug> <1-5> [comment]
|
|
@@ -21,12 +23,14 @@ Usage:
|
|
|
21
23
|
Commands:
|
|
22
24
|
search Search for skills on agentskill.sh
|
|
23
25
|
install Install a skill to your project
|
|
26
|
+
setup Install all official agentskill.sh skills (/learn, /review-skill)
|
|
24
27
|
list Show installed skills
|
|
25
28
|
remove Uninstall a skill
|
|
26
29
|
feedback Rate a skill (1-5) with optional comment
|
|
27
30
|
update Check for and apply skill updates
|
|
28
31
|
|
|
29
32
|
Examples:
|
|
33
|
+
ags setup
|
|
30
34
|
ags search react
|
|
31
35
|
ags install seo-optimizer
|
|
32
36
|
ags install @anthropics/react-best-practices
|
|
@@ -76,6 +80,10 @@ async function main() {
|
|
|
76
80
|
case 'upgrade':
|
|
77
81
|
await updateCommand(commandArgs);
|
|
78
82
|
break;
|
|
83
|
+
case 'setup':
|
|
84
|
+
case 'init':
|
|
85
|
+
await setupCommand(commandArgs);
|
|
86
|
+
break;
|
|
79
87
|
default:
|
|
80
88
|
console.error(`Unknown command: ${command}`);
|
|
81
89
|
console.error('Run "ags --help" for usage.');
|