Usage
Requires the facet CLI v0.24.0 or newer. If
facet modify reports “Unknown command”, update with facet self-update.facet modify is the headless, flag-driven counterpart to the interactive facet edit wizard. It applies one change to a facet’s facet.json (and its asset files) and exits — the path AI agents and scripts should use for authoring. See facet instructions authoring.
<target> is one of skill, agent, command, or facet. [directory] defaults to the current directory and must contain a facet.json.
Flags
boolean
Add a new asset (scaffold + manifest entry).
boolean
Remove an asset (delete file + manifest entry).
string
Rename an asset to the given name.
string
Set the asset’s (or facet’s) description.
JSON object
Set an asset’s config for the named adapter (replaces the block).
boolean
Remove an asset’s config for the named adapter.
facet target only
Set facet-level metadata (
facet modify facet ...).boolean
Emit a machine-readable change summary.
Exit codes
Editing an asset
For the asset targets (skill, agent, command), pass the asset name and at most one lifecycle action, optionally with field changes.
Add an asset
Creates the manifest descriptor and scaffolds the starter file (skills/<name>/SKILL.md, agents/<name>.md, or commands/<name>.md). May carry a description and adapter config in the same call.
Change a description
Rename an asset
Renames the manifest key and moves the asset’s file (removing the now-empty skill directory, for skills).Remove an asset
Removes the manifest descriptor and deletes the asset’s file.Adapter configuration
Each asset descriptor may carry anadapters block: a map of adapter name to a free-form config object that the CLI passes through to that adapter at install time. 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 like claude-code work:
--remove-adapter-<name>:
--add or --rename, or stand alone. You can also hand-edit the adapters object in facet.json directly; edits round-trip safely because the CLI preserves unknown descriptor fields.
Editing facet metadata
Thefacet target sets facet-level fields (it takes no asset name). Pass at least one of --name, --description, --version, or --private.
Validation
After every mutation the resulting manifest is re-validated before anything is written. A change that would makefacet.json invalid (for example, removing the only asset) is rejected and nothing is written.
Rules
- Exactly one lifecycle action per call:
--add,--remove, or--rename. Combining them is an error. --descriptionand adapter flags may ride along with--addor--rename, or stand alone as an update.--removetakes no field flags.- Asset flags (
--add/--remove/--rename) are not valid for thefacettarget, and facet-metadata flags (--name/--version/--private) are not valid for asset targets.