@claudeskills/cli 0.1.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/README.md +82 -0
- package/dist/commands/install.d.ts +2 -0
- package/dist/commands/install.d.ts.map +1 -0
- package/dist/commands/install.js +29 -0
- package/dist/commands/install.js.map +1 -0
- package/dist/commands/list.d.ts +2 -0
- package/dist/commands/list.d.ts.map +1 -0
- package/dist/commands/list.js +40 -0
- package/dist/commands/list.js.map +1 -0
- package/dist/commands/uninstall.d.ts +2 -0
- package/dist/commands/uninstall.d.ts.map +1 -0
- package/dist/commands/uninstall.js +33 -0
- package/dist/commands/uninstall.js.map +1 -0
- package/dist/config.d.ts +21 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +21 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +62 -0
- package/dist/index.js.map +1 -0
- package/dist/utils.d.ts +64 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +194 -0
- package/dist/utils.js.map +1 -0
- package/package.json +33 -0
package/README.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# claudeskills CLI
|
|
2
|
+
|
|
3
|
+
Install Claude AI skills and agents directly into your project.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Via npx (no install needed)
|
|
9
|
+
npx claudeskills install <slug>
|
|
10
|
+
|
|
11
|
+
# Or install globally
|
|
12
|
+
npm install -g claudeskills
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
### Install a skill
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
claudeskills install plan-creator
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
This installs to `.claude/skills/plan-creator/`
|
|
24
|
+
|
|
25
|
+
### Install an agent
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
claudeskills install plan-creator --agent
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
This installs to `.claude/agents/plan-creator/`
|
|
32
|
+
|
|
33
|
+
### Target different IDEs
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# Install to .cursor/skills/
|
|
37
|
+
claudeskills install plan-creator --target cursor
|
|
38
|
+
|
|
39
|
+
# Install to .cursor/agents/
|
|
40
|
+
claudeskills install plan-creator --agent --target cursor
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### List installed
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
claudeskills list
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Uninstall
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
claudeskills uninstall plan-creator
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Options
|
|
56
|
+
|
|
57
|
+
| Flag | Short | Description |
|
|
58
|
+
|------|-------|-------------|
|
|
59
|
+
| `--agent` | `-a` | Install as agent instead of skill |
|
|
60
|
+
| `--target` | `-t` | Target IDE: `claude` or `cursor` (default: `claude`) |
|
|
61
|
+
| `--help` | `-h` | Show help |
|
|
62
|
+
|
|
63
|
+
## Directory Structure
|
|
64
|
+
|
|
65
|
+
After installation, your project will have:
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
your-project/
|
|
69
|
+
├── .claude/
|
|
70
|
+
│ ├── skills/
|
|
71
|
+
│ │ └── plan-creator/
|
|
72
|
+
│ │ └── skill.md
|
|
73
|
+
│ └── agents/
|
|
74
|
+
│ └── my-agent/
|
|
75
|
+
│ └── my-agent.md
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Environment Variables
|
|
79
|
+
|
|
80
|
+
| Variable | Description | Default |
|
|
81
|
+
|----------|-------------|---------|
|
|
82
|
+
| `CLAUDESKILLS_REGISTRY_URL` | Custom registry URL | `https://claudeskills.co/api/registry` |
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/commands/install.ts"],"names":[],"mappings":"AASA,wBAAsB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA+B3D"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.install = install;
|
|
4
|
+
const utils_js_1 = require("../utils.js");
|
|
5
|
+
async function install(args) {
|
|
6
|
+
const { slug, isAgent, target } = (0, utils_js_1.parseArgs)(args);
|
|
7
|
+
if (!slug) {
|
|
8
|
+
throw new Error("Please provide a skill/agent slug to install");
|
|
9
|
+
}
|
|
10
|
+
console.log(utils_js_1.colors.dim(`Fetching ${slug} from registry...`));
|
|
11
|
+
// Fetch from registry
|
|
12
|
+
const data = await (0, utils_js_1.fetchFromRegistry)(slug);
|
|
13
|
+
// Determine type: use --agent flag if provided, otherwise use registry type
|
|
14
|
+
const type = isAgent ? "agent" : data.type;
|
|
15
|
+
// Check if already installed
|
|
16
|
+
if ((0, utils_js_1.isInstalled)(slug, type, target)) {
|
|
17
|
+
console.log(utils_js_1.colors.yellow(`⚠ '${slug}' is already installed. Updating...`));
|
|
18
|
+
}
|
|
19
|
+
// Get install directory
|
|
20
|
+
const installDir = (0, utils_js_1.getInstallDir)(slug, type, target);
|
|
21
|
+
// Write files
|
|
22
|
+
(0, utils_js_1.writeFiles)(installDir, data.files);
|
|
23
|
+
// Success message
|
|
24
|
+
const typeLabel = type === "agent" ? "Agent" : "Skill";
|
|
25
|
+
console.log(utils_js_1.colors.green(`✓ ${typeLabel} '${data.name}' installed successfully!`));
|
|
26
|
+
console.log(utils_js_1.colors.dim(` Location: ${installDir}`));
|
|
27
|
+
console.log(utils_js_1.colors.dim(` Files: ${data.files.length}`));
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=install.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{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AO,CAAC,GAAG,CAAC,iBAAM,CAAC,GAAG,CAAC,eAAe,UAAU,EAAE,CAAC,CAAC,CAAA;IACpD,OAAO,CAAC,GAAG,CAAC,iBAAM,CAAC,GAAG,CAAC,YAAY,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAA;AAC1D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/commands/list.ts"],"names":[],"mappings":"AAGA,wBAAsB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAwCxD"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.list = list;
|
|
4
|
+
const utils_js_1 = require("../utils.js");
|
|
5
|
+
async function list(args) {
|
|
6
|
+
// Parse target from args
|
|
7
|
+
let target = "claude";
|
|
8
|
+
for (let i = 0; i < args.length; i++) {
|
|
9
|
+
const arg = args[i];
|
|
10
|
+
if (arg === "-t" || arg === "--target") {
|
|
11
|
+
const nextArg = args[i + 1];
|
|
12
|
+
if (nextArg === "claude" || nextArg === "cursor") {
|
|
13
|
+
target = nextArg;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
const projectRoot = (0, utils_js_1.findProjectRoot)();
|
|
18
|
+
const { skills, agents } = (0, utils_js_1.listInstalled)(target);
|
|
19
|
+
console.log(utils_js_1.colors.bold(`\nInstalled in ${projectRoot}/.${target}/\n`));
|
|
20
|
+
if (skills.length === 0 && agents.length === 0) {
|
|
21
|
+
console.log(utils_js_1.colors.dim(" No skills or agents installed.\n"));
|
|
22
|
+
console.log(utils_js_1.colors.dim(" Run 'claudeskills install <slug>' to install one.\n"));
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
if (skills.length > 0) {
|
|
26
|
+
console.log(utils_js_1.colors.blue("Skills:"));
|
|
27
|
+
for (const skill of skills) {
|
|
28
|
+
console.log(` • ${skill}`);
|
|
29
|
+
}
|
|
30
|
+
console.log();
|
|
31
|
+
}
|
|
32
|
+
if (agents.length > 0) {
|
|
33
|
+
console.log(utils_js_1.colors.blue("Agents:"));
|
|
34
|
+
for (const agent of agents) {
|
|
35
|
+
console.log(` • ${agent}`);
|
|
36
|
+
}
|
|
37
|
+
console.log();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../src/commands/list.ts"],"names":[],"mappings":";;AAGA,oBAwCC;AA3CD,0CAAoE;AAG7D,KAAK,UAAU,IAAI,CAAC,IAAc;IACvC,yBAAyB;IACzB,IAAI,MAAM,GAAW,QAAQ,CAAA;IAE7B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;QACnB,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,UAAU,EAAE,CAAC;YACvC,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAA;YAC3B,IAAI,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,QAAQ,EAAE,CAAC;gBACjD,MAAM,GAAG,OAAO,CAAA;YAClB,CAAC;QACH,CAAC;IACH,CAAC;IAED,MAAM,WAAW,GAAG,IAAA,0BAAe,GAAE,CAAA;IACrC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,wBAAa,EAAC,MAAM,CAAC,CAAA;IAEhD,OAAO,CAAC,GAAG,CAAC,iBAAM,CAAC,IAAI,CAAC,kBAAkB,WAAW,KAAK,MAAM,KAAK,CAAC,CAAC,CAAA;IAEvE,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC/C,OAAO,CAAC,GAAG,CAAC,iBAAM,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAC,CAAA;QAC7D,OAAO,CAAC,GAAG,CAAC,iBAAM,CAAC,GAAG,CAAC,uDAAuD,CAAC,CAAC,CAAA;QAChF,OAAM;IACR,CAAC;IAED,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,OAAO,CAAC,GAAG,CAAC,iBAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAA;QACnC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,OAAO,CAAC,GAAG,CAAC,OAAO,KAAK,EAAE,CAAC,CAAA;QAC7B,CAAC;QACD,OAAO,CAAC,GAAG,EAAE,CAAA;IACf,CAAC;IAED,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,OAAO,CAAC,GAAG,CAAC,iBAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAA;QACnC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,OAAO,CAAC,GAAG,CAAC,OAAO,KAAK,EAAE,CAAC,CAAA;QAC7B,CAAC;QACD,OAAO,CAAC,GAAG,EAAE,CAAA;IACf,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../../src/commands/uninstall.ts"],"names":[],"mappings":"AAOA,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAiC7D"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uninstall = uninstall;
|
|
4
|
+
const utils_js_1 = require("../utils.js");
|
|
5
|
+
async function uninstall(args) {
|
|
6
|
+
const { slug, isAgent, target } = (0, utils_js_1.parseArgs)(args);
|
|
7
|
+
if (!slug) {
|
|
8
|
+
throw new Error("Please provide a skill/agent slug to uninstall");
|
|
9
|
+
}
|
|
10
|
+
// Try to find if it's installed as skill or agent
|
|
11
|
+
const isSkill = (0, utils_js_1.isInstalled)(slug, "skill", target);
|
|
12
|
+
const isAgentInstalled = (0, utils_js_1.isInstalled)(slug, "agent", target);
|
|
13
|
+
if (!isSkill && !isAgentInstalled) {
|
|
14
|
+
throw new Error(`'${slug}' is not installed`);
|
|
15
|
+
}
|
|
16
|
+
// Determine type: use flag if provided, otherwise detect
|
|
17
|
+
let type;
|
|
18
|
+
if (isAgent) {
|
|
19
|
+
type = "agent";
|
|
20
|
+
}
|
|
21
|
+
else if (isSkill && isAgentInstalled) {
|
|
22
|
+
// Both exist, need user to specify
|
|
23
|
+
throw new Error(`'${slug}' exists as both skill and agent. Use --agent flag to specify which to remove.`);
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
type = isSkill ? "skill" : "agent";
|
|
27
|
+
}
|
|
28
|
+
// Remove
|
|
29
|
+
(0, utils_js_1.removeInstalled)(slug, type, target);
|
|
30
|
+
const typeLabel = type === "agent" ? "Agent" : "Skill";
|
|
31
|
+
console.log(utils_js_1.colors.green(`✓ ${typeLabel} '${slug}' uninstalled successfully!`));
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=uninstall.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uninstall.js","sourceRoot":"","sources":["../../src/commands/uninstall.ts"],"names":[],"mappings":";;AAOA,8BAiCC;AAxCD,0CAKoB;AAEb,KAAK,UAAU,SAAS,CAAC,IAAc;IAC5C,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAA,oBAAS,EAAC,IAAI,CAAC,CAAA;IAEjD,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAA;IACnE,CAAC;IAED,kDAAkD;IAClD,MAAM,OAAO,GAAG,IAAA,sBAAW,EAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,CAAA;IAClD,MAAM,gBAAgB,GAAG,IAAA,sBAAW,EAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,CAAA;IAE3D,IAAI,CAAC,OAAO,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAClC,MAAM,IAAI,KAAK,CAAC,IAAI,IAAI,oBAAoB,CAAC,CAAA;IAC/C,CAAC;IAED,yDAAyD;IACzD,IAAI,IAAuB,CAAA;IAC3B,IAAI,OAAO,EAAE,CAAC;QACZ,IAAI,GAAG,OAAO,CAAA;IAChB,CAAC;SAAM,IAAI,OAAO,IAAI,gBAAgB,EAAE,CAAC;QACvC,mCAAmC;QACnC,MAAM,IAAI,KAAK,CACb,IAAI,IAAI,gFAAgF,CACzF,CAAA;IACH,CAAC;SAAM,CAAC;QACN,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAA;IACpC,CAAC;IAED,SAAS;IACT,IAAA,0BAAe,EAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAA;IAEnC,MAAM,SAAS,GAAG,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAA;IACtD,OAAO,CAAC,GAAG,CAAC,iBAAM,CAAC,KAAK,CAAC,KAAK,SAAS,KAAK,IAAI,6BAA6B,CAAC,CAAC,CAAA;AACjF,CAAC"}
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const REGISTRY_URL: string;
|
|
2
|
+
export declare const TARGETS: {
|
|
3
|
+
readonly claude: {
|
|
4
|
+
readonly skills: ".claude/skills";
|
|
5
|
+
readonly agents: ".claude/agents";
|
|
6
|
+
};
|
|
7
|
+
readonly cursor: {
|
|
8
|
+
readonly skills: ".cursor/skills";
|
|
9
|
+
readonly agents: ".cursor/agents";
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type Target = keyof typeof TARGETS;
|
|
13
|
+
export type ResourceType = "skill" | "agent";
|
|
14
|
+
export declare function getTargetPaths(target: Target): {
|
|
15
|
+
readonly skills: ".claude/skills";
|
|
16
|
+
readonly agents: ".claude/agents";
|
|
17
|
+
} | {
|
|
18
|
+
readonly skills: ".cursor/skills";
|
|
19
|
+
readonly agents: ".cursor/agents";
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,YAAY,QAAkF,CAAA;AAG3G,eAAO,MAAM,OAAO;;;;;;;;;CASV,CAAA;AAEV,MAAM,MAAM,MAAM,GAAG,MAAM,OAAO,OAAO,CAAA;AACzC,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,OAAO,CAAA;AAE5C,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM;;;;;;EAE5C"}
|
package/dist/config.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TARGETS = exports.REGISTRY_URL = void 0;
|
|
4
|
+
exports.getTargetPaths = getTargetPaths;
|
|
5
|
+
// Registry API base URL
|
|
6
|
+
exports.REGISTRY_URL = process.env.CLAUDESKILLS_REGISTRY_URL || "https://claudeskills.co/api/registry";
|
|
7
|
+
// Supported targets and their directory structures
|
|
8
|
+
exports.TARGETS = {
|
|
9
|
+
claude: {
|
|
10
|
+
skills: ".claude/skills",
|
|
11
|
+
agents: ".claude/agents",
|
|
12
|
+
},
|
|
13
|
+
cursor: {
|
|
14
|
+
skills: ".cursor/skills",
|
|
15
|
+
agents: ".cursor/agents",
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
function getTargetPaths(target) {
|
|
19
|
+
return exports.TARGETS[target];
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;AAkBA,wCAEC;AApBD,wBAAwB;AACX,QAAA,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,yBAAyB,IAAI,sCAAsC,CAAA;AAE3G,mDAAmD;AACtC,QAAA,OAAO,GAAG;IACrB,MAAM,EAAE;QACN,MAAM,EAAE,gBAAgB;QACxB,MAAM,EAAE,gBAAgB;KACzB;IACD,MAAM,EAAE;QACN,MAAM,EAAE,gBAAgB;QACxB,MAAM,EAAE,gBAAgB;KACzB;CACO,CAAA;AAKV,SAAgB,cAAc,CAAC,MAAc;IAC3C,OAAO,eAAO,CAAC,MAAM,CAAC,CAAA;AACxB,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const install_js_1 = require("./commands/install.js");
|
|
5
|
+
const list_js_1 = require("./commands/list.js");
|
|
6
|
+
const uninstall_js_1 = require("./commands/uninstall.js");
|
|
7
|
+
const HELP = `
|
|
8
|
+
claudeskills - Install Claude AI skills and agents
|
|
9
|
+
|
|
10
|
+
Usage:
|
|
11
|
+
claudeskills install <slug> Install a skill
|
|
12
|
+
claudeskills install <slug> -a Install as agent
|
|
13
|
+
claudeskills list List installed skills/agents
|
|
14
|
+
claudeskills uninstall <slug> Remove a skill/agent
|
|
15
|
+
claudeskills help Show this help
|
|
16
|
+
|
|
17
|
+
Options:
|
|
18
|
+
-a, --agent Install as agent (to .claude/agents/)
|
|
19
|
+
-t, --target Target directory (claude, cursor) [default: claude]
|
|
20
|
+
-h, --help Show help
|
|
21
|
+
|
|
22
|
+
Examples:
|
|
23
|
+
claudeskills install plan-creator
|
|
24
|
+
claudeskills install plan-creator --agent
|
|
25
|
+
claudeskills install plan-creator -t cursor
|
|
26
|
+
claudeskills list
|
|
27
|
+
`;
|
|
28
|
+
async function main() {
|
|
29
|
+
const args = process.argv.slice(2);
|
|
30
|
+
const command = args[0];
|
|
31
|
+
if (!command || command === "help" || command === "-h" || command === "--help") {
|
|
32
|
+
console.log(HELP);
|
|
33
|
+
process.exit(0);
|
|
34
|
+
}
|
|
35
|
+
try {
|
|
36
|
+
switch (command) {
|
|
37
|
+
case "install":
|
|
38
|
+
case "i":
|
|
39
|
+
await (0, install_js_1.install)(args.slice(1));
|
|
40
|
+
break;
|
|
41
|
+
case "list":
|
|
42
|
+
case "ls":
|
|
43
|
+
await (0, list_js_1.list)(args.slice(1));
|
|
44
|
+
break;
|
|
45
|
+
case "uninstall":
|
|
46
|
+
case "remove":
|
|
47
|
+
case "rm":
|
|
48
|
+
await (0, uninstall_js_1.uninstall)(args.slice(1));
|
|
49
|
+
break;
|
|
50
|
+
default:
|
|
51
|
+
console.error(`Unknown command: ${command}`);
|
|
52
|
+
console.log(HELP);
|
|
53
|
+
process.exit(1);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
catch (error) {
|
|
57
|
+
console.error("Error:", error instanceof Error ? error.message : error);
|
|
58
|
+
process.exit(1);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
main();
|
|
62
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAEA,sDAA+C;AAC/C,gDAAyC;AACzC,0DAAmD;AAEnD,MAAM,IAAI,GAA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CAAC,CAAA;QACvE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACjB,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAA"}
|
package/dist/utils.d.ts
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { type Target, type ResourceType } from "./config.js";
|
|
2
|
+
export interface RegistryResponse {
|
|
3
|
+
slug: string;
|
|
4
|
+
name: string;
|
|
5
|
+
type: ResourceType;
|
|
6
|
+
version: string;
|
|
7
|
+
files: {
|
|
8
|
+
path: string;
|
|
9
|
+
content: string;
|
|
10
|
+
}[];
|
|
11
|
+
}
|
|
12
|
+
export interface ParsedArgs {
|
|
13
|
+
slug?: string;
|
|
14
|
+
isAgent: boolean;
|
|
15
|
+
target: Target;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Parse CLI arguments for install/uninstall commands
|
|
19
|
+
*/
|
|
20
|
+
export declare function parseArgs(args: string[]): ParsedArgs;
|
|
21
|
+
/**
|
|
22
|
+
* Fetch skill/agent from registry
|
|
23
|
+
*/
|
|
24
|
+
export declare function fetchFromRegistry(slug: string): Promise<RegistryResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* Find project root by looking for common project indicators
|
|
27
|
+
*/
|
|
28
|
+
export declare function findProjectRoot(startDir?: string): string;
|
|
29
|
+
/**
|
|
30
|
+
* Get the installation directory for a skill/agent
|
|
31
|
+
*/
|
|
32
|
+
export declare function getInstallDir(slug: string, type: ResourceType, target: Target): string;
|
|
33
|
+
/**
|
|
34
|
+
* Write files to disk, creating directories as needed
|
|
35
|
+
*/
|
|
36
|
+
export declare function writeFiles(installDir: string, files: {
|
|
37
|
+
path: string;
|
|
38
|
+
content: string;
|
|
39
|
+
}[]): void;
|
|
40
|
+
/**
|
|
41
|
+
* Check if a skill/agent is installed
|
|
42
|
+
*/
|
|
43
|
+
export declare function isInstalled(slug: string, type: ResourceType, target: Target): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Remove installed skill/agent
|
|
46
|
+
*/
|
|
47
|
+
export declare function removeInstalled(slug: string, type: ResourceType, target: Target): void;
|
|
48
|
+
/**
|
|
49
|
+
* List installed skills/agents for a target
|
|
50
|
+
* Supports both folder-based (skill-name/) and file-based (skill-name.md) installations
|
|
51
|
+
*/
|
|
52
|
+
export declare function listInstalled(target: Target): {
|
|
53
|
+
skills: string[];
|
|
54
|
+
agents: string[];
|
|
55
|
+
};
|
|
56
|
+
export declare const colors: {
|
|
57
|
+
green: (text: string) => string;
|
|
58
|
+
red: (text: string) => string;
|
|
59
|
+
yellow: (text: string) => string;
|
|
60
|
+
blue: (text: string) => string;
|
|
61
|
+
dim: (text: string) => string;
|
|
62
|
+
bold: (text: string) => string;
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAgB,KAAK,MAAM,EAAE,KAAK,YAAY,EAAkB,MAAM,aAAa,CAAA;AAE1F,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAA;QACZ,OAAO,EAAE,MAAM,CAAA;KAChB,EAAE,CAAA;CACJ;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;CACf;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU,CAwBpD;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAa/E;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,QAAQ,GAAE,MAAsB,GAAG,MAAM,CA0BxE;AAED;;GAEG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,YAAY,EAClB,MAAM,EAAE,MAAM,GACb,MAAM,CAMR;AAED;;GAEG;AACH,wBAAgB,UAAU,CACxB,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAAE,GACzC,IAAI,CAeN;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAGrF;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAQtF;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG;IAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CAuBpF;AAGD,eAAO,MAAM,MAAM;kBACH,MAAM;gBACR,MAAM;mBACH,MAAM;iBACR,MAAM;gBACP,MAAM;iBACL,MAAM;CACpB,CAAA"}
|
package/dist/utils.js
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.colors = void 0;
|
|
37
|
+
exports.parseArgs = parseArgs;
|
|
38
|
+
exports.fetchFromRegistry = fetchFromRegistry;
|
|
39
|
+
exports.findProjectRoot = findProjectRoot;
|
|
40
|
+
exports.getInstallDir = getInstallDir;
|
|
41
|
+
exports.writeFiles = writeFiles;
|
|
42
|
+
exports.isInstalled = isInstalled;
|
|
43
|
+
exports.removeInstalled = removeInstalled;
|
|
44
|
+
exports.listInstalled = listInstalled;
|
|
45
|
+
const fs = __importStar(require("node:fs"));
|
|
46
|
+
const path = __importStar(require("node:path"));
|
|
47
|
+
const config_js_1 = require("./config.js");
|
|
48
|
+
/**
|
|
49
|
+
* Parse CLI arguments for install/uninstall commands
|
|
50
|
+
*/
|
|
51
|
+
function parseArgs(args) {
|
|
52
|
+
let slug;
|
|
53
|
+
let isAgent = false;
|
|
54
|
+
let target = "claude";
|
|
55
|
+
for (let i = 0; i < args.length; i++) {
|
|
56
|
+
const arg = args[i];
|
|
57
|
+
if (arg === "-a" || arg === "--agent") {
|
|
58
|
+
isAgent = true;
|
|
59
|
+
}
|
|
60
|
+
else if (arg === "-t" || arg === "--target") {
|
|
61
|
+
const nextArg = args[i + 1];
|
|
62
|
+
if (nextArg === "claude" || nextArg === "cursor") {
|
|
63
|
+
target = nextArg;
|
|
64
|
+
i++;
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
throw new Error(`Invalid target: ${nextArg}. Use 'claude' or 'cursor'`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
else if (!arg.startsWith("-")) {
|
|
71
|
+
slug = arg;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return { slug, isAgent, target };
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Fetch skill/agent from registry
|
|
78
|
+
*/
|
|
79
|
+
async function fetchFromRegistry(slug) {
|
|
80
|
+
const url = `${config_js_1.REGISTRY_URL}/${slug}`;
|
|
81
|
+
const response = await fetch(url);
|
|
82
|
+
if (!response.ok) {
|
|
83
|
+
if (response.status === 404) {
|
|
84
|
+
throw new Error(`'${slug}' not found in registry`);
|
|
85
|
+
}
|
|
86
|
+
throw new Error(`Registry error: ${response.status} ${response.statusText}`);
|
|
87
|
+
}
|
|
88
|
+
return response.json();
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Find project root by looking for common project indicators
|
|
92
|
+
*/
|
|
93
|
+
function findProjectRoot(startDir = process.cwd()) {
|
|
94
|
+
let currentDir = startDir;
|
|
95
|
+
while (currentDir !== path.dirname(currentDir)) {
|
|
96
|
+
// Check for common project root indicators
|
|
97
|
+
const indicators = [
|
|
98
|
+
".git",
|
|
99
|
+
"package.json",
|
|
100
|
+
"Cargo.toml",
|
|
101
|
+
"pyproject.toml",
|
|
102
|
+
"go.mod",
|
|
103
|
+
".claude",
|
|
104
|
+
".cursor",
|
|
105
|
+
];
|
|
106
|
+
for (const indicator of indicators) {
|
|
107
|
+
if (fs.existsSync(path.join(currentDir, indicator))) {
|
|
108
|
+
return currentDir;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
currentDir = path.dirname(currentDir);
|
|
112
|
+
}
|
|
113
|
+
// Fall back to current working directory
|
|
114
|
+
return process.cwd();
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Get the installation directory for a skill/agent
|
|
118
|
+
*/
|
|
119
|
+
function getInstallDir(slug, type, target) {
|
|
120
|
+
const projectRoot = findProjectRoot();
|
|
121
|
+
const paths = (0, config_js_1.getTargetPaths)(target);
|
|
122
|
+
const baseDir = type === "agent" ? paths.agents : paths.skills;
|
|
123
|
+
return path.join(projectRoot, baseDir, slug);
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Write files to disk, creating directories as needed
|
|
127
|
+
*/
|
|
128
|
+
function writeFiles(installDir, files) {
|
|
129
|
+
// Create base directory
|
|
130
|
+
fs.mkdirSync(installDir, { recursive: true });
|
|
131
|
+
for (const file of files) {
|
|
132
|
+
const filePath = path.join(installDir, file.path);
|
|
133
|
+
const fileDir = path.dirname(filePath);
|
|
134
|
+
// Create subdirectories if needed
|
|
135
|
+
if (fileDir !== installDir) {
|
|
136
|
+
fs.mkdirSync(fileDir, { recursive: true });
|
|
137
|
+
}
|
|
138
|
+
fs.writeFileSync(filePath, file.content, "utf-8");
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Check if a skill/agent is installed
|
|
143
|
+
*/
|
|
144
|
+
function isInstalled(slug, type, target) {
|
|
145
|
+
const installDir = getInstallDir(slug, type, target);
|
|
146
|
+
return fs.existsSync(installDir);
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Remove installed skill/agent
|
|
150
|
+
*/
|
|
151
|
+
function removeInstalled(slug, type, target) {
|
|
152
|
+
const installDir = getInstallDir(slug, type, target);
|
|
153
|
+
if (!fs.existsSync(installDir)) {
|
|
154
|
+
throw new Error(`'${slug}' is not installed`);
|
|
155
|
+
}
|
|
156
|
+
fs.rmSync(installDir, { recursive: true, force: true });
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* List installed skills/agents for a target
|
|
160
|
+
* Supports both folder-based (skill-name/) and file-based (skill-name.md) installations
|
|
161
|
+
*/
|
|
162
|
+
function listInstalled(target) {
|
|
163
|
+
const projectRoot = findProjectRoot();
|
|
164
|
+
const paths = (0, config_js_1.getTargetPaths)(target);
|
|
165
|
+
const skillsDir = path.join(projectRoot, paths.skills);
|
|
166
|
+
const agentsDir = path.join(projectRoot, paths.agents);
|
|
167
|
+
const listItems = (dir) => {
|
|
168
|
+
if (!fs.existsSync(dir))
|
|
169
|
+
return [];
|
|
170
|
+
return fs.readdirSync(dir).map((f) => {
|
|
171
|
+
const stat = fs.statSync(path.join(dir, f));
|
|
172
|
+
// Return folder name or file name without .md extension
|
|
173
|
+
if (stat.isDirectory())
|
|
174
|
+
return f;
|
|
175
|
+
if (f.endsWith(".md"))
|
|
176
|
+
return f.replace(/\.md$/, "");
|
|
177
|
+
return f;
|
|
178
|
+
});
|
|
179
|
+
};
|
|
180
|
+
return {
|
|
181
|
+
skills: listItems(skillsDir),
|
|
182
|
+
agents: listItems(agentsDir),
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
// Color helpers for terminal output
|
|
186
|
+
exports.colors = {
|
|
187
|
+
green: (text) => `\x1b[32m${text}\x1b[0m`,
|
|
188
|
+
red: (text) => `\x1b[31m${text}\x1b[0m`,
|
|
189
|
+
yellow: (text) => `\x1b[33m${text}\x1b[0m`,
|
|
190
|
+
blue: (text) => `\x1b[34m${text}\x1b[0m`,
|
|
191
|
+
dim: (text) => `\x1b[2m${text}\x1b[0m`,
|
|
192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,CAAC,KAAK,CAAC;gBAAE,OAAO,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAA;YACpD,OAAO,CAAC,CAAA;QACV,CAAC,CAAC,CAAA;IACJ,CAAC,CAAA;IAED,OAAO;QACL,MAAM,EAAE,SAAS,CAAC,SAAS,CAAC;QAC5B,MAAM,EAAE,SAAS,CAAC,SAAS,CAAC;KAC7B,CAAA;AACH,CAAC;AAED,oCAAoC;AACvB,QAAA,MAAM,GAAG;IACpB,KAAK,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,WAAW,IAAI,SAAS;IACjD,GAAG,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,WAAW,IAAI,SAAS;IAC/C,MAAM,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,WAAW,IAAI,SAAS;IAClD,IAAI,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,WAAW,IAAI,SAAS;IAChD,GAAG,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,UAAU,IAAI,SAAS;IAC9C,IAAI,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,UAAU,IAAI,SAAS;CAChD,CAAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@claudeskills/cli",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "CLI to install Claude AI skills and agents",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"claudeskills": "./dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "tsc",
|
|
14
|
+
"dev": "tsc --watch",
|
|
15
|
+
"prepublishOnly": "npm run build"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"claude",
|
|
19
|
+
"ai",
|
|
20
|
+
"skills",
|
|
21
|
+
"agents",
|
|
22
|
+
"cli"
|
|
23
|
+
],
|
|
24
|
+
"author": "",
|
|
25
|
+
"license": "MIT",
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@types/node": "^20.0.0",
|
|
28
|
+
"typescript": "^5.0.0"
|
|
29
|
+
},
|
|
30
|
+
"engines": {
|
|
31
|
+
"node": ">=18.0.0"
|
|
32
|
+
}
|
|
33
|
+
}
|