Usage
facet.json and its text-asset files, then exits. This is the scriptable counterpart to facet edit, and the path agents should use.
<target> is skill, agent, command, or facet. There is no server target: MCP server declarations are edited in facet.json directly. [directory] defaults to the current directory and must contain a facet.json.
Requires v0.24.0 or newer.
Examples
Flags
boolean
Add a new text asset: manifest entry plus a scaffolded starter file.
boolean
Remove a text asset: manifest entry plus its file.
string
Rename a text asset to the given name.
string
Set the text asset’s or facet’s description.
JSON object
Set a text asset’s config for the named adapter, replacing that block.
boolean
Remove a text asset’s config for the named adapter.
facet target only
Set facet-level metadata.
boolean
Emit a machine-readable change summary.
Exit codes
Details
Changing an asset
For the text-asset targets, pass the asset name and at most one lifecycle action, optionally with field changes.--add creates the manifest descriptor and scaffolds the starter file at its conventional path. --rename renames the manifest key and moves the primary file, removing a now-empty skill directory. --remove drops the descriptor and deletes the file.
facet modify operates on text-asset primaries. To adopt, move, or reconcile a skill’s companion files or top-level supplementary files, use facet edit.Adapter configuration
Each text-asset descriptor may carry anadapters block: a map of adapter name to a config object the CLI passes to that adapter. Set one with a name-embedded flag whose value is a JSON object. The whole suffix after --adapter- is the adapter name, so hyphenated names such as claude-code work:
--remove-adapter-<name>:
--add or --rename, or stand alone. Hand-edits to the adapters object round-trip safely, because unknown descriptor fields are preserved.
Facet metadata
Thefacet target takes no text-asset name and sets facet-level fields. Pass at least one of --name, --description, --version, or --private.
What you cannot combine
- Exactly one lifecycle action per call. Combining
--add,--remove, and--renameis an error. --descriptionand adapter flags may ride along with--addor--rename, or stand alone.--removetakes no field flags.- Text-asset flags are not valid for the
facettarget, and facet-metadata flags are not valid for text-asset targets.
Troubleshooting
the asset already exists, or was not found
the asset already exists, or was not found
Cause:
--add names a text asset the manifest already declares, or another action names one it does not.Fix: check the current names with facet build --verify or by reading facet.json, then re-run against the right name.the rename target already exists
the rename target already exists
Cause: the new name is already taken in that text asset’s namespace. Skills and commands share one namespace, so a skill cannot take a command’s name.Fix: choose a free name, or remove the existing text asset first.
no facet fields were given
no facet fields were given
Cause:
facet modify facet was called with no metadata flag, so there is nothing to set.Fix: pass at least one of --name, --description, --version, or --private.the change would make facet.json invalid
the change would make facet.json invalid
Cause: the result fails manifest validation, for example removing the last asset, or setting a name that breaks the name grammar.Fix: the error names the offending field. Nothing was written, so correct the invocation and re-run.