@jarel/myskills 0.1.0-alpha.2 → 0.1.0-beta.16

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.
Files changed (4) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +478 -10
  3. package/dist/index.js +38890 -16103
  4. package/package.json +10 -7
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  Command-line client for MySkills.
4
4
 
5
+ Supported runtime: Node.js `>=22.13 <23 || >=24 <25`.
6
+
5
7
  Package:
6
8
 
7
9
  ```text
@@ -23,18 +25,57 @@ Responsibilities:
23
25
  - install/export/update/rollback packages
24
26
  - submit drafts
25
27
  - support maintainer/admin workflows through role-gated API calls
28
+ - enroll a personal Codex workspace and execute approved updates with an explicit companion command
29
+ - inspect an explicitly selected local Codex profile with a read-only metadata observation or health report
30
+ - enroll global and project Codex and Claude skill directories as separate read-only inventory scopes
31
+ - create a dry-run-only work/team bootstrap plan from explicit approved roots and skill selectors
26
32
 
27
33
  CLI tokens should be stored in the platform secret store where possible.
28
34
 
29
35
  ## Current Slice
30
36
 
37
+ This document describes the `0.1.0-beta.16` source candidate, including named
38
+ CLI configuration profiles and global/project inventory scopes. Source,
39
+ GitHub releases, npm publication, and hosted deployment are separate states;
40
+ see [release verification](../../docs/RELEASE.md) for their checks. Historical
41
+ [beta.7 delivery evidence](../../docs/BETA7_RELEASE_DELIVERY.md) records that
42
+ release only. The API and web expose their deployed version and commit at
43
+ `/version.json`.
44
+
45
+ ### Beta.3 breaking security changes
46
+
47
+ Beta.3 tightens the API boundary for team and sharing mutations. Team
48
+ creation, team-owner invitation/member lifecycle changes, and
49
+ sharing expansions to team or organization scope require an interactive
50
+ MFA-verified session. Privileged sharing reads/writes and the deprecated
51
+ `skills edit --visibility` alias use the same session/MFA boundary. API tokens
52
+ remain useful for scoped reads, but they cannot perform these mutations.
53
+
54
+ Migration before upgrading to beta.3: enroll TOTP through the API's
55
+ `POST /v1/auth/mfa/totp/enroll` and `POST /v1/auth/mfa/totp/confirm` routes
56
+ with password reauthentication, save the one-time recovery codes, then run
57
+ `myskills login` and complete the `POST /v1/auth/mfa/verify` challenge. Move
58
+ mutation automation to an explicitly managed session; keep API-token
59
+ automation read-only. Invitation acceptance remains session-only where the API
60
+ route permits it.
61
+
62
+ For install guidance, use the generated `myskills install ...` or
63
+ `myskills export ... --output ...` command. The corresponding MCP tool no longer
64
+ returns `apiBundleEndpoint` or a bundle URL, so clients must not construct one;
65
+ the CLI's authenticated export/install path remains the replacement flow.
66
+ Generated commands do not embed an API URL or bearer token; configure the CLI
67
+ with `myskills config set api-url ...` or `MYSKILLS_API_URL`, then authenticate
68
+ separately.
69
+
31
70
  Implemented commands:
32
71
 
33
72
  ```text
34
73
  myskills version
35
74
  myskills --version
75
+ myskills init <name> [--output <dir>] [--title <text>] [--summary <text>] [--license <text>] [--json]
36
76
  myskills validate --path <file-directory-or-zip>
37
77
  myskills scan --path <file-directory-or-zip>
78
+ myskills package --path <directory> --output <file.zip> [--json]
38
79
  myskills search [query] [--api-url <url>]
39
80
  myskills info <skill-slug> [--api-url <url>]
40
81
  myskills login [--api-url <url>] [--method <password|api-key>] [--email <email>]
@@ -47,50 +88,408 @@ myskills config get api-url
47
88
  myskills config set api-url <url>
48
89
  myskills config reset api-url
49
90
  myskills config list
91
+ myskills bootstrap codex --dry-run --profile work --context <file> [--work-source-root <dir>] [--shared-source-root <dir>] --live-root <dir> --include-slug <slug> [--include-slug <slug>] --output <report.json>
50
92
  myskills submit --path <file-directory-or-zip> [--api-url <url>] [--token <token>]
51
93
  myskills review submissions [--api-url <url>] [--token <token>]
