@artifactshare/cli 0.19.0 → 0.19.2

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/CHANGELOG.md CHANGED
@@ -3,7 +3,13 @@
3
3
  All notable changes to `@artifactshare/cli` are documented here.
4
4
  For user-facing announcements, see https://artifactshare.com/updates?product=cli.
5
5
 
6
- ## Unreleased
6
+ ## 0.19.2 - 2026-10-26
7
+
8
+ - Respect `CLAUDE_CONFIG_DIR` for Claude Code user skills, including automatic detection and updates. Blank settings skip automatic writes and report recovery guidance in diagnostics.
9
+
10
+ ## 0.19.1 - 2026-10-26
11
+
12
+ - Reword the local preview's Japanese messages: the reopen button now reads 「下書きに戻す」, and pending-delivery notices name the agent that has yet to receive the comments.
7
13
 
8
14
  ## 0.19.0 - 2026-10-25
9
15
 
package/README.md CHANGED
@@ -104,7 +104,7 @@ project's Slack channel must be reauthorized.
104
104
  | `changelog` | Show the installed version, this release's notes, and the public updates page |
105
105
  | `profiles list / use / import-token / delete` | Switch between local account profiles, import an issued token from stdin, and delete profile entries |
106
106
  | `init` | Set up this directory: detect Claude Code, Codex, or Cursor and install the skill in user scope, then show next steps; or save defaults with `--profile` / `--project-id` |
107
- | `skills ensure / install / list / update / remove` | Install or update the bundled usage guide in your AI agent's skills |
107
+ | `skills ensure / install / list / update / remove` | Install or update the bundled usage guide in your AI agent's skills; Claude user scope follows CLAUDE_CONFIG_DIR (blank values are unavailable) |
108
108
 
109
109
  Public command paths covered by this reference:
110
110
 
@@ -214,7 +214,7 @@ For first-time setup in a project, start here:
214
214
  npm exec --yes --package=@artifactshare/cli -- artifactshare init --json
