/decocms-studio:decocms-studiofrom decocms-studio
Operates deco Studio (decocms) from the terminal: manages sessions, orgs, tools, sandboxes, threads, agents, and task boards via the decocms CLI.
Ships in decocms-studio. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Every call goes through the decocms CLI, which holds the user's OAuth
session and refreshes it. The CLI is the only thing that touches the token:
call Studio with decocms api and decocms tools, and leave the session files
in the data dir alone.
Run the CLI as decocms when it is on PATH, otherwise bunx decocms@latest.
An Unknown command: tools error means a cached old version; rerun with
bunx decocms@latest.
The CLI runs on Bun, also when started with npx. If bunx is not found, ask
the user before installing Bun with curl -fsSL https://bun.com/install | bash
(Windows: powershell -c "irm bun.com/install.ps1 | iex"), then call
~/.bun/bin/bunx until a new shell has it on PATH.
decocms auth whoami # prints Target and User when logged in
When whoami or any call says Not logged in or Could not refresh session,
give the user the decocms auth login command it prints to run in their own
terminal (it opens a browser for them to approve), wait for them, then retry.
The session refreshes itself, so this is normally needed once per machine. Do
not work around a missing session with API keys, MCP tokens or presigned URLs.
A self-hosted or local studio adds --target <url> to every command, e.g.
--target http://localhost:3000.
Inside a Studio sandbox run the session is provided: never run
decocms auth login or pass --target there. If a call says it is not logged
in, the session expired, or it cannot refresh, report that error to the user
instead of asking them to log in.
Done when whoami prints the user the person expects. Its Target is the
studio origin used in the links below.
Every org-scoped call needs the organization's slug, the first path segment
of a studio URL (https://studio.decocms.com/<slug>/...). List the user's
organizations and pick the one they mean; ask when several fit:
decocms orgs # slug<TAB>name per organization; --json adds ids
When the user names a project instead of an org, search across their orgs:
decocms api "/api/_me/projects/search?q=<term>" returns each match's orgSlug.
Tools are the main surface: the web app calls the same ones. Each tool's input schema is the documentation, so look it up instead of guessing fields.
Org files are the exception: use the fs routes in section 4. They cover
listing, moving and sharing, which no tool does.
decocms tools list --org <slug> thread # NAME<TAB>summary, name matches first
decocms tools describe COLLECTION_THREADS_LIST --org <slug> # one line per input field
decocms tools call COLLECTION_THREADS_LIST --org <slug> -d '{"limit":5}'
decocms tools call <NAME> --org <slug> -d @args.json # or -d @- for stdin
call prints the tool's JSON result and exits non-zero on failure, with the
error body still on stdout:
400 {"error":"Invalid input","issues":[...]}: fix the arguments against describe.403 {"error", "code"?}: the user lacks the permission, or a code names a
plan or budget refusal. Report it; a retry gets the same answer.404 Unknown tool: the name is wrong; search with tools list.Use the field names exactly as describe prints them; add --json for the full
schema. When describe lists destructiveHint (delete, remove, overwrite),
get the user's explicit go-ahead for that specific call.
Some features have no tool: the org filesystem (the Library), sending a message
to an agent and streaming its reply, object storage bytes, thread outputs, and
the event stream. Reach them with decocms api, which works like gh api:
decocms api "/api/<slug>/fs/home/list?path="
decocms api "/api/<slug>/fs/home/file?path=notes/a.md" -X PUT -H "Content-Type: text/markdown" -d @a.md
-d takes a literal, @file, or @-; with -d the method defaults to POST.
Literals and stdin are sent as JSON and @file by its extension; -H overrides. Paths must start with / on the session's studio.
Read rest.md for each route's contract before calling it.
A file is in the Library once GET fs/<vol>/stat returns its entry; check that
before telling the user it is there. Then link it, with <target> from
whoami and the query values URL-encoded:
<target>/<slug>/library?path=<vol>/<folder>&preview=<vol>/<path><target>/api/<slug>/fs/<vol>/read?path=<path>. It opens only
for org members until the file is shared.Share a file only when the user asks, and confirm the mode first: public
lets anyone with the link read it, password asks for a password you set and
hand back to the user. See POST fs/<vol>/public in rest.md.
A sandbox belongs to a chat: the chat id is the sandbox id, and the same chat shows up in Studio. Create one, then run commands in it or message its agent:
decocms sandbox new --org <slug> --repo <owner/name> # prints the chat id; the boot continues in the background
decocms sandbox exec <chat-id> --org <slug> -- git status
decocms sandbox chat <chat-id> "run the tests and fix what fails" --org <slug>
new: --repo clones one of the org's linked repositories (owner/name
or its id). An unknown name fails and lists the linked ones. Leave out
--repo for an empty sandbox. --project <id> uses that project's own
repository instead and cannot be combined with --repo.exec: exits with the command's exit code, prints its stdout and stderr,
and has no stdin or TTY. Pass one quoted argument to run it as a shell script
(-- 'cd app && bun test'). It times out at 30s, or --timeout <s> up to
120; a timeout exits 124. The first exec waits for the boot.chat: streams the agent's reply to stdout, and tool names to stderr, until
the turn finishes.Use these commands rather than calling THREAD_SANDBOX_START yourself: exec
and chat reach routes that no tool covers.
thread.COLLECTION_VIRTUAL_MCP_*, ids like vir_...).
The org's default agent is Decopilot, id decopilot_<orgId>.--project takes its agent id.COLLECTION_CONNECTIONS_*).home, outputs, uploads).What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub decocms/studio --plugin decocms-studioOther plugins' skills for the same job