52
- myskills review action <submission-id> --action <approve|publish> [--reason <text>]
94
+ myskills review bundle <submission-id> [--platform <name>] [--output <file>] [--api-url <url>] [--token <token>]
95
+ myskills review action <submission-id> --action <approve|request-changes|reject|publish> [--artifact-sha256 <hash>] [--reason <text>] [--api-url <url>] [--token <token>]
96
+ myskills submissions list [--api-url <url>] [--token <token>]
97
+ myskills submissions withdraw <submission-id> [--reason <text>] [--api-url <url>] [--token <token>]
98
+ myskills skills edit <skill-slug> [--title <text>] [--summary <text>] [--tag <tag>] [--visibility <scope>] [--reason <text>] [--api-url <url>] [--token <token>] (deprecated visibility compatibility alias; use sharing set)
99
+ myskills skills archive|restore|delete <skill-slug> [--reason <text>] [--api-url <url>] [--token <token>]
100
+ myskills releases list <skill-slug> [--api-url <url>] [--token <token>]
101
+ myskills releases deprecate|unpublish|revoke|restore|delete <skill-slug>@<version> [--reason <text>] [--replacement <version>] [--api-url <url>] [--token <token>]
53
102
  myskills teams list|skills [--api-url <url>] [--token <token>]
54
103
  myskills teams create <team-name> [--name <team-name>] [--api-url <url>] [--token <token>]
55
104
  myskills teams invite <team-id> --email <email> [--api-url <url>] [--token <token>]
56
105
  myskills teams accept <invitation-id> [--api-url <url>] [--token <token>]
57
106
  myskills sharing get <skill-slug> [--api-url <url>] [--token <token>]
58
- myskills sharing set <skill-slug> --visibility <scope> [--team <team-id>] [--user <email>]
107
+ myskills sharing set <skill-slug> --visibility <scope> [--team <team-id>] [--user <email>] [--organization <organization-id>] [--organization-id <organization-id>] [--clear-organizations]
108
+ myskills architectures patterns [--api-url <url>] [--token <token>]
109
+ myskills architectures list [--api-url <url>] [--token <token>]
110
+ myskills architectures show <architecture-id> [--revision <revision-id>] [--api-url <url>] [--token <token>]
111
+ myskills architectures preview|compile <architecture-id> [--revision <revision-id>] [--profile <profile-id>] [--environment <environment-id>] [--organization-id <organization-id>|--organization <organization-id>] [--api-url <url>] [--token <token>]
112
+ myskills architectures plan|dry-run <architecture-id> --observed <fixture.json> [--revision <revision-id>] [--profile <profile-id>] [--environment <environment-id>] [--organization-id <organization-id>|--organization <organization-id>] [--api-url <url>] [--token <token>]
113
+ myskills architectures observe --root <absolute-dir> --profile <personal|work|shared> (--context <file> | --target-id <id> --generation <number> --architecture-id <id> --environment-id <id> --profile-id <id> --adapter-digest <sha256> --capabilities-digest <sha256>) [--json]
114
+ myskills architectures health --root <absolute-dir> --profile <personal|work|shared> (--context <file> | --target-id <id> --generation <number> --architecture-id <id> --environment-id <id> --profile-id <id> --adapter-digest <sha256> --capabilities-digest <sha256>) [--json]
59
115
  myskills admin sharing get [--api-url <url>] [--token <token>]
60
- myskills admin sharing set [--public <true|false>] [--authenticated <true|false>] [--teams <true|false>] [--team-visibility <true|false>] [--user-visibility <true|false>]
116
+ myskills admin sharing set [--public <true|false>] [--authenticated <true|false>] [--teams <true|false>] [--team-visibility <true|false>] [--user-visibility <true|false>] [--organization-visibility <true|false>]
61
117
  myskills export <skill-slug> --version <version> --platform <platform> --output <dir>
62
118
  myskills install <skill-slug> [--version <version>] [--platform <platform>] [--dir <install-root>]
63
119
  myskills list [--dir <install-root>]
64
120
  myskills update [skill-slug] [--version <version>] [--platform <platform>] [--dir <install-root>]
65
121
  myskills rollback <skill-slug> [--dir <install-root>]
122
+ myskills codex enroll --workspace <absolute-dir> --architecture-id <id> --environment-id <id> --profile-id <id> [--name <name>]
123
+ myskills codex observe --workspace <absolute-dir> [--upload] [--json]
124
+ myskills scopes inventory --provider codex|claude --root <absolute-skills-dir> [--json]
125
+ myskills scopes enroll --provider codex|claude --scope global --root <absolute-skills-dir> --architecture-id <id> --environment-id <id> --profile-id <id> [--name <name>]
126
+ myskills scopes enroll --provider codex|claude --scope project --project <absolute-dir> --architecture-id <id> --environment-id <id> --profile-id <id> [--name <name>]
127
+ myskills scopes observe --provider codex|claude --scope global|project [--project <absolute-dir>] [--upload] [--json]
128
+ myskills scopes list [--provider codex|claude]
129
+ myskills scopes resolve --provider codex|claude --path <absolute-dir>
130
+ myskills scopes exclude|include --provider codex|claude --project <absolute-dir>
131
+ myskills scopes unbind --provider codex|claude --scope global|project [--project <absolute-dir>]
132
+ myskills scopes migrate plan|apply --provider codex|claude --project <absolute-dir> [--plan-digest <sha256>]
133
+ myskills install <skill-slug> --version <version> --workspace <absolute-dir>
134
+ myskills update [skill-slug] [--version <version>] --workspace <absolute-dir>
135
+ myskills rollback <skill-slug> --workspace <absolute-dir>
136
+ myskills companion run-once --workspace <absolute-dir> --holder <name>
66
137
  myskills token create --name <name> --scope <scope> [--scope <scope>]
