@mx-space/cli 0.12.1 → 0.13.1

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
@@ -427,7 +427,7 @@ Snippets are addressed by Snowflake id or `<reference>/<name>`. A bare name with
427
427
  | -------------------------- | ----------------------------------------------------------- |
428
428
  | `--name <name>` | `name` (required for `create`) |
429
429
  | `--reference <r>` | `reference` (defaults to `root` server-side) |
430
- | `--type <t>` | `type`: `json`, `json5`, `function`, `text`, or `yaml` |
430
+ | `--type <t>` | `type`: `json`, `json5`, `function`, `text`, `yaml`, or `skill` |
431
431
  | `--file <path\|->` | Read `raw` content from a file; `-` reads stdin |
432
432
  | `--raw <text>` | Inline `raw` content |
433
433
  | `--private` / `--no-private` | `private` |
@@ -447,6 +447,28 @@ echo '{"a":1}' | mxs snippet create --name config
447
447
  mxs snippet edit web/theme
448
448
  ```
449
449
 
450
+ ### Skill snippets
451
+
452
+ The `skill` type stores a Claude Code-style skill bundle (YAML frontmatter + markdown body). On create/update the server parses the frontmatter, enforces that frontmatter `name` matches the snippet `name`, requires a non-empty `description`, copies the description into `comment`, and auto-fills `customPath` to `sk/<name>` when not set. The raw markdown (including frontmatter) is served at `/api/v3/s/sk/<name>` with `Content-Type: text/markdown`.
453
+
454
+ ```bash
455
+ mxs snippet create --name db-migration-author --type skill --file SKILL.md
456
+ # attach to a post via meta.skillIds on `mxs post create`/`update`
457
+ ```
458
+
459
+ A minimal `SKILL.md`:
460
+
461
+ ```markdown
462
+ ---
463
+ name: db-migration-author
464
+ description: Expand-contract Postgres migrations safe for rolling deploys.
465
+ ---
466
+
467
+ ## When to use
468
+
469
+ Use when authoring or reviewing any Postgres migration in this codebase.
470
+ ```
471
+
450
472
  ## Configuration
451
473
 
452
474
  | Command | Description |
package/dist/bin/mxs.mjs CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import { t as run } from "../mxs-PcmoYdgj.mjs";
2
+ import { t as run } from "../mxs-DXpzbUf4.mjs";
3
3
  export { run };
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { a as defaultMessageFor, c as tagToCode, i as codeForTag, l as toErrorEnvelope, n as defaultGlobalFlags, o as exitCodeForError, r as parseGlobalFlags, s as exitCodeForTag, t as run } from "./mxs-PcmoYdgj.mjs";
1
+ import { a as defaultMessageFor, c as tagToCode, i as codeForTag, l as toErrorEnvelope, n as defaultGlobalFlags, o as exitCodeForError, r as parseGlobalFlags, s as exitCodeForTag, t as run } from "./mxs-DXpzbUf4.mjs";
2
2
  export { codeForTag, defaultGlobalFlags, defaultMessageFor, exitCodeForError, exitCodeForTag, parseGlobalFlags, run, tagToCode, toErrorEnvelope };
@@ -37467,7 +37467,8 @@ const SNIPPET_TYPES = [
37467
37467
  "json5",
37468
37468
  "function",
37469
37469
  "text",
37470
- "yaml"
37470
+ "yaml",
37471
+ "skill"
37471
37472
  ];
37472
37473
  const SNIPPET_KEYS = [
37473
37474
  "name",
@@ -37558,7 +37559,8 @@ const EXT_BY_TYPE = {
37558
37559
  json5: "json5",
37559
37560
  function: "js",
37560
37561
  yaml: "yaml",
37561
- text: "txt"
37562
+ text: "txt",
37563
+ skill: "md"
37562
37564
  };
37563
37565
  const extForType = (type) => typeof type === "string" && EXT_BY_TYPE[type] || "txt";
37564
37566
  const create$1 = make$13("create", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-space/cli",
3
- "version": "0.12.1",
3
+ "version": "0.13.1",
4
4
  "description": "Command line interface for mx-space (mx-core) — auth, content, configuration",
5
5
  "keywords": [
6
6
  "mx-space",