@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 +23 -1
- package/dist/bin/mxs.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{mxs-PcmoYdgj.mjs → mxs-DXpzbUf4.mjs} +4 -2
- package/package.json +1 -1
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 `
|
|
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
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-
|
|
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", {
|