67
138
  myskills token list
68
139
  myskills token revoke <token-id>
69
140
  ```
70
141
 
71
- ## Public Alpha Install
142
+ `myskills init <name>` creates a minimal private Codex package in a new
143
+ directory. The default output is `./<name>`; use `--output` to select another
144
+ destination under an existing parent directory. The command writes `skill.json` and `SKILL.md` with
145
+ version `0.1.0`, `UNLICENSED`, and the `codex-skill` platform target. It does
146
+ not authenticate, call the network, or overwrite an existing file, directory,
147
+ or symlink. Edit the generated `SKILL.md`, then run `myskills validate --path`
148
+ and `myskills scan --path` before any separate authenticated submission.
149
+
150
+ `myskills package --path ./my-skill --output ./my-skill.zip` creates a
151
+ deterministic ZIP from one checked snapshot of a local package directory.
152
+ It validates the root manifest, portable paths, and bounded UTF-8 text, then
153
+ blocks credential and other blocking scan findings before creating output.
154
+ Warnings remain visible for review. The output reports the archive SHA-256,
155
+ byte size, and a separate `myskills submit --path ...` command. `--json` returns
156
+ the manifest, scan findings, output path, checksum, size, and next command.
157
+ Packaging does not contact the registry or bypass submission and review.
158
+
159
+ The output must end in `.zip` and have an existing parent directory outside
160
+ the source tree. Existing files, directories, symlinks, and symlink ancestors
161
+ are refused. All regular source files are included; there is no ignore file.
162
+ Keep credentials and unrelated files outside the source directory. The package
163
+ limits are 500 files, 1 MiB of text, 1,000 filesystem entries, and a 10 MiB
164
+ archive. Binary files,
165
+ symlinks, and special files are rejected. Text bytes, including BOMs and line
166
+ endings, are preserved. Entries use ordinal UTF-8 path order, fixed timestamps
167
+ and permissions, and uncompressed ZIP storage, so source mtimes and locale do
168
+ not change the archive checksum. Empty directories and executable bits are not
169
+ preserved. The archive checksum identifies the ZIP bytes, not the registry's
170
+ package-content digest.
171
+
172
+ Local authoring requires macOS or Linux. The archive is created with private
173
+ file permissions and exclusive creation; it never overwrites a destination
174
+ that appears during the command. A disk or write failure can leave a partial
175
+ output, which the error asks you to inspect before removal. Work in directories
176
+ owned by your user; this does not isolate writes from a hostile process running
177
+ as the same operating-system user.
178
+
179
+ The API-backed architecture preview includes the compiled graph, escaped
180
+ Mermaid, and a versioned diagram artifact with a plain-text accessible outline.
181
+ Use `--json` when a caller needs the complete JSON/Mermaid/outline projection;
182
+ the human-readable preview prints the bounded topology summary and Mermaid.
183
+ The browser workbench additionally offers derived JSON and Mermaid downloads.
184
+
185
+ ### Local Codex observation
186
+
187
+ `architectures observe` and `architectures health` run the Codex adapter locally
188
+ against an explicitly supplied absolute root. The profile must be selected
189
+ explicitly as `personal`, `work`, or `shared`. Supply either `--context` with a
190
+ JSON object containing exactly `targetId`, `targetGeneration`,
191
+ `architectureId`, `environmentId`, `profileId`, `adapterDigest`, and
192
+ `capabilitiesDigest`, or pass those seven values through their corresponding
193
+ flags.
194
+
195
+ The command reads only bounded, allowlisted metadata and safe skill
196
+ frontmatter. It does not search home directories, follow profile pointers,
197
+ read prompt or skill bodies, emit local paths, retain credentials, call the
198
+ network, upload observations, or modify a target. Review the JSON output before
199
+ any separately authorized/manual upload to an API observation route. No live
200
+ apply, rollback, installation, or other target mutation is available through
201
+ this command.
202
+
203
+ ### Fixture-only sync and recovery
204
+
205
+ `architectures plan` and `architectures dry-run` accept a bounded observed
206
+ fixture and return a dry-run plan. The fixture is not an implicit target and
207
+ the command does not apply changes. General architecture graph execution remains
208
+ fixture-only, even though its API persistence and recovery/rollback evidence
209
+ can be stored in Postgres. The separate Codex workspace and managed skill
210
+ operation commands below support one explicit filesystem installation path.
211
+ Each bounded architecture fixture run allows at most 500 steps and 2,004 append-only
212
+ receipts: a 1,002-receipt max-step lifecycle, one full apply/verify retry, and
213
+ two recovery/terminal receipts. Further retries require a new bounded run.
214
+
215
+ The API/web control plane also supports manager-only organization architecture
216
+ grant save/revoke and owner/team-owner derive-shell migration preview/create.
217
+ Those operations require the server's current-revision, organization-policy,
218
+ membership, exact-release, limit, idempotency, and MFA checks. This CLI does
219
+ not expose a second policy implementation or write command for them.
72
220
 
73
- The first public alpha package is distributed through npm under the `alpha` tag:
221
+ ## Published CLI And Local Builds
222
+
223
+ The published beta channel is installed with:
74
224
 
75
225
  ```bash