215
215
  ```
216
216
 
217
- `init` detects Claude Code, Codex, or Cursor in the working directory, installs or updates the bundled skill in user scope, and reports the next steps (sign in, then share). With no agent detected, it installs user-scope Codex, Claude Code, and Cursor skills. Cursor project scope is not auto-installed; use `skills install --tool cursor --scope project`. Existing project-scope skills are not modified. Add `--dry-run` to preview without writing.
217
+ `init` detects Claude Code, Codex, or Cursor in the working directory (and Claude Code at its resolved user root when CLAUDE_CONFIG_DIR is nonblank), installs or updates the bundled skill in user scope, and reports the next steps (sign in, then share). With no agent detected, it installs user-scope Codex, Claude Code, and Cursor skills. Cursor project scope is not auto-installed; use `skills install --tool cursor --scope project`. Existing project-scope skills are not modified. Add `--dry-run` to preview without writing.
218
218
 
219
219
  When an agent receives an Artifact Share URL instead, start with `open`:
220
220
 
@@ -224,6 +224,8 @@ npm exec --yes --package=@artifactshare/cli -- artifactshare open <artifact-id-o
224
224
 
225
225
  This installs or updates the local skill first, then reads single-file artifacts. Static sites and multi-file artifacts return a `download` next command.
226
226
 
227
+ Claude Code user skills use CLAUDE_CONFIG_DIR when set, otherwise ~/.claude. Relative values resolve against the CLI working directory without tilde expansion; surrounding spaces are preserved. Empty or whitespace-only values disable Claude user-scope writes: automatic setup skips them. Mutations explicitly selecting --tool claude --scope user fail with validation_failed. With --tool claude and no --scope, skills update and skills remove process the project target and report the user target as skipped. Set CLAUDE_CONFIG_DIR to a non-empty path or unset it to use ~/.claude. skills list and doctor report unavailable targets with path: null and the recovery hint. When CLAUDE_CONFIG_DIR is set to a nonblank value, an existing resolved root also detects Claude Code for automatic setup. Old ~/.claude skills are left untouched; project scope, Codex and Cursor paths are unchanged. The skill file is `<root>/skills/artifactshare/SKILL.md`. The variable must reach the CLI process; settings confined to another launcher are not visible.
228
+
227
229
  To target a specific tool manually, use `skills install --tool <codex|claude|cursor> [--scope project|user]`; project scope is opt-in for team commits. `skills ensure --tool auto` is the same user-scope detection `init` and `open` use (omit `--scope` or pass `--scope user`; `--scope project` fails). Regular successful commands also update outdated managed user-scope Codex, Claude Code, and Cursor skills when they are already installed, but do not create a missing Cursor user-scope skill.
228
230
 
229
231
  Comment deletion is permanent. Use `comments delete <target> --thread-id <id> --message-id <id> --json` for one message, or omit `--message-id` only when deleting the whole thread.
package/dist/cli.js CHANGED
@@ -4184,7 +4184,63 @@ function scopeTargetConfig(tool, scope) {
4184
4184
  pruneDirs: ["artifactshare", "skills"]
4185
4185
  };
4186
4186
  }
4187
+ const CLAUDE_CONFIG_HINT = "Set CLAUDE_CONFIG_DIR to a non-empty path or unset it to use ~/.claude.";
4188
+ function claudeUserRoot() {
4189
+ const value = process.env.CLAUDE_CONFIG_DIR;
4190
+ if (value === void 0) return {
4191
+ state: "unset",
4192
+ path: join(homedir(), ".claude")
4193
+ };
4194
+ return value.trim() ? {
4195
+ state: "set",
4196
+ path: resolve(value)
4197
+ } : {
4198
+ state: "blank",
4199
+ path: void 0
4200
+ };
4201
+ }
4202
+ function availableTarget(target) {
4203
+ return target.path !== null;
4204
+ }
4205
+ function unavailableState(target) {
4206
+ return {
4207
+ tool: target.tool,
4208
+ scope: target.scope,
4209
+ path: null,
4210
+ available: false,
4211
+ code: target.error.code,
4212
+ hint: target.error.hint,
4213
+ installed: false,
4214
+ managed: false,
4215
+ installed_version: null,
4216
+ update_available: false
4217
+ };
4218
+ }
4219
+ function unavailableActionTargets(tools, scope) {
4220
+ return allTargets().filter((target) => !availableTarget(target) && (tools.length === 0 || tools.includes(target.tool)) && scope !== "project");
4221
+ }
4222
+ function unavailableSelection(tools, scope) {
4223
+ if (!tools.includes("claude") || scope !== "user") return void 0;
4224
+ const target = skillTarget("claude", "user");
4225
+ return availableTarget(target) ? void 0 : target.error;
4226
+ }
4187
4227
  function skillTarget(tool, scope) {
4228
+ if (tool === "claude" && scope === "user") {
4229
+ const root = claudeUserRoot();
4230
+ if (root.state === "blank") return {
4231
+ tool,
4232
+ scope,
4233
+ path: null,
4234
+ error: validationError("Claude Code user skills are unavailable because CLAUDE_CONFIG_DIR is empty or whitespace-only.", CLAUDE_CONFIG_HINT)
4235
+ };
4236
+ const path = join(root.path, SKILL_FILE_PATH);
4237
+ return {
4238
+ tool,
4239
+ scope,
4240
+ path,
4241
+ absolutePath: path
4242
+ };
4243
+ }
4188
4244
  const relative = scopeTargetConfig(tool, scope).relativePath;
4189
4245
  const path = scope === "project" ? relative : join(homedir(), relative);
4190
4246
  return {
@@ -4276,12 +4332,16 @@ function parseFilters(parsed, options = {}) {
4276
4332
  };
4277
4333
  }
4278
4334
  function filteredTargets(tools, scope) {
4279
- return allTargets().filter((target) => (tools.length === 0 || tools.includes(target.tool)) && (scope === void 0 || target.scope === scope));
4335
+ return allTargets().filter(availableTarget).filter((target) => (tools.length === 0 || tools.includes(target.tool)) && (scope === void 0 || target.scope === scope));
4280
4336
  }
4281
4337
  function detectionBase(scope) {
4282
4338
  return scope === "project" ? process.cwd() : homedir();
4283
4339
  }
4284
4340
  async function isToolDetected(tool, scope) {
4341
+ if (tool === "claude" && scope === "user") {
4342
+ const root = claudeUserRoot();
4343
+ return root.state !== "blank" && Boolean((await stat(root.path).catch(() => null))?.isDirectory());
4344
+ }
4285
4345
  const base = detectionBase(scope);
4286
4346
  for (const dir of TOOL_CONFIG[tool].detectDirs) if ((await stat(join(base, dir)).catch(() => null))?.isDirectory()) return true;
4287
4347
  return false;
@@ -4294,15 +4354,27 @@ async function autoDetectedTools() {
4294
4354
  ];
4295
4355
  const detected = [];
4296
4356
  for (const tool of autoOrder) if (await isToolDetected(tool, "project")) detected.push(tool);
4297
- return detected.length > 0 ? detected : [
4298
- "codex",
4299
- "claude",
4300
- "cursor"
4301
- ];
4357
+ if (detected.length === 0) return {
4358
+ tools: [
4359
+ "codex",
4360
+ "claude",
4361
+ "cursor"
4362
+ ],
4363
+ fallback: true
4364
+ };
4365
+ if (!detected.includes("claude") && claudeUserRoot().state === "set" && await isToolDetected("claude", "user")) detected.unshift("claude");
4366
+ return {
4367
+ tools: detected,
4368
+ fallback: false
4369
+ };
4302
4370
  }
4303
4371
  async function autoTargets(scope) {
4304
4372
  const targetScope = scope ?? "user";
4305
- return (await autoDetectedTools()).filter((tool) => TOOL_CONFIG[tool].scopes.includes(targetScope)).map((tool) => skillTarget(tool, targetScope));
4373
+ const { tools, fallback } = await autoDetectedTools();
4374
+ return {
4375
+ targets: tools.filter((tool) => TOOL_CONFIG[tool].scopes.includes(targetScope)).map((tool) => skillTarget(tool, targetScope)).filter(availableTarget),
4376
+ fallback
4377
+ };
4306
4378
  }
4307
4379
  function targetPathKey(target) {
4308
4380
  return realpath(target.absolutePath).catch(() => target.absolutePath);
@@ -4360,9 +4432,19 @@ async function finishActions(command, planned, dryRun, mode) {
4360
4432
  }))
4361
4433
  };
4362
4434
  }
4363
- async function runActions(command, planned, dryRun, mode) {
4435
+ async function runActions(command, planned, dryRun, mode, unavailableTargets = []) {
4364
4436
  const data = await finishActions(command, planned, dryRun, mode);
4365
- if (data) writeSuccess(command, data, mode);
4437
+ if (data) {
4438
+ data.targets.push(...unavailableTargets.map((target) => ({
4439
+ tool: target.tool,
4440
+ scope: target.scope,
4441
+ path: null,
4442
+ action: "skipped",
4443
+ code: target.error.code,
4444
+ hint: target.error.hint
4445
+ })));
4446
+ writeSuccess(command, data, mode);
4447
+ }
4366
4448
  }
4367
4449
  async function bundledOrFailure(command, mode) {
4368
4450
  try {
@@ -4385,6 +4467,7 @@ async function runSkillsInstall(parsed, mode) {
4385
4467
  const planned = [];
4386
4468
  for (const tool of tools) {
4387
4469
  const target = skillTarget(tool, scope);
4470
+ if (!availableTarget(target)) return writeFailure(command, target.error, mode, 1);
4388
4471
  const state = await readTarget(target);
4389
4472
  if ((state.kind === "unmanaged" || state.kind === "broken") && !force) return writeFailure(command, skillUpdateConflictError(target.path), mode, 1);
4390
4473
  if (state.kind === "managed" && state.version === bundled.version && !force) {
@@ -4413,9 +4496,14 @@ async function ensureSkills(parsed, mode, options = {}) {
4413
4496
  writeFailure(command, validationError("--tool is required.", "Pass --tool auto, --tool codex, --tool claude, or --tool cursor; repeat explicit tools for multiple targets."), mode, 1);
4414
4497
  return;
4415
4498
  }
4499
+ const unavailable = unavailableSelection(filters.tools, filters.scope ?? "project");
4500
+ if (unavailable) {
4501
+ writeFailure(command, unavailable, mode, 1);
4502
+ return;
4503
+ }
4416
4504
  const bundled = await bundledOrFailure(command, mode);
4417
4505
  if (!bundled) return void 0;
4418
- const targets = filters.auto ? await autoTargets(filters.scope) : filteredTargets(filters.tools, filters.scope ?? "project");
4506
+ const targets = (filters.auto ? await autoTargets(filters.scope) : void 0)?.targets ?? filteredTargets(filters.tools, filters.scope ?? "project");
4419
4507
  const planned = [];
4420
4508
  for (const target of targets) {
4421
4509
  const state = await readTarget(target);
@@ -4436,7 +4524,7 @@ async function ensureSkills(parsed, mode, options = {}) {
4436
4524
  }
4437
4525
  if (options.autoUpdateUserManaged) {
4438
4526
  const plannedPaths = new Set(await Promise.all(planned.map((action) => targetPathKey(action.target))));
4439
- for (const target of allTargets().filter((candidate) => candidate.scope === "user")) {
4527
+ for (const target of allTargets().filter(availableTarget).filter((candidate) => candidate.scope === "user")) {
4440
4528
  if (plannedPaths.has(await targetPathKey(target))) continue;
4441
4529
  const state = await readTarget(target);
4442
4530
  if (state.kind !== "managed" || state.version === bundled.version) continue;
@@ -4454,7 +4542,7 @@ async function autoUpdateUserManagedSkills() {
4454
4542
  try {
4455
4543
  const bundled = await loadBundledSkills();
4456
4544
  const planned = [];
4457
- for (const target of allTargets().filter((candidate) => candidate.scope === "user")) {
4545
+ for (const target of allTargets().filter(availableTarget).filter((candidate) => candidate.scope === "user")) {
4458
4546
  const state = await readTarget(target);
4459
4547
  if (state.kind !== "managed" || state.version >= bundled.version) continue;
4460
4548
  planned.push({
@@ -4499,6 +4587,13 @@ async function runSkillsList(parsed, mode) {
4499
4587
  if (!bundled) return;
4500
4588
  const targets = [];
4501
4589
  for (const target of allTargets()) {
4590
+ if (!availableTarget(target)) {
4591
+ targets.push({
4592
+ ...unavailableState(target),
4593
+ detected: false
4594
+ });
4595
+ continue;
4596
+ }
4502
4597
  const state = await readTarget(target);
4503
4598
  targets.push({
4504
4599
  tool: target.tool,
@@ -4520,6 +4615,13 @@ async function skillDiagnostics() {
4520
4615
  const bundled = await loadBundledSkills();
4521
4616
  const targets = [];
4522
4617
  for (const target of allTargets()) {
4618
+ if (!availableTarget(target)) {
4619
+ targets.push({
4620
+ ...unavailableState(target),
4621
+ update_command: null
4622
+ });
4623
+ continue;
4624
+ }
4523
4625
  const state = await readTarget(target);
4524
4626
  const updateAvailable = state.kind === "managed" && state.version !== bundled.version;
4525
4627
  targets.push({
@@ -4545,6 +4647,8 @@ async function runSkillsUpdate(parsed, mode) {
4545
4647
  const command = "skills update";
4546
4648
  const filters = parseFilters(parsed);
4547
4649
  if (filters.error) return writeFailure(command, filters.error, mode, 1);
4650
+ const unavailable = unavailableSelection(filters.tools, filters.scope);
4651
+ if (unavailable) return writeFailure(command, unavailable, mode, 1);
4548
4652
  const force = parsed.options.force === true;
4549
4653
  const bundled = await bundledOrFailure(command, mode);
4550
4654
  if (!bundled) return;
@@ -4570,12 +4674,14 @@ async function runSkillsUpdate(parsed, mode) {
4570
4674
  action: "unchanged"
4571
4675
  });
4572
4676
  }
4573
- await runActions(command, planned, parsed.options.dryRun === true, mode);
4677
+ await runActions(command, planned, parsed.options.dryRun === true, mode, unavailableActionTargets(filters.tools, filters.scope));
4574
4678
  }
4575
4679
  async function runSkillsRemove(parsed, mode) {
4576
4680
  const command = "skills remove";
4577
4681
  const filters = parseFilters(parsed);
4578
4682
  if (filters.error) return writeFailure(command, filters.error, mode, 1);
4683
+ const unavailable = unavailableSelection(filters.tools, filters.scope);
4684
+ if (unavailable) return writeFailure(command, unavailable, mode, 1);
4579
4685
  const planned = [];
4580
4686
  for (const target of filteredTargets(filters.tools, filters.scope)) {
4581
4687
  const state = await readTarget(target);
@@ -4585,7 +4691,7 @@ async function runSkillsRemove(parsed, mode) {
4585
4691
  action
4586
4692
  });
4587
4693
  }
4588
- await runActions(command, planned, parsed.options.dryRun === true, mode);
4694
+ await runActions(command, planned, parsed.options.dryRun === true, mode, unavailableActionTargets(filters.tools, filters.scope));
4589
4695
  }
4590
4696
  //#endregion
4591
4697
  //#region src/command-runners/open.ts
@@ -5444,7 +5550,7 @@ const PREVIEW_MESSAGES = {
5444
5550
  "preview.share": "共有する",
5445
5551
  "preview.annotateMode": "コメントモード",
5446
5552
  "preview.panelTitle": "コメント",
5447
- "preview.emptyHint": "気になる要素をクリックしてコメント。リンクを操作したいときは右下のトグルでコメントモードを OFF",
5553
+ "preview.emptyHint": "気になる要素をクリックしてコメントできます。リンクを操作したいときは、右下のトグルでコメントモードをオフにしてください",
5448
5554
  "preview.requestFixesOne": "修正を依頼する({n} 件)",
5449
5555
  "preview.requestFixesOther": "修正を依頼する({n} 件)",
5450
5556
  "preview.discardDrafts": "下書きを破棄",
@@ -5455,18 +5561,18 @@ const PREVIEW_MESSAGES = {
5455
5561
  "preview.stateResolved": "解決済み",
5456
5562
  "preview.stateDismissed": "見送り",
5457
5563
  "preview.delete": "削除",
5458
- "preview.reopen": "差し戻す",
5459
- "preview.reopenNote": "差し戻したコメントは、再度依頼するまでエージェントには届きません",
5564
+ "preview.reopen": "下書きに戻す",
5565
+ "preview.reopenNote": "下書きに戻したコメントは、再度依頼するまでエージェントには届きません",
5460
5566
  "preview.batchWorkingOne": "エージェントが {n} 件を修正中",
5461
5567
  "preview.batchWorkingOther": "エージェントが {n} 件を修正中",
5462
- "preview.batchQueuedOne": "エージェントへ通知済みです。{n} 件の取得を待っています。待機が続く場合は preview next の実行を依頼してください",
5463
- "preview.batchQueuedOther": "エージェントへ通知済みです。{n} 件の取得を待っています。待機が続く場合は preview next の実行を依頼してください",
5464
- "preview.batchQueuedCodexOne": "Codexへ通知済みです。{n} 件の取得待ちです。続く場合は codex resume でセッションを再開してください",
5465
- "preview.batchQueuedCodexOther": "Codexへ通知済みです。{n} 件の取得待ちです。続く場合は codex resume でセッションを再開してください",
5466
- "preview.batchQueuedClaudeOne": "Claude Codeが依頼を確認しました。{n} 件の取得を待っています",
5467
- "preview.batchQueuedClaudeOther": "Claude Codeが依頼を確認しました。{n} 件の取得を待っています",
5468
- "preview.batchQueuedCursorOne": "管理対象のCursorセッションへ通知済みです。{n} 件の取得を待っています",
5469
- "preview.batchQueuedCursorOther": "管理対象のCursorセッションへ通知済みです。{n} 件の取得を待っています",
5568
+ "preview.batchQueuedOne": "エージェントへ通知済みです。エージェントが {n} 件を受け取るのを待っています。この状態が続く場合は preview next の実行を依頼してください",
5569
+ "preview.batchQueuedOther": "エージェントへ通知済みです。エージェントが {n} 件を受け取るのを待っています。この状態が続く場合は preview next の実行を依頼してください",
5570
+ "preview.batchQueuedCodexOne": "Codexへ通知済みです。Codex が {n} 件を受け取るのを待っています。この状態が続く場合は codex resume でセッションを再開してください",
5571
+ "preview.batchQueuedCodexOther": "Codexへ通知済みです。Codex が {n} 件を受け取るのを待っています。この状態が続く場合は codex resume でセッションを再開してください",
5572
+ "preview.batchQueuedClaudeOne": "Claude Codeが依頼を確認しました。Claude Code が {n} 件を受け取るのを待っています",
5573
+ "preview.batchQueuedClaudeOther": "Claude Codeが依頼を確認しました。Claude Code が {n} 件を受け取るのを待っています",
5574
+ "preview.batchQueuedCursorOne": "管理対象のCursorセッションへ通知済みです。Cursor が {n} 件を受け取るのを待っています",
5575
+ "preview.batchQueuedCursorOther": "管理対象のCursorセッションへ通知済みです。Cursor が {n} 件を受け取るのを待っています",
5470
5576
  "preview.batchManualOne": "{n} 件を保存しました。エージェントに preview next の実行を依頼してください",
5471
5577
  "preview.batchManualOther": "{n} 件を保存しました。エージェントに preview next の実行を依頼してください",
5472
5578
  "preview.batchManualClaudeOne": "{n} 件を保存しました。Claude Codeを開き、preview next の実行を依頼してください",
@@ -5483,8 +5589,8 @@ const PREVIEW_MESSAGES = {
5483
5589
  "preview.batchFailedCursorOther": "Cursorセッションが依頼を受け付けませんでした。{n} 件は保存済みです。セッションを開き、preview next を実行してください",
5484
5590
  "preview.resolvedToastOne": "{n} 件を解決しました",
5485
5591
  "preview.resolvedToastOther": "{n} 件を解決しました",
5486
- "preview.orphanNoticeOne": "ページが大きく変わったため {n} 件のコメントが対象を見失いました",
5487
- "preview.orphanNoticeOther": "ページが大きく変わったため {n} 件のコメントが対象を見失いました",
5592
+ "preview.orphanNoticeOne": "ページが大きく変わったため、{n} 件のコメントの対象箇所が見つからなくなりました",
5593
+ "preview.orphanNoticeOther": "ページが大きく変わったため、{n} 件のコメントの対象箇所が見つからなくなりました",
5488
5594
  "preview.orphanDiscard": "まとめて破棄",
5489
5595
  "preview.positionChecking": "コメントの位置を確認しています…",
5490
5596
  "preview.positionNeedsCheck": "引用した文がこの版に見つかりません",
@@ -5500,7 +5606,7 @@ const PREVIEW_MESSAGES = {
5500
5606
  "preview.shareDialog.title": "共有する",
5501
5607
  "preview.shareDialog.destination": "宛先",
5502
5608
  "preview.shareDialog.visibility": "共有範囲",
5503
- "preview.shareDialog.notCarried": "ローカルのコメントは共有先に持ち込まれません。共有後は共有先で新しくコメントできます",
5609
+ "preview.shareDialog.notCarried": "ローカルのコメントは共有先には引き継がれません。共有後は共有先で新しくコメントできます",
5504
5610
  "preview.shareDialog.snapshotNote": "{time} 時点の内容です。それ以降の変更は含まれません",
5505
5611
  "preview.shareDialog.confirm": "共有する",
5506
5612
  "preview.shareDialog.cancel": "キャンセル",
@@ -5511,7 +5617,7 @@ const PREVIEW_MESSAGES = {
5511
5617
  "preview.shareDialog.copied": "コピーしました",
5512
5618
  "preview.shareDialog.finish": "完了",
5513
5619
  "preview.shareDialog.continue": "プレビューを続ける",
5514
- "preview.shareDialog.visibilityUnknown": "設定から共有範囲を判定できなかったため、共有を停止しました。設定を直してからもう一度開いてください。",
5620
+ "preview.shareDialog.visibilityUnknown": "設定から共有範囲を判定できなかったため、共有できません。設定を直してから、このダイアログを開き直してください。",
5515
5621
  "preview.shareDialog.visibilityAdjusted": "選択した範囲ではなく {visibility} の共有範囲で共有されました。",
5516
5622
  "preview.shareDialog.confirmDestination": "ログインしました。宛先と共有範囲を確認してから共有してください。",
5517
5623
  "preview.shareDialog.visibilityPrivate": "個別共有",
@@ -14909,6 +15015,11 @@ auto-installed; use skills install --tool cursor --scope project. Existing
14909
15015
  project-scope skills are not modified. For static sites or multi-file artifacts,
14910
15016
  the JSON includes a download next_command.
14911
15017
 
15018
+ Claude Code user skills go to $CLAUDE_CONFIG_DIR/skills when set, otherwise
15019
+ ~/.claude/skills. Relative paths resolve against cwd without tilde expansion.
15020
+ A nonblank CLAUDE_CONFIG_DIR also enables detection at that root; blank values
15021
+ skip automatic writes. Set a non-empty path or unset CLAUDE_CONFIG_DIR.
15022
+
14912
15023
  Common failures:
14913
15024
  auth_required Set ARTIFACTSHARE_TOKEN before open
14914
15025
  skill_update_conflict Inspect the file or run skills install --tool <tool> --force
@@ -15771,6 +15882,12 @@ npm exec --yes --package=@artifactshare/cli -- artifactshare skills install --to
15771
15882
  Writes a managed SKILL.md (codex, claude) or Cursor rule (cursor).
15772
15883
  Files without the Artifact Share managed marker are never overwritten without --force.
15773
15884
 
15885
+ Claude Code user skills go to $CLAUDE_CONFIG_DIR/skills when set, otherwise
15886
+ ~/.claude/skills. Relative paths resolve against cwd without tilde expansion.
15887
+ A nonblank CLAUDE_CONFIG_DIR also enables detection at that root; blank values
15888
+ skip automatic writes. Set a non-empty path or unset CLAUDE_CONFIG_DIR.
15889
+ Explicit Claude user installs reject blank values with validation_failed.
15890
+
15774
15891
  Common failures:
15775
15892
  validation_failed Pass --tool codex|claude|cursor; cursor supports --scope project only
15776
15893
  skill_update_conflict An unmanaged file exists at the target path; inspect it or pass --force`
