remote-skills 0.0.2 → 0.0.3

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 CHANGED
@@ -5,14 +5,18 @@
5
5
  ## Quick start
6
6
 
7
7
  ```bash
8
+ # Install remote-skills
9
+ npx remote-skills install
10
+
8
11
  # Show current collection list
9
- npx remote-skills show collections
12
+ npx remote-skills config show collections
10
13
 
14
+ # (Optional)
11
15
  # Replace the entire collection list
12
- npx remote-skills set collection collection-1 collection-2
16
+ npx remote-skills config set collection collection-1 collection-2
13
17
 
14
18
  # Add one collection
15
- npx remote-skills add collection collection-3
19
+ npx remote-skills config add collection collection-3
16
20
  ```
17
21
 
18
22
  ## Skill Collections
@@ -55,20 +59,18 @@ npx remote-skills uninstall --gemini
55
59
  npx remote-skills uninstall --codex --claude
56
60
  ```
57
61
 
58
- ### Add
59
-
60
- `add` supports two forms:
61
-
62
- - Add a collection ID:
62
+ ### Add Collection
63
63
 
64
64
  ```bash
65
- npx remote-skills add collection <id>
65
+ npx remote-skills config add collection <id>
66
66
  ```
67
67
 
68
- - Copy `skills/remote-skills` into a specific directory:
68
+ ### Install to Specific Directory
69
+
70
+ Copy `skills/remote-skills` into a specific directory:
69
71
 
70
72
  ```bash
71
- npx remote-skills add <DIR>
73
+ npx remote-skills install <DIR>
72
74
  ```
73
75
 
74
76
  Result path:
@@ -80,15 +82,15 @@ Result path:
80
82
  ### Config Commands
81
83
 
82
84
  Manage `timeout`, `collection`, and `maxSkillCount`:
83
- (`add collection <id>` below is different from `add <DIR>` in the Add section.)
85
+ (`config add collection <id>` below is different from `install <DIR>` above.)
84
86
 
85
87
  ```bash
86
- npx remote-skills show [timeout|collections|maxSkillCount]
87
- npx remote-skills set timeout <ms>
88
- npx remote-skills set maxSkillCount <n>
89
- npx remote-skills set collection <id1> <id2> ...
90
- npx remote-skills add collection <id>
91
- npx remote-skills remove collection <id>
88
+ npx remote-skills config show [timeout|collections|maxSkillCount]
89
+ npx remote-skills config set timeout <ms>
90
+ npx remote-skills config set maxSkillCount <n>
91
+ npx remote-skills config set collection <id1> <id2> ...
92
+ npx remote-skills config add collection <id>
93
+ npx remote-skills config remove collection <id>
92
94
  ```
93
95
 
94
96
  ### Config Target Resolution
@@ -8,7 +8,7 @@ const BUNDLED_CLI_MODULE_PATH = path.resolve(
8
8
  __dirname,
9
9
  "../skills/remote-skills/cli/cli.js"
10
10
  );
11
- const CONFIG_SHORTCUT_COMMANDS = new Set(["show", "set", "add", "remove"]);
11
+ const CONFIG_COMMANDS = new Set(["show", "set", "add", "remove"]);
12
12
  const AGENT_DIR_CANDIDATES = {
13
13
  codex: [".codex", "codex"],
14
14
  claude: [".claude", "claude"],
@@ -26,27 +26,39 @@ const LOCAL_CLI_MODULE_CANDIDATES = [
26
26
 
27
27
  const usage = () => {
28
28
  console.log(`Usage:
29
- remote-skills add <DIR>
29
+ remote-skills install <DIR>
30
30
  remote-skills install [--codex] [--claude] [--gemini]
31
31
  remote-skills uninstall [--codex] [--claude] [--gemini]
32
32
  remote-skills <query>... [-s|--session <sessionId>] [--debug]
33
- remote-skills show [timeout|collections|maxSkillCount]
34
- remote-skills set timeout <ms>
35
- remote-skills set maxSkillCount <n>
36
- remote-skills set collection <id1> <id2> ...
37
- remote-skills add collection <id>
38
- remote-skills remove collection <id>
33
+ remote-skills config show [timeout|collections|maxSkillCount]
34
+ remote-skills config set timeout <ms>
35
+ remote-skills config set maxSkillCount <n>
36
+ remote-skills config set collection <id1> <id2> ...
37
+ remote-skills config add collection <id>
38
+ remote-skills config remove collection <id>
39
39
 
