palm create
palm create writes a template into an in-repo source, declares that source in palm.yaml when needed, and installs the new entity.
palm create <kind> <name> [--in <dir>] [--description <text>]Alias: palm new.
| Command | What it does |
|---|---|
palm create skill release-notes |
Write agent-kit/skills/release-notes/SKILL.md and install it. |
palm create agent reviewer --description 'Review a diff for bugs before merge.' |
Write an agent with that description. |
palm create instruction commit-style |
Write agent-kit/instructions/commit-style.md. |
palm create hook format |
Write agent-kit/hooks/format/hooks.json and an example script, then ask for consent. |
palm create skill triage --in tools/agents |
Use another in-repo folder as the source. |
palm create skill style -g |
Write into ~/.palm/kit and install into your home directory. |
palm create skill style -g --in ~/dotfiles/palm/kit |
Write into another folder under your home, such as a dotfiles checkout. |
$ palm create agent reviewer --description 'Review a diff for bugs before merge.'+ wrote agent-kit/agents/reviewer.md+ source ./agent-kit → palm.yaml+ agent reviewer .claude/agents/reviewer.md 1 file1 installed. Commit palm.yaml, palm.lock.yaml, agent-kit/ and .claude/ together.edit agent-kit/agents/reviewer.md, then run: palm install$ palm create instruction commit-style+ wrote agent-kit/instructions/commit-style.md+ instruction commit-style .claude/rules/commit-style.md 1 file1 installed.edit agent-kit/instructions/commit-style.md, then run: palm install
Warnings ! instruction commit-style: the description is a placeholder (TODO: describe …) that every harness lists; write one in agent-kit/instructions/commit-style.md, or pass --description$ find agent-kit -type f | sortagent-kit/agents/reviewer.mdagent-kit/instructions/commit-style.md$ cat palm.yamltargets: [claude]sources: ./agent-kit: agents: [reviewer] instructions: [commit-style]The Publish your own source guide shows a skill from template to published repository.
Options
Section titled “Options”| Argument | Meaning |
|---|---|
kind |
skill, agent, instruction or hook |
name |
the new entity |
| Option | Meaning |
|---|---|
--in <dir> |
the source directory (default: the in-repo source, else ./agent-kit) |
--description <text> |
the description in the template |
--review |
print the scripts of a hook first; with –dry-run, only print |
The global options also apply.
Templates
Section titled “Templates”| Kind | File written |
|---|---|
skill |
<dir>/skills/<name>/SKILL.md |
agent |
<dir>/agents/<name>.md |
instruction |
<dir>/instructions/<name>.md |
hook |
<dir>/hooks/<name>/hooks.json, with an example script beside it |
When the source has a layout: for that kind, palm places the template by its first glob instead, so the new file is one the source indexes.
Each template has name and description frontmatter where the kind uses it, and a short body to replace.
command is not a kind. Asking for one stops with a usage error that names palm create skill.
Behavior
Section titled “Behavior”- palm checks everything before it writes: the targets, the
--infolder, and the name. A name the source already indexes, or one another source installed for this kind, stops it withE_CONFLICT, and nothing is written. - palm writes the template into
<dir>: by default the one in-repo sourcepalm.yamldeclares, else./agent-kit(~/.palm/kitwith-g). An existing file stops it withE_CONFLICT. - When
palm.yamldoes not declare<dir>yet, palm adds it and prints+ source ./agent-kit → palm.yaml. - palm installs the entity as
palm install ./agent-kit <name>would. A hook shows its command and script and asks for consent.
When the install fails or you decline, palm.yaml and the lock stay as they were, and a declined hook exits 130.
Without a terminal a hook stops with E_UNTRUSTED_EXEC; the template stays, and the printed then: line installs it.
palm asks no questions and opens no editor. Open the file yourself, and run palm install after each edit.
The in-repo source is the truth, so palm check fails until the harness copies match it.
Under -g, the default folder is ~/.palm/kit, declared as ./kit in ~/.palm/palm.yaml.
--in may name any folder under your home, and palm stores it relative to ~/.palm or your home.
A dry run and the real run check the folder and the name the same way, so --dry-run stops with the same E_CONFLICT for a name another source installed.
--review works as it does for palm install: for a hook, it prints the script before the consent question.
Reads and writes
Section titled “Reads and writes”| File | Writes |
|---|---|
<dir>/<kind folder>/<name>... |
the template |
palm.yaml |
the in-repo source, on first use, and the entry |
palm.lock.yaml |
the entry, with its content hash |
| harness files | the rendered entity for every target |
Exit codes
Section titled “Exit codes”| Code | When |
|---|---|
0 |
The template was written and installed. |
1 |
The file or the name exists, the install failed, or a hook needs consent without a terminal. |
2 |
A missing or unknown kind, command as the kind, or an invalid name. |
130 |
You declined consent for a hook, or pressed Ctrl-C. |