76
- npm install -g @jarel/myskills@alpha
226
+ npm install -g @jarel/myskills@beta
77
227
  myskills --version
78
228
  myskills login
79
229
  ```
80
230
 
81
- Update the CLI with:
231
+ The npm `beta` tag selects the published prerelease. It can differ from this
232
+ source candidate and the deployed API/web revision. To test source changes
233
+ before npm publication, build and run them locally:
82
234
 
83
235
  ```bash
84
- npm install -g @jarel/myskills@alpha
236
+ npm ci
237
+ npm run build
238
+ node apps/cli/dist/index.js --version
239
+ node apps/cli/dist/index.js login
240
+ npm pack -w @jarel/myskills
85
241
  ```
86
242
 
243
+ Use the resulting tarball for a fresh isolated installation, or run the bundle
244
+ directly. The release gate verifies the packed executable and Apache license.
245
+ Public npm publication is a separate release step.
246
+
87
247
  `validate`, `scan`, and `submit` accept a manifest file, package directory, or local `.zip` package. `login` prompts for the API URL when one is not supplied; the default is the local API at `http://localhost:3001`, and custom hosted URLs can be entered manually. Successful login stores the selected API URL in local CLI config so later commands can omit `--api-url`. API URL resolution is `--api-url`, then `MYSKILLS_API_URL`, then saved config, then `http://localhost:3001`.
88
248
 
89
- `login` supports an email/password session flow and an API-key flow. The email/password flow handles MFA challenges with a TOTP or recovery code prompt and stores only the verified session token. The API-key flow validates the key with `/v1/me` before storing it. Token resolution is `--token`, then `MYSKILLS_TOKEN`, then the stored login token. The default token store uses the platform credential store through `@napi-rs/keyring` and falls back to `tokens.json` with user-only file permissions when keyring storage is unavailable or `MYSKILLS_TOKEN_STORE=file`/`MYSKILLS_TOKEN_FILE` is set. `auth status` validates the current token without printing it. `logout` revokes stored session tokens and clears the local entry; stored API tokens are removed locally and must be revoked with `token revoke`.
249
+ `login` supports an email/password session flow and an API-key flow. Password
250
+ login handles MFA challenges and stores the verified session token. API-key
251
+ login validates the key with `/v1/me`. Token resolution is `--token`, then
252
+ `MYSKILLS_TOKEN`, then the stored token. The default store uses the platform
253
+ credential store through `@napi-rs/keyring`. Credential-store failures are
254
+ reported; a failed write does not silently store the credential in a file.
255
+ An existing legacy file credential can be read when the keyring entry is
256
+ confirmed absent. Explicit `MYSKILLS_TOKEN_STORE=file` or `MYSKILLS_TOKEN_FILE`
257
+ selects file storage with user-only permissions. A successful keyring write
258
+ clears the obsolete file entry.
259
+
260
+ `auth status` validates the token without printing it. `logout` revokes stored
261
+ sessions and clears local credentials. If a malformed keyring entry prevents
262
+ revocation, logout attempts local deletion and reports that remote revocation
263
+ is unconfirmed. It reports deletion failures. Stored API tokens are removed
264
+ locally and must be revoked with `token revoke`. Malformed file-store JSON
265
+ requires repair or removal of that file; other stored accounts are not silently
266
+ discarded.
90
267
 
91
268
  `config get api-url`, `config set api-url <url>`, `config reset api-url`, and `config list` manage the saved API URL. `doctor` checks the CLI version, Node version, resolved API URL, `/health`, auth status, token-store backend, install-directory writability, and `/v1/capabilities`. If the CLI is pointed at the web app instead of the API, or a newer command is sent to an older server, command errors include concrete next steps and `--json` returns structured error codes.
92
269
 