40
40
  Examples:
41
- remote-skills add /path/to/project
41
+ remote-skills install /path/to/project
42
42
  remote-skills install
43
43
  remote-skills install --gemini
44
44
  remote-skills install --codex --claude
45
45
  remote-skills uninstall --gemini
46
- remote-skills set collection rskill-1 rskill-2
46
+ remote-skills config set collection rskill-1 rskill-2
47
47
  remote-skills react architecture -s cache`);
48
48
  };
49
49
 
50
+ const ensureConfigPrefixForConfigCommands = (args) => {
51
+ const [command] = args;
52
+
53
+ if (!CONFIG_COMMANDS.has(command)) {
54
+ return;
55
+ }
56
+
57
+ throw new Error(
58
+ `Config command must start with 'config'. Use: remote-skills config ${args.join(" ")}`
59
+ );
60
+ };
61
+
50
62
  const hasDir = (dirPath) =>
51
63
  fs.existsSync(dirPath) && fs.statSync(dirPath).isDirectory();
52
64
  const hasFile = (filePath) =>
@@ -243,18 +255,19 @@ const main = async () => {
243
255
  }
244
256
 
245
257
  if (args[0] === "add") {
246
- if (args[1] === "collection") {
247
- await cliModule.main(["config", ...args]);
248
- return;
249
- }
250
- if (!args[1]) {
251
- throw new Error("Missing target directory. Usage: remote-skills add <DIR>");
252
- }
253
- copySkillDirectory(args[1]);
254
- return;
258
+ throw new Error(
259
+ "Use 'remote-skills install <DIR>' for directory installation, or 'remote-skills config add collection <id>' for config."
260
+ );
255
261
  }
256
262
 
257
263
  if (args[0] === "install") {
264
+ if (args[1] && !args[1].startsWith("--")) {
265
+ if (args.length > 2) {
266
+ throw new Error("Usage: remote-skills install <DIR>");
267
+ }
268
+ copySkillDirectory(args[1]);
269
+ return;
270
+ }
258
271
  installToAgents(parseTargetAgents(args.slice(1)));
259
272
  return;
260
273
  }
@@ -264,10 +277,7 @@ const main = async () => {
264
277
  return;
265
278
  }
266
279
 
267
- if (CONFIG_SHORTCUT_COMMANDS.has(args[0])) {
268
- await cliModule.main(["config", ...args]);
269
- return;
270
- }
280
+ ensureConfigPrefixForConfigCommands(args);
271
281
 
272
282
  await cliModule.main(args);
273
283
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remote-skills",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "Remote-skill: AI agent skills that are automatically discovered and downloaded when needed instead of being permanently included in the agent’s context.",
5
5
  "homepage": "https://rskills.cokplay.com",
6
6
  "main": "skills/remote-skills/cli/cli.js",
@@ -2,16 +2,10 @@
2
2
 
3
3
  `cli/cli.js` provides remote skill search/download and CLI config management.
4
4
 
5
- If you want to run the `remote-skills` binary directly via npx from npm package name:
6
-
7
- ```bash
8
- npx --package remote-skills remote-skills --help
9
- ```
10
-
11
5
  ## 1) Where to run
12
6
 
13
7
  ```bash
14
- npx remote-skills --help
8
+ node cli.js --help
15
9
  ```
16
10
 
17
11
  ---
@@ -19,7 +13,7 @@ npx remote-skills --help
19
13
  ## 2) Basic usage
20
14
 
21
15
  ```bash
22
- npx remote-skills "<query>" ... --session|-s "<sessionId>" [--debug]
16
+ node cli/cli.js "<query>" ... --session|-s "<sessionId>" [--debug]
23
17
  ```
24
18
 
25
19
  ### Options
@@ -41,9 +35,7 @@ npx remote-skills "<query>" ... --session|-s "<sessionId>" [--debug]
41
35
  ## 3) Config commands
42
36
 
43
37
  ```bash
