skilld 3.0.0 → 3.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
@@ -41,31 +41,43 @@ Skill authoring lives in visible [skilld-maintained Skills](#author-a-skill) and
41
41
 
42
42
  ## Get Started
43
43
 
44
- Install the CLI:
44
+ Run a Skill once. You need no install and no project files:
45
45
 
46
46
  ```sh
47
- npm install --global skilld
48
- ```
49
-
50
- Find a Skill, then run it for this session:
51
-
52
- ```sh
53
- skilld search vue
54
- skilld run skilld:antfu/skills/vue
47
+ npx skilld search vue
48
+ npx skilld run skilld:antfu/skills/vue
55
49
  ```
56
50
 
57
51
  `skilld run` prints `SKILL.md` to stdout and writes no file.
58
52
  Ask your Agent to run the command and follow the printed instructions.
59
53
  If you run it yourself, pass the output to your Agent.
60
54
 
61
- Install the Skill when you want it in every session:
55
+ Install a Skill only when you want it in every session:
62
56
 
63
57
  ```sh
64
- skilld install skilld:antfu/skills/vue
58
+ npx skilld install skilld:antfu/skills/vue
65
59
  ```
66
60
 
67
61
  An install writes files. If an Agent runs the install, it asks you first.
68
62
 
63
+ ### Run or install?
64
+
65
+ | | `skilld run` | `skilld install` |
66
+ | --- | --- | --- |
67
+ | Use it for | The task in front of you | Every session in this project |
68
+ | Files written | None | `.skills`, the lockfile, and Agent targets |
69
+ | Cleanup | None | `skilld remove` |
70
+ | Updates | Loads the source each time | `skilld update` |
71
+ | Skill scripts | Never printed or executed | On disk for the Skill to use |
72
+
73
+ Start with `skilld run`. Install when you reach for the same Skill again.
74
+
75
+ If you use skilld often, install the CLI globally:
76
+
77
+ ```sh
78
+ npm install --global skilld
79
+ ```
80
+
69
81
  Teach your Agent the CLI with the skilld-maintained `skilld` Skill:
70
82
 
71
83
  ```sh
@@ -101,13 +113,34 @@ Use the revision and file-read command from the initial output.
101
113
  skilld never prints executable or binary files.
102
114
  A Skill that must run its own script needs an install.
103
115
 
116
+ ## Install without Node.js
117
+
118
+ macOS and Linux:
119
+
120
+ ```sh
121
+ curl -fsSL https://github.com/skilld-dev/skilld/releases/latest/download/install.sh | sh
122
+ ```
123
+
124
+ Windows PowerShell:
125
+
126
+ ```powershell
127
+ irm https://github.com/skilld-dev/skilld/releases/latest/download/install.ps1 | iex
128
+ ```
129
+
130
+ The script installs one native binary to `~/.skilld/bin`.
131
+ That install upgrades itself in the background after it verifies the signed release manifest.
132
+ Restart skilld to use the new version.
133
+ An npm install prints the upgrade command instead.
134
+ Set `SKILLD_NO_UPGRADE=1` to turn off upgrade checks.
135
+ See [SECURITY.md](./SECURITY.md#how-the-cli-upgrades-itself) for each check.
136
+
104
137
  ## Commands
105
138
 
106
139
  ```sh
107
140
  # Find a Skill
108
141
  skilld search <query>
109
142
 
110
- # Run a Skill for this session only
143
+ # Run a Skill for this session only (start here)
111
144
  skilld run <selector>
112
145
 
113
146
  # Read one supporting file that Skill carries
package/bin/skilld.mjs CHANGED
@@ -3,8 +3,9 @@ import { spawn } from 'node:child_process'
3
3
  import { createRequire } from 'node:module'
4
4
  import { constants } from 'node:os'
5
5
  import { dirname, join } from 'node:path'
6
+ import { fileURLToPath } from 'node:url'
6
7
 
7
- import { detectLibc, selectArtifact } from '../loader/resolve-artifact.mjs'
8
+ import { detectLauncher, detectLibc, selectArtifact } from '../loader/resolve-artifact.mjs'
8
9
 
9
10
  const require = createRequire(import.meta.url)
10
11
 
@@ -33,7 +34,13 @@ async function main() {
33
34
 
34
35
  const child = spawn(artifact.executable, process.argv.slice(2), {
35
36
  cwd: process.cwd(),
36
- env: process.env,
37
+ env: {
38
+ ...process.env,
39
+ SKILLD_LAUNCHER: detectLauncher({
40
+ scriptPath: fileURLToPath(import.meta.url),
41
+ userAgent: process.env.npm_config_user_agent,
42
+ }),
43
+ },
37
44
  shell: false,
38
45
  stdio: 'inherit',
39
46
  })
@@ -35,3 +35,21 @@ export async function selectArtifact(runtime, resolvePackage) {
35
35
  message: `UNSUPPORTED_HOST: no skilld CLI artifact is installed for ${runtime.platform} ${runtime.arch}`,
36
36
  }
37
37
  }
38
+
39
+ /**
40
+ * Names the package runner that launched the loader, so the CLI prints the
41
+ * matching upgrade command. `SKILLD_LAUNCHER` only changes that wording.
42
+ */
43
+ export function detectLauncher({ scriptPath, userAgent }) {
44
+ const path = scriptPath.replaceAll('\\', '/')
45
+ if (path.includes('/_npx/'))
46
+ return 'npx'
47
+ const agent = userAgent?.split('/')[0]
48
+ if (agent === 'pnpm' || path.includes('/pnpm/') || path.includes('/.pnpm/'))
49
+ return 'pnpm'
50
+ if (agent === 'bun' || path.includes('/.bun/'))
51
+ return 'bun'
52
+ if (agent === 'yarn' || path.includes('/yarn/'))
53
+ return 'yarn'
54
+ return 'npm'
55
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "skilld",
3
3
  "type": "module",
4
- "version": "3.0.0",
4
+ "version": "3.0.3",
5
5
  "description": "Search, run, install, and keep curated Agent Skills current",
6
6
  "author": {
7
7
  "name": "Harlan Wilton",
@@ -45,14 +45,14 @@
45
45
  "node": ">=22.0.0"
46
46
  },
47
47
  "optionalDependencies": {
48
- "skilld-cli-darwin-arm64": "3.0.0",
49
- "skilld-cli-darwin-x64": "3.0.0",
50
- "skilld-cli-linux-arm64-gnu": "3.0.0",
51
- "skilld-cli-linux-arm64-musl": "3.0.0",
52
- "skilld-cli-linux-x64-gnu": "3.0.0",
53
- "skilld-cli-linux-x64-musl": "3.0.0",
54
- "skilld-cli-win32-arm64-msvc": "3.0.0",
55
- "skilld-cli-win32-x64-msvc": "3.0.0"
48
+ "skilld-cli-darwin-arm64": "3.0.3",
49
+ "skilld-cli-darwin-x64": "3.0.3",
50
+ "skilld-cli-linux-arm64-gnu": "3.0.3",
51
+ "skilld-cli-linux-arm64-musl": "3.0.3",
52
+ "skilld-cli-linux-x64-gnu": "3.0.3",
53
+ "skilld-cli-linux-x64-musl": "3.0.3",
54
+ "skilld-cli-win32-arm64-msvc": "3.0.3",
55
+ "skilld-cli-win32-x64-msvc": "3.0.3"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@antfu/eslint-config": "^9.5.1",