93
- `submit` validates and scans locally before sending package directories as normalized text entries or `.zip` packages as base64 archive uploads for server-side extraction. `export` downloads server-authorized bundle content, verifies byte size and SHA-256 against release metadata, and writes normalized package paths under the requested output directory. `install` uses the same verified bundle path, writes into `--dir`, `MYSKILLS_INSTALL_DIR`, or the user data directory, and records local state in `.myskills-app/installed.json`; `update` preserves a rollback snapshot before replacing files, and `rollback` restores the most recent snapshot. `token create` prints the plaintext API token only once and does not overwrite the stored login session. Browser/device login, platform-specific install adapters, and archive creation are still planned.
270
+ ### Older workspace scope identities
271
+
272
+ Scope state now records both device and inode. Existing inode-only state stays
273
+ readable, but observation and ordinary re-enrollment stop with
274
+ `SCOPE_ROOT_IDENTITY_LEGACY`. After confirming the same directory, repeat its
275
+ original `scopes enroll` command with `--accept-current-root` and the original
276
+ configuration profile. The command verifies the account, registry, architecture,
277
+ and existing target, then backs up local state and updates only the root identity.
278
+ It does not register targets, grant consent, or upload inventory. Pending
279
+ enrollments retain their recovery identity and can resume with normal enrollment
280
+ after acknowledgment. A repeated acknowledgment is a no-op; it cannot override
281
+ a known device/inode mismatch. Device and inode do not detect every same-device
282
+ inode reuse. See [scope identity migration](../../docs/WORKSPACE_SCOPES.md#upgrade-an-inode-only-scope-identity)
283
+ for the exact upgrade and recovery behavior.
284
+
285
+ ### Separate work and personal configuration
286
+
287
+ Every command accepts `--config-profile <name>` before or after the command.
288
+ It overrides `MYSKILLS_CONFIG_PROFILE`. Names contain 1–64 lowercase letters,
289
+ digits, hyphens or underscores and start with a letter or digit. For example:
290
+
291
+ ```bash
292
+ myskills config set api-url https://work-registry.example/api --config-profile work
293
+ myskills login --config-profile work
294
+ myskills whoami --config-profile work
295
+ myskills scopes list --config-profile work
296
+ myskills config list --config-profile work --json
297
+ ```
298
+
299
+ There is no create or persistent select command. Writes create the selected
300
+ profile's state as needed; keep the flag on each command or set
301
+ `MYSKILLS_CONFIG_PROFILE` in that shell. `help`, `config list`, and `doctor`
302
+ show the selected configuration. JSON uses `configProfile: null` for the
303
+ legacy default. This selector is separate from architecture `--profile-id`
304
+ and provider inspection `--profile`.
305
+
306
+ Without a selector, existing config, credentials, and scope bindings remain at
307
+ their current locations. A named `personal` profile starts empty; it does not
308
+ copy or migrate the default. Each named profile has independent saved API URL,
309
+ credentials, and scope state, including for different accounts at one API URL.
310
+ A missing credential never falls back to another profile or the default.
311
+
312
+ The base directory is `MYSKILLS_CONFIG_DIR`, then
313
+ `$XDG_CONFIG_HOME/myskills-app`, then `~/.config/myskills-app`. Named state lives
314
+ under `<base>/profiles/<name>/` (`config.json`, optional `tokens.json`, and
315
+ `scopes/`). OS credential keys include the canonical profile directory and API
316
+ URL. Aliases for the base directory are supported; linked profile directories
317
+ are rejected so they cannot share another profile’s files. Changing the base
318
+ directory selects separate credentials. Named profiles
319
+ reject `MYSKILLS_CONFIG_FILE` and `MYSKILLS_TOKEN_FILE`; these retain their
320
+ existing precedence when no profile is selected. `MYSKILLS_TOKEN_STORE=file`
321
+ remains available for profile-local file storage.
322
+
323
+ Explicit API and token overrides still apply: `--api-url` then
324
+ `MYSKILLS_API_URL` override the saved registry, and `--token` then
325
+ `MYSKILLS_TOKEN` override the stored credential. Clear inherited overrides when
326
+ you want the profile's saved registry/account. `auth status` reports the token
327
+ source without printing its value. Selection does not move skill directories,
328
+ change native provider profiles, or unbind existing targets.
329
+
330
+ `bootstrap codex --dry-run` is a work/team-only local planner. It requires an
331
+ explicit `work` context, a normalized HTTPS target origin, stable target
332
+ instance/workspace/actor identifiers, explicit source and target trust
333
+ compartments (`work`, `shared`, or `work+shared` for sources, and `work-team`
334
+ for the target), typed `work` and/or `shared` source roots, a target root, and
335
+ a positive `--include-slug` allowlist. The context must approve the computed
336
+ source-root type/digests and target-root digest. Personal, consumer, public,
337
+ and unclassified sources are rejected, and candidates are never selected by
338
+ implicit inventory discovery. A plan accepts at most eight selected candidates;
339
+ each candidate snapshot accepts at most 1,000 entries and 32 nested directory
340
+ levels. A one-skill work-owned canary is supported.
341
+
342
+ The context JSON must include `profile: "work"`, `targetOrigin`,
343
+ `instanceId`, one `tenantId` or `workspaceId`, `actorId`, the canonical trust
344
+ compartments, `approvedSourceRoots` entries of `{type, identityDigest}`, and
345
+ `approvedTargetRootIdentityDigest`.
346
+
347
+ The planner reads selected source and target content without network or
348
+ registry access. It opens each selected tree through a bootstrap-owned secure
349
+ snapshot reader, then hashes, parses, scans, and reports only those held bytes.
350
+ It writes only the explicitly requested new private report (`0600`) under a
351
+ user-controlled private parent. Reserved package manifests remain strict:
352
+ invalid or multiple manifests fail closed, and no metadata is relocated. The
353
+ full report contains the work binding, approved root digests, owning package
354
+ contract identifiers, candidate content identities, execution identities, the
355
+ exact target precondition (`absent` or `present-identical` with its expected
356
+ artifact identity), and private snapshots. Terminal output is a redacted DTO
357
+ with counts and digests; it does not contain paths, candidate names, inventory,
358
+ or private identifiers.
359
+ There is no apply, publishing, adoption, or target-write mode in this command.
360
+ `ready` means that the held snapshot passed deterministic checks only. It is
361
+ not approval to apply. Sensitive configuration and credential paths are
362
+ excluded before content enters the report, and heuristic scan-clean never
363
+ replaces explicit human content review. Any future executor must repeat the
364
+ retained source/target identity check immediately before its first write
365
+ (compare-and-swap) and require that review at that boundary.
366
+
367
+ `validate`, `scan`, and `submit` read one bounded snapshot of the local package.
368
+ `submit` sends those same validated and scanned text entries for directory and
369
+ ZIP inputs. Authors can inspect and withdraw submissions; maintainers fetch the
370
+ reviewed artifact and approval hash before approving, requesting changes,
371
+ rejecting, or publishing it. The browser shows review reasons and scan findings.
372
+ Corrections create another immutable version.
373
+
374
+ Published artifacts remain immutable. `skills edit` changes metadata;
375
+ `releases deprecate`, `unpublish`, `revoke`, `restore`, and `delete` change
376
+ server-owned lifecycle state. Deprecated releases remain installable. Hidden,
377
+ revoked, archived, or deleted releases cannot be installed or exported.
378
+ `export` verifies artifact size and SHA-256 before writing normalized paths.
379
+
380
+ `install`, `update`, and `rollback` share an exclusive install-root lock and
381
+ verify package bytes and current eligibility before promotion. Updates retain
382
+ a verified rollback snapshot. Interrupted transactions preserve unknown or
383
+ edited local bytes for investigation. Each installation binds the API origin
384
+ and registry instance ID. Legacy records without that identity are not adopted
385
+ automatically: keep their files as a backup, review the source, and install into
386
+ a new root. A registry change requires a separate root.
387
+
388
+ New installation and snapshot records declare
389
+ `contentDigestAlgorithm: "sha256-json-ordinal-v1"`; transaction journals use
390
+ `targetContentDigestAlgorithm` for the candidate. This scheme normalizes paths,
391
+ sorts them by JavaScript string ordinal order (UTF-16 code units), then hashes
392
+ the UTF-8 JSON array of `{path, content}` entries with SHA-256. It does not
393
+ depend on the process locale. Readers reject unknown algorithm identifiers.
394
+
395
+ A missing algorithm field identifies the legacy `localeCompare` scheme.
396
+ The CLI verifies these records with the current process's legacy comparison
397
+ rules. It does not retry with a different algorithm. If a locale change makes
398
+ legacy bytes unverifiable, return to the original verification locale and
399
+ compatible Node/ICU environment before a trusted migration. Preserve the files
400
+ and recovery copies if their identity still cannot be proved. Never add an
401
+ algorithm field to an old hash by hand. After verification, an install or
402
+ update records the held bytes with an ordinal digest in the new journal and
403
+ snapshot; rollback does the same for its verified source snapshot. Untouched
404
+ legacy history and journals retain their original verification rules.
405
+
406
+ Local package intake, install, export, and rollback support macOS and Linux.
407
+ No-follow payload reads and writes, private staging directories, and drift
408
+ checks protect these operations. They do not isolate the workspace from a
409
+ hostile process already running as the same OS user. Other operating systems
410
+ can use the API's portable buffer upload path; native Windows filesystem
411
+ installation is unsupported.
412
+
413
+ ### Personal Codex workspace
414
+
415
+ Create a personal architecture in the browser and note its architecture,
416
+ environment, and profile IDs. Enable MFA and sign in with a password session.
417
+ Enroll an existing absolute workspace directory using the command above.
418
+ Enrollment creates a user-owned target, grants consent, and stores a local
419
+ binding. A fresh workspace cannot attach to an existing target ID; that option
420
+ only confirms or resumes its existing local binding.
421
+
422
+ Use `--workspace` for all managed writes. Skills are installed under
423
+ `.agents/skills`, and records stay under `.myskills-app` in that workspace.
424
+ The CLI checks Codex compatibility and valid `SKILL.md` YAML frontmatter with a
425
+ matching name and text description. `--dir` cannot bypass an enrolled workspace's
426
+ binding. Team-shared skills can be installed when your account can read them;
427
+ team-owned execution targets are outside this adapter's beta scope.
428
+
429
+ ### Global and project skill inventories (workspace scopes)
430
+
431
+ `myskills scopes` enrolls a provider's user-level skills directory, or a
432
+ project, as a personal read-only inventory target: `codex-inventory` for Codex
433
+ and `claude-inventory` for Claude. Pass each directory explicitly; the CLI does
434
+ not search your home directory. Run `scopes inventory` first to review locally
435
+ what an upload would contain. Uploads carry skill slugs, counts, and
436
+ `SKILL.md` digests only. Absolute paths, exclusions, skill bodies, and names of
437
+ linked or invalid entries stay local.
438
+
439
+ Projects resolve to the provider's global scope unless you exclude them or
440
+ enroll them separately. Resolution uses real paths and whole path segments, the
441
+ deepest rule wins, and an excluded project never falls back to the global
442
+ scope. Scopes are MySkills ownership only: they do not change how Codex or
443
+ Claude load or inherit skills, and they never write skill files. Existing
444
+ managed Codex workspace bindings can be adopted with a previewed
445
+ `scopes migrate plan` and `scopes migrate apply`. See
446
+ [Workspace Scopes](../../docs/WORKSPACE_SCOPES.md) for the rules, recovery
447
+ steps, and local state format.
448
+
449
+ `codex observe --upload` records verified filesystem state. Confirm separately
450
+ that Codex loaded the skill. To process one browser-queued update, supply a
451
+ separate token with `skills:read` and `targets:execute` through `MYSKILLS_TOKEN`
452
+ and run `companion run-once`. If the workspace has a skill installed with
453
+ `--library-entry`, the token also needs `libraries:read`: the companion rechecks
454
+ that adoption before it changes files. Without it, the operation fails with
455
+ `API_TOKEN_SCOPE_REQUIRED` and a message that names the scope; files are not
456
+ changed. The CLI never widens a token's scopes. This command checks current
457
+ authorization, consent, policy, lease, and exact release identity. It does not
458
+ start a background daemon.
459
+ Browser/device login and additional provider install adapters remain planned.
460
+
461
+ To change skill visibility, use the canonical `myskills sharing set
462
+ <skill-slug> --visibility <scope>` command. It accepts either
463
+ `--organization <organization-id>` or `--organization-id <organization-id>` for
464
+ the complete organization grant set. Omitting both organization options keeps
465
+ the beta.2 compatibility behavior and preserves already-issued organization
466
+ grants. Pass `--clear-organizations` to send `organizationIds: []` and revoke
467
+ the complete organization grant set; this flag is mutually exclusive with both
468
+ organization ID options.
469
+
470
+ `myskills skills edit --visibility <scope>` remains a deprecated beta.2
471
+ compatibility alias. It preserves omitted organization grants and does not
472
+ provide complete-set organization controls; use the canonical sharing command
473
+ to grant or clear organization access. Canonical sharing remains subject to
474
+ the API's session and MFA security rules; the beta.2 metadata alias is also
475
+ session-only and requires an MFA-verified session before it reads or replaces
476
+ grants. API tokens cannot widen a skill through the alias. Neither path
477
+ bypasses server policy. Organization policy and membership remain API-owned.
478
+ Do not treat a successful CLI command for another scope as evidence of
479
+ organization sharing.
480
+
481
+ The CLI does not provide the separate architecture organization-grant
482
+ replacement workflow; architecture grants remain an API/web manager control.
483
+ The read-only `architectures preview`, `compile`, `plan`, and `dry-run`
484
+ commands already accept `--organization-id <organization-id>` (with
485
+ `--organization <organization-id>` retained as an input alias). The server
486
+ authorizes that exact organization projection; it is a scope filter, not an
487
+ ownership shortcut.
488
+
489
+ The beta.2 compatibility shims remain available and are planned for removal only
490
+ at a later, separately published prerelease boundary that includes migration
491
+ guidance and release verification. The source release does not imply a hosted
492
+ deployment.
94
493
 
95
494
  Common scopes:
96
495
 
@@ -98,3 +497,72 @@ Common scopes:
98
497
  - `profile:read` for `whoami`.
99
498
  - `skills:submit` for author submissions.
100
499
  - `review:read` and `review:write` for maintainer review workflows.
500
+ - `architectures:read` for architecture list, detail, preview, and fixture-plan reads.
501
+ - `libraries:read` for library reads and for install, update, and companion runs of library-bound skills.
502
+ - `libraries:write` for library changes.
503
+
504
+ ## Libraries
505
+
506
+ `myskills libraries help` lists the source, import, review, tracking, subscription
507
+ and adoption commands. Requests use the [Libraries API contract](../../docs/plans/2026-09-26-library-api-contract.md)
508
+ and reviewed JSON files supplied with `--input`. The [Libraries guide](../../docs/LIBRARIES.md)
509
+ contains a complete workflow and scope requirements.
510
+
511
+ Bind an installation to an adopted version with
512
+ `myskills install <slug> --library-entry <entry-id>`. If the adopted release
513
+ requires user action, read its notes and add `--accept-user-action`. Updates
514
+ resolve that exact recommendation and recheck it before changing files. A
515
+ deleted or inaccessible entry never falls back to the newest registry release.
516
+ Local drift still stops replacement. Use
517
+ `myskills libraries unbind-local <slug> --dir <root>` to detach that local
518
+ binding explicitly while retaining files and rollback history.
519
+
520
+ `updates` and `update` report each skill separately. If an entry is deleted,
521
+ access is lost, the adopted release is revoked, or the entry has no adoption,
522
+ that skill shows `curation-unavailable` with the reason (`library.state` and
523
+ `library.reason` in `--json`). Its files and binding stay unchanged, other skills
524
+ are still evaluated and updated, and `update` exits 1. `install` fails closed
525
+ with `LIBRARY_CURATION_UNAVAILABLE`. A malformed or mismatched resolution stops
526
+ the command with `LIBRARY_RESOLUTION_INVALID`.
527
+
528
+ If a library adopts a version older than the installed one, the skill shows
529
+ `library-adopts-older` (`adoption-older-than-installed` in `--json`). MySkills
530
+ never downgrades automatically. When the last rollback snapshot is exactly the
531
+ adopted release, run `myskills rollback <slug>`; otherwise install the adopted
532
+ version into a new root with `--dir <new-root>`. `libraries unbind-local` keeps
533
+ the installed version instead.
534
+
535
+ `libraries review-bundle <submission-id>` prints only after the SHA-256 of the
536
+ response body matches `x-myskills-artifact-sha256`. The JSON output labels its
537
+ `payload` as `parsed-for-inspection`. Use `--output <new-file>` to keep the
538
+ exact verified bytes; an existing file is never replaced. Supply
539
+ `--artifact-sha256 <digest-from-review-requests>` to also verify the immutable
540
+ artifact requested for review. Without it, verification covers the response
541
+ header only; `expectedDigestVerified` reports this distinction in JSON output.
542
+
543
+ ## Skill improvement
544
+
545
+ Prepare local skill reviews with `myskills improve`, inspect the report, export a draft, and submit it through normal review. Registry plans pin source/reviewer versions and apply user, team or organization policy. Execution requires the exact local plan digest and explicit cloud consent. See [the feature guide](../../docs/SKILL_IMPROVEMENT.md) for commands, JSON bodies, evaluation suites and current adapter limits. The first runner is Claude Code 2.1.283 or newer. Use an exact model ID and an existing Claude sign-in. Codex improvement execution remains disabled pending its isolation gate; final release verification is recorded in the feature guide.
546
+
547
+ ### Skill bundles
548
+
549
+ Browse related skills without installing them:
550
+
551
+ ```bash
552
+ myskills bundles list --view grouped --query engineering
553
+ myskills bundles show <bundle-id>
554
+ myskills bundles members <bundle-id> --limit 25
555
+ myskills bundles memberships <skill-slug>
556
+ myskills bundles sources
557
+ ```
558
+
559
+ Create or edit with `myskills bundles create --input reviewed-bundle.json` or
560
+ `myskills bundles edit <bundle-id> --input reviewed-bundle.json`. The request
561
+ contains `kind`, `name`, `purpose`, `owner`, `visibility` and `memberSlugs`.
562
+ Source groups also require `sourceEntryId`; edits require `expectedRevision`.
563
+ The API validates current ownership, author privileges and member access.
564
+
565
+ Save with `myskills bundles save <bundle-id> --input save-reference.json`, where
566
+ the file contains `libraryId` and `expectedRevision`. This saves one reference;
567
+ it does not adopt, install or follow any skill. Use `--cursor` with list/member
568
+ reads. Refresh from the first page if the authorized catalog changes.