44
- npx remote-skills config <command> [args]
45
- # or shorthand:
46
- npx remote-skills <show|set|add|remove> ...
38
+ node cli/cli.js config <command> [args]
47
39
  ```
48
40
 
49
41
  ### Supported commands
@@ -70,40 +62,27 @@ Main keys:
70
62
  ### Search
71
63
 
72
64
  ```bash
73
- npx remote-skills react -s rskill-20260307-demo
74
- npx remote-skills "react" "next" -s rskill-batch --debug
65
+ node cli/cli.js react -s rskill-20260307-demo
66
+ node cli/cli.js "react" "next" -s rskill-batch --debug
75
67
  ```
76
68
 
77
69
  ### Read config
78
70
 
79
71
  ```bash
80
- npx remote-skills config show
81
- npx remote-skills config show timeout
82
- npx remote-skills config show collections
83
- npx remote-skills config show maxSkillCount
84
-
85
- # shorthand
86
- npx remote-skills show
87
- npx remote-skills show timeout
88
- npx remote-skills show collections
89
- npx remote-skills show maxSkillCount
72
+ node cli/cli.js config show
73
+ node cli/cli.js config show timeout
74
+ node cli/cli.js config show collections
75
+ node cli/cli.js config show maxSkillCount
90
76
  ```
91
77
 
92
78
  ### Update config
93
79
 
94
80
  ```bash
95
- npx remote-skills config set timeout 15000
96
- npx remote-skills config set maxSkillCount 50
97
- npx remote-skills config set collection rskills-1 rskills-2
98
- npx remote-skills config add collection rskills-3
99
- npx remote-skills config remove collection rskills-1
100
-
101
- # shorthand
102
- npx remote-skills set timeout 15000
103
- npx remote-skills set maxSkillCount 50
104
- npx remote-skills set collection rskills-1 rskills-2
105
- npx remote-skills add collection rskills-3
106
- npx remote-skills remove collection rskills-1
81
+ node cli/cli.js config set timeout 15000
82
+ node cli/cli.js config set maxSkillCount 50
83
+ node cli/cli.js config set collection rskills-1 rskills-2
84
+ node cli/cli.js config add collection rskills-3
85
+ node cli/cli.js config remove collection rskills-1
107
86
  ```
108
87
 
109
88
  ### How collection commands behave
@@ -102,13 +102,8 @@ const parseCollectionValues = (values) =>
102
102
  values.map((value) => toText(value)).filter(Boolean);
103
103
 
104
104
  const unique = (values) => [...new Set(values)];
105
- const normalizeShowTarget = (target) =>
106
- target === "collection" ? "collections" : target;
107
-
108
105
  const readShowValue = (target, config) => {
109
- const normalizedTarget = normalizeShowTarget(target);
110
-
111
- if (!normalizedTarget || normalizedTarget === "all") {
106
+ if (!target || target === "all") {
112
107
  return {
113
108
  timeout: config.timeout,
114
109
  collection: config.collection,
@@ -116,15 +111,15 @@ const readShowValue = (target, config) => {
116
111
  };
117
112
  }
118
113
 
119
- if (normalizedTarget === "timeout") {
114
+ if (target === "timeout") {
120
115
  return config.timeout;
121
116
  }
122
117
 
123
- if (normalizedTarget === "collections") {
118
+ if (target === "collections") {
124
119
  return config.collection;
125
120
  }
126
121
 
127
- if (normalizedTarget === "maxskillcount") {
122
+ if (target === "maxskillcount") {
128
123
  return config.maxSkillCount;
129
124
  }
130
125
 
@@ -137,12 +132,11 @@ const runConfigCommand = async (args = []) => {
137
132
  const target = toText(rawTarget).toLowerCase();
138
133
 
139
134
  if (command === "show") {
140
- const normalizedTarget = normalizeShowTarget(target);
141
135
  const config = loadConfig();
142
136
  return {
143
137
  status: "Success",
144
138
  command,
145
- target: normalizedTarget || "all",
139
+ target: target || "all",
146
140
  value: readShowValue(target, config),
147
141
  };
148
142
  }