You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(init): support CLERK_CLI_SKILL_SOURCE env override
Adds an escape hatch for skill authors iterating on the clerk-cli skill
without rebuilding the CLI: set CLERK_CLI_SKILL_SOURCE to any value the
`skills` CLI accepts (github URL, org/repo shorthand, absolute or
relative local path), and `clerk init` passes it straight to
`<runner> skills add <value>` in place of the bundled source.
The override path skips the staged temp dir and the --copy flag, so a
local working-tree path installs via the default symlink mode and edits
to the source are picked up immediately by already-installed projects.
The override has no effect on the upstream framework-pattern skills.
Add `CLERK_CLI_SKILL_SOURCE` env override to install the `clerk-cli` skill from a local path, fork, or PR branch instead of the bundled content. Intended for skill authors iterating without rebuilding the CLI.
Copy file name to clipboardExpand all lines: packages/cli-core/src/commands/init/README.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -197,6 +197,24 @@ At install time, [`skills.ts`](./skills.ts) stages the bundled content into a fr
197
197
198
198
The `skills` CLI writes the installed files into each agent's skill directory (`.claude/skills/clerk-cli/`, `.cursor/skills/clerk-cli/`, etc.) and records the entry in the project's `skills-lock.json` with `sourceType: "local"`, which correctly excludes it from `skills update` (the skill can only change when the CLI itself is upgraded).
199
199
200
+
#### Local debugging
201
+
202
+
For skill authors iterating on the `clerk-cli` skill without rebuilding the CLI, set `CLERK_CLI_SKILL_SOURCE` to any value the `skills` CLI accepts, and the bundled content is bypassed entirely:
203
+
204
+
```sh
205
+
# Absolute path to a working-tree skill dir (default symlink install —
206
+
# edits to the source are reflected in the installed skill immediately).
# Shorthand for the default repo (installs from main branch).
213
+
CLERK_CLI_SKILL_SOURCE="clerk/cli" clerk init
214
+
```
215
+
216
+
When the override is active, `clerk init` logs the value being used and hands it straight to `<runner> skills add <value>` without `--copy`, so the install mode matches whatever the `skills` CLI would do for a regular remote or local source. The override has no effect on the upstream framework-pattern skills.
217
+
200
218
### 2. The upstream framework-pattern skills
201
219
202
220
The base skills `clerk` and `clerk-setup` are always included from [`clerk/skills`](https://github.com/clerk/skills). The detected framework dependency adds a matching skill:
Copy file name to clipboardExpand all lines: packages/cli-core/src/commands/skill/README.md
+15-1Lines changed: 15 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,20 @@ clerk skill install --pm bun
27
27
|`-y, --yes`| Skip prompts; auto-select the preferred package runner and pass `-y -g` to the `skills` CLI |
28
28
|`--pm <manager>`| Package manager hint for runner detection (`bun`, `pnpm`, `yarn`, `npm`). Defaults to lockfile detection in the current dir |
29
29
30
+
## Local debugging (`CLERK_CLI_SKILL_SOURCE`)
31
+
32
+
Skill authors iterating on `clerk-cli` can set `CLERK_CLI_SKILL_SOURCE` to bypass the bundled content and point `skills add` at any source the `skills` CLI accepts (absolute path, GitHub URL, or `org/repo` shorthand):
33
+
34
+
```sh
35
+
# Absolute path to a working-tree skill dir (symlink install — edits are live).
When the override is active, the CLI logs the value being used and passes it straight to `<runner> skills add <value>` without `--copy`. The override applies to both `clerk skill install` and the skills step in `clerk init`.
43
+
30
44
## Clerk API endpoints
31
45
32
-
None. This command does not make any Clerk API calls; it only spawns the external `skills` CLI against a staged copy of the bundled skill.
46
+
None. This command does not make any Clerk API calls; it only spawns the external `skills` CLI against a staged copy of the bundled skill (or the `CLERK_CLI_SKILL_SOURCE` override when set).
0 commit comments