jd-skills 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 +559 -0
- package/ThirdPartyNoticeText.txt +117 -0
- package/bin/cli.mjs +14 -0
- package/dist/_chunks/config.mjs +2 -0
- package/dist/_chunks/config2.mjs +42 -0
- package/dist/_chunks/jd-cookie.mjs +3 -0
- package/dist/_chunks/jd-cookie2.mjs +109 -0
- package/dist/_chunks/libs/@clack/core.mjs +767 -0
- package/dist/_chunks/libs/@clack/prompts.mjs +334 -0
- package/dist/_chunks/libs/@kwsites/file-exists.mjs +562 -0
- package/dist/_chunks/libs/@kwsites/promise-deferred.mjs +37 -0
- package/dist/_chunks/libs/@vercel/detect-agent.mjs +138 -0
- package/dist/_chunks/libs/simple-git.mjs +3584 -0
- package/dist/_chunks/libs/xdg-basedir.mjs +14 -0
- package/dist/_chunks/rolldown-runtime.mjs +24 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.mjs +6646 -0
- package/package.json +139 -0
package/README.md
ADDED
|
@@ -0,0 +1,559 @@
|
|
|
1
|
+
# jd-skills
|
|
2
|
+
|
|
3
|
+
> **Forked from [vercel-labs/skills](https://github.com/vercel-labs/skills) (MIT)。** 本项目是该上游 CLI 的京东内部
|
|
4
|
+
> 品牌化版本,所有功能 1:1 继承自上游。详见 `package.json` 中的 `forkedFrom` 和 `upstreamLicense` 字段。
|
|
5
|
+
|
|
6
|
+
AI 编程 agent 技能生态的命令行工具。
|
|
7
|
+
|
|
8
|
+
<!-- agent-list:start -->
|
|
9
|
+
支持 **OpenCode**、**Claude Code**、**Codex**、**Cursor** 等 [67 种](#支持的-agent) agent。
|
|
10
|
+
<!-- agent-list:end -->
|
|
11
|
+
|
|
12
|
+
## 安装一个 Skill
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npx jd-skills add <owner>/<skills-repo>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## 不安装直接使用
|
|
19
|
+
|
|
20
|
+
为某个 skill 生成 prompt,或启动一个支持的 agent:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npx jd-skills use <owner>/<skills-repo>@<skill> | claude
|
|
24
|
+
npx jd-skills use <owner>/<skills-repo> --skill <skill> --agent claude-code
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
`jd-skills use` 与 `jd-skills add` 解析 source 的方式完全相同:把选中的 skill 文件写到临时目录,**默认**只把生成的 prompt 打印到 stdout;如果带上 `--agent`,则用这个 prompt 启动一个 agent。
|
|
28
|
+
|
|
29
|
+
### 支持的 source 格式
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# GitHub 简写(owner/repo)
|
|
33
|
+
npx jd-skills add <owner>/<skills-repo>
|
|
34
|
+
|
|
35
|
+
# 完整 GitHub URL
|
|
36
|
+
npx jd-skills add https://github.com/<owner>/<skills-repo>
|
|
37
|
+
|
|
38
|
+
# 仓库内具体 skill 的路径
|
|
39
|
+
npx jd-skills add https://github.com/<owner>/<skills-repo>/tree/main/skills/<skill>
|
|
40
|
+
|
|
41
|
+
# 公共 GitLab URL
|
|
42
|
+
npx jd-skills add https://gitlab.com/org/repo
|
|
43
|
+
|
|
44
|
+
# 京东内网 GitLab(推荐用 jd: 简写)
|
|
45
|
+
npx jd-skills add jd:<group>/<repo>
|
|
46
|
+
npx jd-skills add https://<host>/<group>/<repo>
|
|
47
|
+
|
|
48
|
+
# 任意 git URL
|
|
49
|
+
npx jd-skills add git@github.com:<owner>/<skills-repo>.git
|
|
50
|
+
|
|
51
|
+
# 本地路径
|
|
52
|
+
npx jd-skills add ./my-local-skills
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### 命令行选项
|
|
56
|
+
|
|
57
|
+
| 选项 | 说明 |
|
|
58
|
+
| --- | --- |
|
|
59
|
+
| `-g, --global` | 安装到用户目录而非项目目录 |
|
|
60
|
+
| `-a, --agent <agents...>` | <!-- agent-names:start -->指定目标 agent(如 `claude-code`、`codex`),详见[支持的 Agent](#支持的-agent)<!-- agent-names:end --> |
|
|
61
|
+
| `-s, --skill <skills...>` | 按名字指定 skill(`'*'` 表示全部) |
|
|
62
|
+
| `-l, --list` | 只列出仓库中的 skill,不实际安装 |
|
|
63
|
+
| `--copy` | 复制文件而非符号链接 |
|
|
64
|
+
| `-y, --yes` | 跳过所有确认提示 |
|
|
65
|
+
| `--all` | 等价于 `--skill '*' --agent '*' -y` |
|
|
66
|
+
|
|
67
|
+
### 使用示例
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
# 列出仓库里所有 skill
|
|
71
|
+
npx jd-skills add <owner>/<skills-repo> --list
|
|
72
|
+
|
|
73
|
+
# 只安装指定的几个 skill
|
|
74
|
+
npx jd-skills add <owner>/<skills-repo> --skill frontend-design --skill skill-creator
|
|
75
|
+
|
|
76
|
+
# 安装名字带空格的 skill(必须加引号)
|
|
77
|
+
npx jd-skills add owner/repo --skill "Convex Best Practices"
|
|
78
|
+
|
|
79
|
+
# 安装到指定的 agent
|
|
80
|
+
npx jd-skills add <owner>/<skills-repo> -a claude-code -a opencode
|
|
81
|
+
|
|
82
|
+
# 非交互式安装(适合 CI/CD)
|
|
83
|
+
npx jd-skills add <owner>/<skills-repo> --skill frontend-design -g -a claude-code -y
|
|
84
|
+
|
|
85
|
+
# 把仓库里所有 skill 装到所有 agent
|
|
86
|
+
npx jd-skills add <owner>/<skills-repo> --all
|
|
87
|
+
|
|
88
|
+
# 把所有 skill 装到指定 agent
|
|
89
|
+
npx jd-skills add <owner>/<skills-repo> --skill '*' -a claude-code
|
|
90
|
+
|
|
91
|
+
# 把指定 skill 装到所有 agent
|
|
92
|
+
npx jd-skills add <owner>/<skills-repo> --agent '*' --skill frontend-design
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### 安装范围
|
|
96
|
+
|
|
97
|
+
| 范围 | 选项 | 路径 | 适用场景 |
|
|
98
|
+
| --- | --- | --- | --- |
|
|
99
|
+
| **项目级** | (默认) | `./<agent>/skills/` | 跟着项目走,团队共享 |
|
|
100
|
+
| **全局** | `-g` | `~/<agent>/skills/` | 跨项目可用 |
|
|
101
|
+
|
|
102
|
+
### 安装方式
|
|
103
|
+
|
|
104
|
+
交互式安装时可以选择:
|
|
105
|
+
|
|
106
|
+
| 方式 | 说明 |
|
|
107
|
+
| --- | --- |
|
|
108
|
+
| **符号链接**(推荐) | 从各 agent 目录符号链接到同一份拷贝,源单一、便于更新 |
|
|
109
|
+
| **复制** | 给每个 agent 复制独立副本,当 agent 不支持符号链接时使用 |
|
|
110
|
+
|
|
111
|
+
## 其他命令
|
|
112
|
+
|
|
113
|
+
| 命令 | 说明 |
|
|
114
|
+
| --- | --- |
|
|
115
|
+
| `npx jd-skills use <source>` | 不安装直接使用一个 skill |
|
|
116
|
+
| `npx jd-skills list` | 列出已装的 skill(别名:`ls`) |
|
|
117
|
+
| `npx jd-skills find [query]` | 交互式或按关键字搜索 skill |
|
|
118
|
+
| `npx jd-skills remove [skills]` | 从 agent 中移除已装的 skill |
|
|
119
|
+
| `npx jd-skills update [skills]` | 把已装的 skill 更新到最新版 |
|
|
120
|
+
| `npx jd-skills init [name]` | 创建一个新的 `SKILL.md` 模板 |
|
|
121
|
+
|
|
122
|
+
### `jd-skills list`
|
|
123
|
+
|
|
124
|
+
列出所有已装的 skill,类似 `npm ls`。
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
# 列出所有已装的 skill(项目级 + 全局)
|
|
128
|
+
npx jd-skills list
|
|
129
|
+
|
|
130
|
+
# 只列出全局 skill
|
|
131
|
+
npx jd-skills ls -g
|
|
132
|
+
|
|
133
|
+
# 按 agent 过滤
|
|
134
|
+
npx jd-skills ls -a claude-code -a cursor
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### `jd-skills find`
|
|
138
|
+
|
|
139
|
+
交互式或按关键字搜索 skill。
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
# 交互式搜索(fzf 风格)
|
|
143
|
+
npx jd-skills find
|
|
144
|
+
|
|
145
|
+
# 按关键字搜索
|
|
146
|
+
npx jd-skills find typescript
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
`find` 命令会同时搜两个源:
|
|
150
|
+
- **上游社区仓库**([skills.sh](https://skills.sh))—— 始终可用
|
|
151
|
+
- **企业内部技能市场**(通过 `JD_SKILL_API_URL` env var 配置)—— 仅在配置后且可达时启用
|
|
152
|
+
|
|
153
|
+
京东源不可达时会**静默跳过**,不影响上游结果。详情参见下方"京东源"章节。
|
|
154
|
+
|
|
155
|
+
### `jd-skills update`
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
# 更新所有 skill(交互式选择范围)
|
|
159
|
+
npx jd-skills update
|
|
160
|
+
|
|
161
|
+
# 更新单个 skill
|
|
162
|
+
npx jd-skills update my-skill
|
|
163
|
+
|
|
164
|
+
# 更新多个指定 skill
|
|
165
|
+
npx jd-skills update frontend-design web-design-guidelines
|
|
166
|
+
|
|
167
|
+
# 只更新全局或项目级
|
|
168
|
+
npx jd-skills update -g
|
|
169
|
+
npx jd-skills update -p
|
|
170
|
+
|
|
171
|
+
# 非交互式(在项目目录里默认项目级,否则全局)
|
|
172
|
+
npx jd-skills update -y
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
| 选项 | 说明 |
|
|
176
|
+
| --- | --- |
|
|
177
|
+
| `-g, --global` | 只更新全局 skill |
|
|
178
|
+
| `-p, --project` | 只更新项目级 skill |
|
|
179
|
+
| `-y, --yes` | 跳过范围选择(项目目录里默认项目级,否则全局) |
|
|
180
|
+
| `[skills...]` | 指定要更新的 skill 名字,默认更新全部 |
|
|
181
|
+
|
|
182
|
+
### `jd-skills init`
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
# 在当前目录创建 SKILL.md
|
|
186
|
+
npx jd-skills init
|
|
187
|
+
|
|
188
|
+
# 在子目录创建新的 skill
|
|
189
|
+
npx jd-skills init my-skill
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### `jd-skills remove`
|
|
193
|
+
|
|
194
|
+
从 agent 中移除已装的 skill。
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
# 交互式选择(从已装 skill 里挑)
|
|
198
|
+
npx jd-skills remove
|
|
199
|
+
|
|
200
|
+
# 按名字删
|
|
201
|
+
npx jd-skills remove web-design-guidelines
|
|
202
|
+
|
|
203
|
+
# 一次删多个
|
|
204
|
+
npx jd-skills remove frontend-design web-design-guidelines
|
|
205
|
+
|
|
206
|
+
# 从全局范围删
|
|
207
|
+
npx jd-skills remove --global web-design-guidelines
|
|
208
|
+
|
|
209
|
+
# 只从指定 agent 删
|
|
210
|
+
npx jd-skills remove --agent claude-code cursor my-skill
|
|
211
|
+
|
|
212
|
+
# 不确认地全部删除
|
|
213
|
+
npx jd-skills remove --all
|
|
214
|
+
|
|
215
|
+
# 删除某个 agent 下的所有 skill
|
|
216
|
+
npx jd-skills remove --skill '*' -a cursor
|
|
217
|
+
|
|
218
|
+
# 把某个 skill 从所有 agent 中删除
|
|
219
|
+
npx jd-skills remove my-skill --agent '*'
|
|
220
|
+
|
|
221
|
+
# 用 'rm' 别名
|
|
222
|
+
npx jd-skills rm my-skill
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
| 选项 | 说明 |
|
|
226
|
+
| --- | --- |
|
|
227
|
+
| `-g, --global` | 从全局范围(`~/`)删,而非项目级 |
|
|
228
|
+
| `-a, --agent` | 指定要删除的 agent(`'*'` 表示全部) |
|
|
229
|
+
| `-s, --skill` | 指定要删的 skill(`'*'` 表示全部) |
|
|
230
|
+
| `-y, --yes` | 跳过确认提示 |
|
|
231
|
+
| `--all` | 等价于 `--skill '*' --agent '*' -y` |
|
|
232
|
+
|
|
233
|
+
## Intranet marketplace integration (opt-in)
|
|
234
|
+
|
|
235
|
+
`jd-skills` ships clean — no hardcoded references to any specific company's
|
|
236
|
+
internal infrastructure. On a public network or when no intranet is configured,
|
|
237
|
+
the CLI works against the upstream [skills.sh](https://skills.sh) registry only.
|
|
238
|
+
|
|
239
|
+
**For users on a corporate intranet** (e.g. JD-internal users), the CLI can be
|
|
240
|
+
configured to discover and authenticate with an internal marketplace + GitLab
|
|
241
|
+
instance via environment variables. The integration is **auto-detected**: when
|
|
242
|
+
the configured API endpoint is reachable, the find command will offer a one-time
|
|
243
|
+
login prompt; when it's not reachable, the CLI silently degrades to upstream-only.
|
|
244
|
+
|
|
245
|
+
See [`docs/jd-internal.md`](./docs/jd-internal.md) for the full integration guide
|
|
246
|
+
(env vars, npm setup, login flow, troubleshooting). The public npm tarball does
|
|
247
|
+
NOT include this file — it lives only in the source repository.
|
|
248
|
+
|
|
249
|
+
## 什么是 Agent Skill?
|
|
250
|
+
|
|
251
|
+
Agent skill 是一组可复用的指令集,用来扩展你的 AI 编程 agent 的能力。skill 定义在 `SKILL.md` 文件中,
|
|
252
|
+
frontmatter 里包含 `name` 和 `description` 两个必填字段。
|
|
253
|
+
|
|
254
|
+
Skill 让 agent 能完成专门的任務,比如:
|
|
255
|
+
|
|
256
|
+
- 根据 git 历史生成 release notes
|
|
257
|
+
- 按团队规范创建 PR
|
|
258
|
+
- 接入外部工具(Linear、Notion 等)
|
|
259
|
+
|
|
260
|
+
## 支持的 Agent
|
|
261
|
+
|
|
262
|
+
Skill 可以装到下列任何一种 agent:
|
|
263
|
+
|
|
264
|
+
<!-- supported-agents:start -->
|
|
265
|
+
| Agent | `--agent` | Project Path | Global Path |
|
|
266
|
+
|-------|-----------|--------------|-------------|
|
|
267
|
+
| AiderDesk | `aider-desk` | `.aider-desk/skills/` | `~/.aider-desk/skills/` |
|
|
268
|
+
| Amp, Replit, Universal | `amp`, `replit`, `universal` | `.agents/skills/` | `~/.config/agents/skills/` |
|
|
269
|
+
| Antigravity | `antigravity` | `.agents/skills/` | `~/.gemini/antigravity/skills/` |
|
|
270
|
+
| Antigravity CLI | `antigravity-cli` | `.agents/skills/` | `~/.gemini/antigravity-cli/skills/` |
|
|
271
|
+
| AstrBot | `astrbot` | `data/skills/` | `~/.astrbot/data/skills/` |
|
|
272
|
+
| Autohand Code CLI | `autohand-code` | `.autohand/skills/` | `~/.autohand/skills/` |
|
|
273
|
+
| Augment | `augment` | `.augment/skills/` | `~/.augment/skills/` |
|
|
274
|
+
| IBM Bob | `bob` | `.bob/skills/` | `~/.bob/skills/` |
|
|
275
|
+
| Claude Code | `claude-code` | `.claude/skills/` | `~/.claude/skills/` |
|
|
276
|
+
| OpenClaw | `openclaw` | `skills/` | `~/.openclaw/skills/` |
|
|
277
|
+
| Cline, Dexto, Kimi Code CLI, Loaf, Warp, Zed | `cline`, `dexto`, `kimi-code-cli`, `loaf`, `warp`, `zed` | `.agents/skills/` | `~/.agents/skills/` |
|
|
278
|
+
| CodeArts Agent | `codearts-agent` | `.codeartsdoer/skills/` | `~/.codeartsdoer/skills/` |
|
|
279
|
+
| CodeBuddy | `codebuddy` | `.codebuddy/skills/` | `~/.codebuddy/skills/` |
|
|
280
|
+
| Codemaker | `codemaker` | `.codemaker/skills/` | `~/.codemaker/skills/` |
|
|
281
|
+
| Code Studio | `codestudio` | `.codestudio/skills/` | `~/.codestudio/skills/` |
|
|
282
|
+
| Codex | `codex` | `.agents/skills/` | `~/.codex/skills/` |
|
|
283
|
+
| Command Code | `command-code` | `.commandcode/skills/` | `~/.commandcode/skills/` |
|
|
284
|
+
| Continue | `continue` | `.continue/skills/` | `~/.continue/skills/` |
|
|
285
|
+
| Cortex Code | `cortex` | `.cortex/skills/` | `~/.snowflake/cortex/skills/` |
|
|
286
|
+
| Crush | `crush` | `.crush/skills/` | `~/.config/crush/skills/` |
|
|
287
|
+
| Cursor | `cursor` | `.agents/skills/` | `~/.cursor/skills/` |
|
|
288
|
+
| Deep Agents | `deepagents` | `.agents/skills/` | `~/.deepagents/agent/skills/` |
|
|
289
|
+
| Devin for Terminal | `devin` | `.devin/skills/` | `~/.config/devin/skills/` |
|
|
290
|
+
| Droid | `droid` | `.factory/skills/` | `~/.factory/skills/` |
|
|
291
|
+
| Firebender | `firebender` | `.agents/skills/` | `~/.firebender/skills/` |
|
|
292
|
+
| ForgeCode | `forgecode` | `.forge/skills/` | `~/.forge/skills/` |
|
|
293
|
+
| Gemini CLI | `gemini-cli` | `.agents/skills/` | `~/.gemini/skills/` |
|
|
294
|
+
| GitHub Copilot | `github-copilot` | `.agents/skills/` | `~/.copilot/skills/` |
|
|
295
|
+
| Goose | `goose` | `.goose/skills/` | `~/.config/goose/skills/` |
|
|
296
|
+
| Hermes Agent | `hermes-agent` | `.hermes/skills/` | `~/.hermes/skills/` |
|
|
297
|
+
| inference.sh | `inference-sh` | `.inferencesh/skills/` | `~/.inferencesh/skills/` |
|
|
298
|
+
| Jazz | `jazz` | `.jazz/skills/` | `~/.jazz/skills/` |
|
|
299
|
+
| Junie | `junie` | `.junie/skills/` | `~/.junie/skills/` |
|
|
300
|
+
| iFlow CLI | `iflow-cli` | `.iflow/skills/` | `~/.iflow/skills/` |
|
|
301
|
+
| Kilo Code | `kilo` | `.kilocode/skills/` | `~/.kilocode/skills/` |
|
|
302
|
+
| Kiro CLI | `kiro-cli` | `.kiro/skills/` | `~/.kiro/skills/` |
|
|
303
|
+
| Kode | `kode` | `.kode/skills/` | `~/.kode/skills/` |
|
|
304
|
+
| Lingma | `lingma` | `.lingma/skills/` | `~/.lingma/skills/` |
|
|
305
|
+
| MCPJam | `mcpjam` | `.mcpjam/skills/` | `~/.mcpjam/skills/` |
|
|
306
|
+
| Mistral Vibe | `mistral-vibe` | `.vibe/skills/` | `~/.vibe/skills/` |
|
|
307
|
+
| Moxby | `moxby` | `.moxby/skills/` | `~/.moxby/skills/` |
|
|
308
|
+
| Mux | `mux` | `.mux/skills/` | `~/.mux/skills/` |
|
|
309
|
+
| OpenCode | `opencode` | `.agents/skills/` | `~/.config/opencode/skills/` |
|
|
310
|
+
| OpenHands | `openhands` | `.openhands/skills/` | `~/.openhands/skills/` |
|
|
311
|
+
| Ona | `ona` | `.ona/skills/` | `~/.ona/skills/` |
|
|
312
|
+
| Pi | `pi` | `.pi/skills/` | `~/.pi/agent/skills/` |
|
|
313
|
+
| Qoder | `qoder` | `.qoder/skills/` | `~/.qoder/skills/` |
|
|
314
|
+
| Qoder CN | `qoder-cn` | `.qoder/skills/` | `~/.qoder-cn/skills/` |
|
|
315
|
+
| Qwen Code | `qwen-code` | `.qwen/skills/` | `~/.qwen/skills/` |
|
|
316
|
+
| Reasonix | `reasonix` | `.reasonix/skills/` | `~/.reasonix/skills/` |
|
|
317
|
+
| Rovo Dev | `rovodev` | `.rovodev/skills/` | `~/.rovodev/skills/` |
|
|
318
|
+
| Roo Code | `roo` | `.roo/skills/` | `~/.roo/skills/` |
|
|
319
|
+
| Tabnine CLI | `tabnine-cli` | `.tabnine/agent/skills/` | `~/.tabnine/agent/skills/` |
|
|
320
|
+
| Terramind | `terramind` | `.terramind/skills/` | `~/.terramind/skills/` |
|
|
321
|
+
| Tinycloud | `tinycloud` | `.tinycloud/skills/` | `~/.tinycloud/skills/` |
|
|
322
|
+
| Trae | `trae` | `.trae/skills/` | `~/.trae/skills/` |
|
|
323
|
+
| Trae CN | `trae-cn` | `.trae/skills/` | `~/.trae-cn/skills/` |
|
|
324
|
+
| Windsurf | `windsurf` | `.windsurf/skills/` | `~/.codeium/windsurf/skills/` |
|
|
325
|
+
| Zencoder, Zenflow | `zencoder`, `zenflow` | `.zencoder/skills/` | `~/.zencoder/skills/` |
|
|
326
|
+
| Neovate | `neovate` | `.neovate/skills/` | `~/.neovate/skills/` |
|
|
327
|
+
| Pochi | `pochi` | `.pochi/skills/` | `~/.pochi/skills/` |
|
|
328
|
+
| PromptScript | `promptscript` | `.agents/skills/` | N/A (project-only) |
|
|
329
|
+
| AdaL | `adal` | `.adal/skills/` | `~/.adal/skills/` |
|
|
330
|
+
<!-- supported-agents:end -->
|
|
331
|
+
|
|
332
|
+
> [!NOTE]
|
|
333
|
+
> **Kiro CLI 用户**:默认 agent 自动从 `.kiro/skills/` 和 `~/.kiro/skills/` 加载 skill,
|
|
334
|
+
> **无需配置**。如果你用的是**自定义 agent**,在 `.kiro/agents/<agent>.json` 的
|
|
335
|
+
> `resources` 里加上 skill 路径:
|
|
336
|
+
>
|
|
337
|
+
> ```json
|
|
338
|
+
> {
|
|
339
|
+
> "resources": ["skill://.kiro/skills/**/SKILL.md"]
|
|
340
|
+
> }
|
|
341
|
+
> ```
|
|
342
|
+
|
|
343
|
+
CLI 会自动检测本机装了哪些 agent。如果一个都没检测到,会提示你选要装到哪些。
|
|
344
|
+
|
|
345
|
+
## 创建 Skill
|
|
346
|
+
|
|
347
|
+
Skill 是包含 `SKILL.md` 文件的目录,frontmatter 是 YAML 格式:
|
|
348
|
+
|
|
349
|
+
```markdown
|
|
350
|
+
---
|
|
351
|
+
name: my-skill
|
|
352
|
+
description: 这个 skill 是干什么的、什么时候用
|
|
353
|
+
---
|
|
354
|
+
|
|
355
|
+
# My Skill
|
|
356
|
+
|
|
357
|
+
Agent 在激活这个 skill 后要遵循的指令。
|
|
358
|
+
|
|
359
|
+
## 何时使用
|
|
360
|
+
|
|
361
|
+
描述这个 skill 的适用场景。
|
|
362
|
+
|
|
363
|
+
## 步骤
|
|
364
|
+
|
|
365
|
+
1. 第一步做什么
|
|
366
|
+
2. 然后做什么
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
### 必填字段
|
|
370
|
+
|
|
371
|
+
- `name`:唯一标识(小写、允许连字符)
|
|
372
|
+
- `description`:简短说明这个 skill 是干什么的
|
|
373
|
+
|
|
374
|
+
### 可选字段
|
|
375
|
+
|
|
376
|
+
- `metadata.internal`:设为 `true` 可以在常规发现中隐藏该 skill。内部 skill 仅在设置
|
|
377
|
+
`INSTALL_INTERNAL_SKILLS=1` 时才可见和可装。用于还在开发中的 skill 或仅供内部工具用的 skill。
|
|
378
|
+
|
|
379
|
+
```markdown
|
|
380
|
+
---
|
|
381
|
+
name: my-internal-skill
|
|
382
|
+
description: 默认不显示的内部 skill
|
|
383
|
+
metadata:
|
|
384
|
+
internal: true
|
|
385
|
+
---
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
### Skill 发现路径
|
|
389
|
+
|
|
390
|
+
CLI 在仓库里会按下列位置搜索 skill。每个 skill 容器目录会被遍历一层
|
|
391
|
+
(扁平布局 `skills/<name>/SKILL.md`)或两层(分类布局 `skills/<category>/<name>/SKILL.md`)。
|
|
392
|
+
浅层发现的 `SKILL.md` 会覆盖深层同名 skill。用 `--full-depth` 还能发现这些容器目录
|
|
393
|
+
之外的 `SKILL.md`(比如 `examples/` 或 `tests/` 下的)。
|
|
394
|
+
|
|
395
|
+
<!-- skill-discovery:start -->
|
|
396
|
+
- 根目录(如果包含 `SKILL.md`)
|
|
397
|
+
- `skills/`
|
|
398
|
+
- `skills/.curated/`
|
|
399
|
+
- `skills/.experimental/`
|
|
400
|
+
- `skills/.system/`
|
|
401
|
+
- `.aider-desk/skills/`
|
|
402
|
+
- `.agents/skills/`
|
|
403
|
+
- `data/skills/`
|
|
404
|
+
- `.autohand/skills/`
|
|
405
|
+
- `.augment/skills/`
|
|
406
|
+
- `.bob/skills/`
|
|
407
|
+
- `.claude/skills/`
|
|
408
|
+
- `.codeartsdoer/skills/`
|
|
409
|
+
- `.codebuddy/skills/`
|
|
410
|
+
- `.codemaker/skills/`
|
|
411
|
+
- `.codestudio/skills/`
|
|
412
|
+
- `.commandcode/skills/`
|
|
413
|
+
- `.continue/skills/`
|
|
414
|
+
- `.cortex/skills/`
|
|
415
|
+
- `.crush/skills/`
|
|
416
|
+
- `.devin/skills/`
|
|
417
|
+
- `.factory/skills/`
|
|
418
|
+
- `.forge/skills/`
|
|
419
|
+
- `.goose/skills/`
|
|
420
|
+
- `.hermes/skills/`
|
|
421
|
+
- `.inferencesh/skills/`
|
|
422
|
+
- `.jazz/skills/`
|
|
423
|
+
- `.junie/skills/`
|
|
424
|
+
- `.iflow/skills/`
|
|
425
|
+
- `.kilocode/skills/`
|
|
426
|
+
- `.kiro/skills/`
|
|
427
|
+
- `.kode/skills/`
|
|
428
|
+
- `.lingma/skills/`
|
|
429
|
+
- `.mcpjam/skills/`
|
|
430
|
+
- `.vibe/skills/`
|
|
431
|
+
- `.moxby/skills/`
|
|
432
|
+
- `.mux/skills/`
|
|
433
|
+
- `.openhands/skills/`
|
|
434
|
+
- `.ona/skills/`
|
|
435
|
+
- `.pi/skills/`
|
|
436
|
+
- `.qoder/skills/`
|
|
437
|
+
- `.qwen/skills/`
|
|
438
|
+
- `.reasonix/skills/`
|
|
439
|
+
- `.rovodev/skills/`
|
|
440
|
+
- `.roo/skills/`
|
|
441
|
+
- `.tabnine/agent/skills/`
|
|
442
|
+
- `.terramind/skills/`
|
|
443
|
+
- `.tinycloud/skills/`
|
|
444
|
+
- `.trae/skills/`
|
|
445
|
+
- `.windsurf/skills/`
|
|
446
|
+
- `.zencoder/skills/`
|
|
447
|
+
- `.neovate/skills/`
|
|
448
|
+
- `.pochi/skills/`
|
|
449
|
+
- `.adal/skills/`
|
|
450
|
+
<!-- skill-discovery:end -->
|
|
451
|
+
|
|
452
|
+
### 插件清单发现
|
|
453
|
+
|
|
454
|
+
如果存在 `.claude-plugin/marketplace.json` 或 `.claude-plugin/plugin.json`,里面声明的
|
|
455
|
+
skill 也会被发现:
|
|
456
|
+
|
|
457
|
+
```json
|
|
458
|
+
// .claude-plugin/marketplace.json
|
|
459
|
+
{
|
|
460
|
+
"metadata": { "pluginRoot": "./plugins" },
|
|
461
|
+
"plugins": [
|
|
462
|
+
{
|
|
463
|
+
"name": "my-plugin",
|
|
464
|
+
"source": "my-plugin",
|
|
465
|
+
"skills": ["./skills/review", "./skills/test"]
|
|
466
|
+
}
|
|
467
|
+
]
|
|
468
|
+
}
|
|
469
|
+
```
|
|
470
|
+
|
|
471
|
+
这与 [Claude Code 插件市场](https://code.claude.com/docs/en/plugin-marketplaces) 生态兼容。
|
|
472
|
+
清单里声明的 skill 路径按声明的深度搜索,不受上面说的"depth-2 分类遍历"限制。
|
|
473
|
+
|
|
474
|
+
如果在标准位置都找不到 skill,会做一次递归搜索。
|
|
475
|
+
|
|
476
|
+
## 兼容性
|
|
477
|
+
|
|
478
|
+
由于所有 skill 都遵循统一的 [Agent Skills 规范](https://agentskills.io),通常跨 agent 兼容。
|
|
479
|
+
不过部分特性是 agent 特有的:
|
|
480
|
+
|
|
481
|
+
| 特性 | OpenCode | OpenHands | Claude Code | Cline | CodeBuddy | Codex | Command Code | Kiro CLI | Cursor | Antigravity | Roo Code | Github Copilot | Amp | OpenClaw | Neovate | Pi | Qoder | Zencoder |
|
|
482
|
+
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
|
|
483
|
+
| 基础 skill | 支持 | 支持 | 支持 | 支持 | 支持 | 支持 | 支持 | 支持 | 支持 | 支持 | 支持 | 支持 | 支持 | 支持 | 支持 | 支持 | 支持 | 支持 |
|
|
484
|
+
| `allowed-tools` | 支持 | 支持 | 支持 | 支持 | 支持 | 支持 | 不支持 | 支持 | 支持 | 支持 | 支持 | 支持 | 支持 | 支持 | 支持 | 支持 | 不支持 | |
|
|
485
|
+
| `context: fork` | 不支持 | 不支持 | 支持 | 不支持 | 不支持 | 不支持 | 不支持 | 不支持 | 不支持 | 不支持 | 不支持 | 不支持 | 不支持 | 不支持 | 不支持 | 不支持 | 不支持 | |
|
|
486
|
+
| Hooks | 不支持 | 不支持 | 支持 | 支持 | 不支持 | 不支持 | 支持 | 不支持 | 不支持 | 不支持 | 不支持 | 不支持 | 不支持 | 不支持 | 不支持 | 不支持 | 不支持 | |
|
|
487
|
+
|
|
488
|
+
## 故障排查
|
|
489
|
+
|
|
490
|
+
### "No skills found"
|
|
491
|
+
|
|
492
|
+
确保仓库里有合法的 `SKILL.md` 文件,且 frontmatter 里同时包含 `name` 和 `description`。
|
|
493
|
+
|
|
494
|
+
### Skill 在 agent 里没加载
|
|
495
|
+
|
|
496
|
+
- 确认 skill 装到了正确的路径
|
|
497
|
+
- 查 agent 文档里关于 skill 加载的要求
|
|
498
|
+
- 确认 `SKILL.md` 的 frontmatter 是合法 YAML
|
|
499
|
+
|
|
500
|
+
### 权限错误
|
|
501
|
+
|
|
502
|
+
确保对目标目录有写权限。
|
|
503
|
+
|
|
504
|
+
## 环境变量
|
|
505
|
+
|
|
506
|
+
| 变量名 | 说明 |
|
|
507
|
+
| --- | --- |
|
|
508
|
+
| `INSTALL_INTERNAL_SKILLS` | 设为 `1` 或 `true` 以显示和安装 `internal: true` 的 skill |
|
|
509
|
+
| `DISABLE_TELEMETRY` | 设为禁用匿名使用统计 |
|
|
510
|
+
| `DO_NOT_TRACK` | 另一种禁用统计的方式 |
|
|
511
|
+
|
|
512
|
+
```bash
|
|
513
|
+
# 安装内部 skill
|
|
514
|
+
INSTALL_INTERNAL_SKILLS=1 npx jd-skills add <owner>/<skills-repo> --list
|
|
515
|
+
```
|
|
516
|
+
|
|
517
|
+
## 遥测
|
|
518
|
+
|
|
519
|
+
本 CLI 默认收集匿名使用数据用于改进工具,**不收集任何个人信息**。
|
|
520
|
+
|
|
521
|
+
在 CI 环境下会自动禁用遥测。
|
|
522
|
+
|
|
523
|
+
## 相关链接
|
|
524
|
+
|
|
525
|
+
- [Agent Skills 规范](https://agentskills.io)
|
|
526
|
+
- [上游 skills.sh 目录](https://skills.sh) —— 社区 skill 注册中心
|
|
527
|
+
- [上游仓库](https://github.com/vercel-labs/skills) —— 本 fork 的来源
|
|
528
|
+
- [上游 skills 仓库](https://github.com/vercel-labs/agent-skills) —— 社区维护的 skill 集
|
|
529
|
+
- [Amp Skills 文档](https://ampcode.com/manual#agent-skills)
|
|
530
|
+
- [Antigravity Skills 文档](https://antigravity.google/docs/skills)
|
|
531
|
+
- [Factory AI / Droid Skills 文档](https://docs.factory.ai/cli/configuration/skills)
|
|
532
|
+
- [Claude Code Skills 文档](https://code.claude.com/docs/en/skills)
|
|
533
|
+
- [OpenClaw Skills 文档](https://docs.openclaw.ai/tools/skills)
|
|
534
|
+
- [Cline Skills 文档](https://docs.cline.bot/features/skills)
|
|
535
|
+
- [CodeBuddy Skills 文档](https://www.codebuddy.ai/docs/ide/Features/Skills)
|
|
536
|
+
- [Codex Skills 文档](https://developers.openai.com/codex/skills)
|
|
537
|
+
- [Command Code Skills 文档](https://commandcode.ai/docs/skills)
|
|
538
|
+
- [Crush Skills 文档](https://github.com/charmbracelet/crush?tab=readme-ov-file#agent-skills)
|
|
539
|
+
- [Cursor Skills 文档](https://cursor.com/docs/context/skills)
|
|
540
|
+
- [Firebender Skills 文档](https://docs.firebender.com/multi-agent/skills)
|
|
541
|
+
- [Gemini CLI Skills 文档](https://geminicli.com/docs/cli/skills/)
|
|
542
|
+
- [GitHub Copilot Agent Skills](https://docs.github.com/en/copilot/concepts/agents/about-agent-skills)
|
|
543
|
+
- [iFlow CLI Skills 文档](https://platform.iflow.cn/en/cli/examples/skill)
|
|
544
|
+
- [Kimi Code CLI Skills 文档](https://moonshotai.github.io/kimi-code/en/customization/skills)
|
|
545
|
+
- [Kiro CLI Skills 文档](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#skill-resources)
|
|
546
|
+
- [Kode Skills 文档](https://github.com/shareAI-lab/kode/blob/main/docs/skills.md)
|
|
547
|
+
- [OpenCode Skills 文档](https://opencode.ai/docs/skills)
|
|
548
|
+
- [Qwen Code Skills 文档](https://qwenlm.github.io/qwen-code-docs/en/users/features/skills/)
|
|
549
|
+
- [OpenHands Skills 文档](https://docs.openhands.ai/modules/usage/how-to/using-skills)
|
|
550
|
+
- [Pi Skills 文档](https://github.com/badlogic/pi-mono/blob/main/packages/coding-agent/docs/skills.md)
|
|
551
|
+
- [Qoder Skills 文档](https://docs.qoder.com/cli/Skills)
|
|
552
|
+
- [Replit Skills 文档](https://docs.replit.com/replitai/skills)
|
|
553
|
+
- [Roo Code Skills 文档](https://docs.roocode.com/features/skills)
|
|
554
|
+
- [Trae Skills 文档](https://docs.trae.ai/ide/skills)
|
|
555
|
+
|
|
556
|
+
## 许可协议
|
|
557
|
+
|
|
558
|
+
MIT —— 继承自上游 [`vercel-labs/skills`](https://github.com/vercel-labs/skills) 项目。第三方依赖的许可声明
|
|
559
|
+
保留在 `ThirdPartyNoticeText.txt`。
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/*!----------------- Skills CLI ThirdPartyNotices -------------------------------------------------------
|
|
2
|
+
|
|
3
|
+
The Skills CLI incorporates third party material from the projects listed below.
|
|
4
|
+
The original copyright notice and the license under which this material was received
|
|
5
|
+
are set forth below. These licenses and notices are provided for informational purposes only.
|
|
6
|
+
|
|
7
|
+
---------------------------------------------
|
|
8
|
+
Third Party Code Components
|
|
9
|
+
--------------------------------------------
|
|
10
|
+
|
|
11
|
+
================================================================================
|
|
12
|
+
Package: @clack/prompts@0.11.0
|
|
13
|
+
License: MIT
|
|
14
|
+
Repository: https://github.com/bombshell-dev/clack
|
|
15
|
+
--------------------------------------------------------------------------------
|
|
16
|
+
|
|
17
|
+
MIT License
|
|
18
|
+
|
|
19
|
+
Copyright (c) Nate Moore
|
|
20
|
+
|
|
21
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
22
|
+
|
|
23
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
24
|
+
|
|
25
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
================================================================================
|
|
29
|
+
Package: picocolors@1.1.1
|
|
30
|
+
License: ISC
|
|
31
|
+
Repository: https://github.com/alexeyraspopov/picocolors
|
|
32
|
+
--------------------------------------------------------------------------------
|
|
33
|
+
|
|
34
|
+
ISC License
|
|
35
|
+
|
|
36
|
+
Copyright (c) 2021-2024 Oleksii Raspopov, Kostiantyn Denysov, Anton Verinov
|
|
37
|
+
|
|
38
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
39
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
40
|
+
copyright notice and this permission notice appear in all copies.
|
|
41
|
+
|
|
42
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
43
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
44
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
45
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
46
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
47
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
48
|
+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
================================================================================
|
|
52
|
+
Package: simple-git@3.30.0
|
|
53
|
+
License: MIT
|
|
54
|
+
Repository: https://github.com/steveukx/git-js
|
|
55
|
+
--------------------------------------------------------------------------------
|
|
56
|
+
|
|
57
|
+
MIT License
|
|
58
|
+
|
|
59
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
60
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
61
|
+
in the Software without restriction, including without limitation the rights
|
|
62
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
63
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
64
|
+
furnished to do so, subject to the following conditions:
|
|
65
|
+
|
|
66
|
+
The above copyright notice and this permission notice shall be included in all
|
|
67
|
+
copies or substantial portions of the Software.
|
|
68
|
+
|
|
69
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
70
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
71
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
72
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
73
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
74
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
75
|
+
SOFTWARE.
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
================================================================================
|
|
79
|
+
Package: xdg-basedir@5.1.0
|
|
80
|
+
License: MIT
|
|
81
|
+
Repository: https://github.com/sindresorhus/xdg-basedir
|
|
82
|
+
--------------------------------------------------------------------------------
|
|
83
|
+
|
|
84
|
+
MIT License
|
|
85
|
+
|
|
86
|
+
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
87
|
+
|
|
88
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
89
|
+
|
|
90
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
91
|
+
|
|
92
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
================================================================================
|
|
96
|
+
Package: yaml@2.8.3
|
|
97
|
+
License: ISC
|
|
98
|
+
Repository: https://github.com/eemeli/yaml
|
|
99
|
+
--------------------------------------------------------------------------------
|
|
100
|
+
|
|
101
|
+
Copyright Eemeli Aro <eemeli@gmail.com>
|
|
102
|
+
|
|
103
|
+
Permission to use, copy, modify, and/or distribute this software for any purpose
|
|
104
|
+
with or without fee is hereby granted, provided that the above copyright notice
|
|
105
|
+
and this permission notice appear in all copies.
|
|
106
|
+
|
|
107
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
108
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
109
|
+
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
110
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
111
|
+
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
112
|
+
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
|
113
|
+
THIS SOFTWARE.
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
================================================================================
|
|
117
|
+
*/
|
package/bin/cli.mjs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import module from 'node:module';
|
|
4
|
+
|
|
5
|
+
// https://nodejs.org/api/module.html#module-compile-cache
|
|
6
|
+
if (module.enableCompileCache && !process.env.NODE_DISABLE_COMPILE_CACHE) {
|
|
7
|
+
try {
|
|
8
|
+
module.enableCompileCache();
|
|
9
|
+
} catch {
|
|
10
|
+
// Ignore errors
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
await import('../dist/cli.mjs');
|