@@ -15808,7 +15925,7 @@ Common failures:
15808
15925
  });
15809
15926
  const skillsEnsureDefinition = define({
15810
15927
  name: "ensure",
15811
- description: "Install or update the bundled Artifact Share skill.",
15928
+ description: "Install or update the bundled Artifact Share skill; Claude user scope follows CLAUDE_CONFIG_DIR.",
15812
15929
  toKebab: true,
15813
15930
  args: {
15814
15931
  ...commonArgs,
@@ -15824,10 +15941,18 @@ npm exec --yes --package=@artifactshare/cli -- artifactshare skills ensure --too
15824
15941
  npm exec --yes --package=@artifactshare/cli -- artifactshare skills ensure --tool claude --json
15825
15942
 
15826
15943
  Use --tool auto from an agent workspace. It detects .claude, .codex/.agents, or
15827
- .cursor in the current directory and installs or updates the matching user-scope
15828
- skills. If none are present, it prepares user-scope Codex, Claude Code, and Cursor
15944
+ .cursor in the current directory, or the Claude user root when CLAUDE_CONFIG_DIR
15945
+ is nonblank, and installs
15946
+ or updates the matching user-scope skills. If none are present, it prepares user-scope Codex, Claude Code, and Cursor
15829
15947
  skills. Cursor project scope needs skills install --tool cursor --scope project.
15830
15948
 
15949
+ Claude user skills use CLAUDE_CONFIG_DIR when set, otherwise ~/.claude.
15950
+ Relative paths resolve against cwd; tilde is literal. Blank values skip automatic
15951
+ writes. Set CLAUDE_CONFIG_DIR to a non-empty path or unset it. Selecting both --tool claude
15952
+ and --scope user makes mutations fail with validation_failed. Omit --scope from
15953
+ skills update/remove --tool claude to process project scope and get a skipped
15954
+ user entry. List and doctor show the unavailable user target.
15955
+
15831
15956
  Common failures:
15832
15957
  validation_failed Pass --tool auto|codex|claude|cursor; --tool auto supports --scope user only (omit --scope or pass --scope user). Project scope needs skills install --tool <tool> --scope project
15833
15958
  skill_update_conflict An unmanaged or broken skill file exists; inspect it before overwriting`
@@ -15889,6 +16014,12 @@ in, then share). With no agent detected, it prepares user-scope Codex, Claude Co
15889
16014
  and Cursor skills. Cursor project scope is not auto-installed; use skills install
15890
16015
  --tool cursor --scope project. Existing project-scope skills are not modified.
15891
16016
  data.mode is "onboarding".
16017
+
16018
+ Claude Code user skills go to $CLAUDE_CONFIG_DIR/skills when set, otherwise
16019
+ ~/.claude/skills. Relative paths resolve against cwd without tilde expansion.
16020
+ A nonblank CLAUDE_CONFIG_DIR also enables detection at that root; blank values
16021
+ skip automatic writes. Set a non-empty path or unset CLAUDE_CONFIG_DIR.
16022
+
15892
16023
  With --profile or --project-id, init saves working-directory defaults to
15893
16024
  .artifactshare/config.local.json instead (data.mode is "config"); secrets are never written there.
15894
16025
  Config saves preserve unknown keys and refuse linked or changed paths.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artifactshare/cli",
3
- "version": "0.19.0",
3
+ "version": "0.19.2",
4
4
  "description": "Upload and share HTML, Markdown, folders, and static sites from terminals, AI agents, automation, and CI.",
5
5
  "homepage": "https://artifactshare.com/connect",
6
6
  "repository": {
@@ -4,7 +4,7 @@ description: Share, publish, upload, host, update, open, or read back existing f
4
4
  ---
5
5
 
6
6
  <!-- artifactshare-skill
7
- version: 45
7
+ version: 46
8
8
  managed: true
9
9
  -->
10
10
 
@@ -382,10 +382,13 @@ npm exec --yes --package=@artifactshare/cli -- artifactshare skills list --json
382
382
  ```
383
383
 
384
384
  - `open`, flag-less `init`, and `skills ensure --tool auto` detect Claude Code,
385
- Codex, or Cursor in the working directory and install or update this skill in
386
- user scope (`~/.claude/skills/`, `~/.agents/skills/`, or
385
+ Codex, or Cursor in the working directory (also Claude at its resolved user
386
+ root when CLAUDE_CONFIG_DIR is nonblank) and install or update this skill in user scope
387
+ (`$CLAUDE_CONFIG_DIR/skills/` or `~/.claude/skills/` when unset, `~/.agents/skills/`, or
387
388
  `~/.cursor/skills/artifactshare/SKILL.md`). With no agent detected,
388
389
  user-scope Codex, Claude Code, and Cursor skills are prepared.
390
+ Claude Code user-scope skills go to `$CLAUDE_CONFIG_DIR/skills` when set, otherwise `~/.claude/skills`. A blank value skips automatic writes; `doctor` explains why. Mutations explicitly selecting `--tool claude --scope user` fail with `validation_failed`. With `--tool claude` and no `--scope`, `skills update` and `skills remove` process the project target and report the user target as skipped.
391
+
389
392
  - Cursor project scope is not auto-installed. Install the Cursor rule explicitly
390
393
  with `skills install --tool cursor --scope project`.
391
394
  - Use `skills install --tool cursor --scope user` to install or manage the
@@ -4,7 +4,7 @@ alwaysApply: false
4
4
  ---
5
5
 
6
6
  <!-- artifactshare-skill
7
- version: 45
7
+ version: 46
8
8
  managed: true
9
9
  -->
10
10
 
@@ -102,6 +102,7 @@ Quoted comments are resolved in the viewer using the exact quote and surrounding
102
102
  - Permanently remove an artifact only when the user explicitly asks with `delete <artifact-id-or-url> --json`.
103
103
  - Manage projects: `projects list --json`, `projects create <name> --json` (uses `default_project_visibility` when saved, otherwise `workspace`; pass `--visibility private` for a confidential project), `projects edit <id>` for name, description, visibility, audience (`--add-email`/`--remove-email`), and archive state (`--archive`/`--unarchive`).
104
104
  - Save a default project with `init --project-id <id> --json`. Preview setup with `init --dry-run --json`.
105
+ - Claude Code user-scope skills go to `$CLAUDE_CONFIG_DIR/skills` when set, otherwise `~/.claude/skills`. A blank value skips automatic writes; `doctor` explains why. Mutations explicitly selecting `--tool claude --scope user` fail with `validation_failed`. With `--tool claude` and no `--scope`, `skills update` and `skills remove` process the project target and report the user target as skipped.
105
106
  - Manage skills: `skills ensure --tool auto --json` detects Claude Code, Codex, or Cursor and installs or updates user-scope skills; Cursor project scope needs `skills install --tool cursor --scope project --json`. Use `skills install --tool cursor --scope user --json` for the Cursor user-scope skill explicitly. Project scope is opt-in via `skills install --tool <tool> --scope project --json`. `skills update --json` updates installed managed skills; `--force` overwrites unmanaged files on install.
106
107
  - Preview a local `.md` / `.html` file with `preview <file> --json` (add `--no-open` to keep the browser closed). Preview start is a long-lived service, so run the CLI invocation itself once with the environment's long-running/background process mechanism and retain that task or process as its owner; add no shell pipeline, redirection, command substitution, or wrapper that waits for process exit (tool-managed background output capture is fine). The single ready JSON line (`url` / generated `session` / `share_origin` / `reused` / sanitized `agent`) is the startup handshake: a task id or PID alone is not readiness, and `--session` is only for later `next` / `done` / `reply` / `stop`, never start. While one launch is still running without readable ready output, do not launch a second or infer a URL from listening ports; report that startup is unverified and ask the user how to proceed. A `reused: true` handshake is valid, but that invocation exits because the original process remains the server owner; do not treat the reused invocation's handle as ownership. Saving the file reloads the page. A preview started inside Codex registers the trusted thread UUID and uses `codex queue` for a fixed batch-ready notice; `queued` means accepted, while `preview next` is the first proof of processing. If it remains queued, reopen the session with `codex resume`. In Claude Code, only when background tasks are enabled (`CLAUDE_CODE_DISABLE_BACKGROUND_TASKS` is neither `1` nor `true`) and Bash exposes `run_in_background`, run preview start as one Bash background task, read it through Claude Code's task-output mechanism until the ready JSON arrives, and keep a non-reused task alive; then arm `preview next --wait 3600` as a separate background task. Re-arm after `preview done`, but not after `timed_out: true`. If background waiting is disabled or rejected after start, use manual pickup. If background Bash tasks are unavailable before start, ask the user to run and keep preview open in their own terminal; that user-owned process owns the server and pickup is manual. In Cursor, keep `preview next --wait 90` in the foreground. The user annotates in the browser and submits batches. Fetch them with `preview next [--wait <sec>] [--session <id>]` — non-claiming long poll where `timed_out` / `session_ended` are normal empty results and `preview_session_not_found` means no live session, `preview_request_failed` means the session is alive and rejected the request, and `preview_session_unverified` means the recorded session went silent — retry, then stop the process before `preview stop <file> --force`. Fix the whole batch in one edit, then pipe `{"items":[{"thread","generation","outcome":"fixed|skipped","note"}]}` to `preview done --stdin` (idempotent per generation; results `accepted|stale|already_reported|unknown_thread`; `skipped` needs a note; items with `anchor.state: "orphaned"` are skipped, not re-fixed; the note becomes the thread summary). `preview reply --thread <id> --body <text>` answers without changing state; `preview stop` ends the session and keeps annotations. Never copy comment content into a provider notification; `preview next` is the source of truth. If `preview next` immediately returns the same items again, stop polling and tell the user. Nothing is uploaded unless the user shares from the page.
107
108
  - Check the current state with `whoami --json` or `doctor --json` for token storage, authentication, destination, network, upload access, and skill update status.