default_template decides which skills, MCP servers, credentials and guardrails its sessions load. This page is the operational counterpart to Give it tools: the exact runtm-api template commands, what to read in their output, and the order that avoids silent failures.
Every command here needs an org-scoped API key. The org is read from the key itself. --org and RUNTM_ORG_ID cannot stand in for one, and a personal key that names an org is rejected with 403.
Recipe: discover what exists
template get:
Recipe: verify a template loads the skills you think it does
The two ways to get this wrong are both silent: a skill created but never attached, and a skill attached after the last build. One command reports both.
Three commands answer the same question. Use whichever you reached for first;
template get is the only one that also reports staleness.
template get | jq .mcp_servers, template mcp <template_id>, mcp list --template <template_id>. Scoped listings include org-wide items attached with --all, because those load too.
Recipe: attach skills and MCP servers, then build once
Creating a skill or MCP server attaches it nowhere. Attach it to a template and every session from that template loads it.skills and mcp share the same verbs.
--templateand--repoare repeatable and can be mixed in one call.--allis mutually exclusive with both and supersedes them.attachmerges with the current scope; repeated calls add. Pass--replaceto set the exact scope wholesale.detachremoves the named--templateor--repo,--allremoves the all-repos attachment,--clearremoves everything.- Only org-owned skills and MCP servers can be attached. Personal directives cannot.
template get once, then issue one template build. Attaching or detaching needs context:write on the key.
Recipe: create a new template
--display-name and --github-repo are required. --name sets the slug (derived from the repo if omitted). --tier is basic, standard or max. Pass --build to trigger the build in the same call.
Faster: clone-only build with --skip-agent
--skip-agent runs a clone-only build with no AI step and implies --build, so steps 2 and 3 collapse into one command. Use it when the repo only needs cloning and setup finishes inside a session.
--skip-agent builds immediately, anything you attach afterwards leaves the template stale. When you know the skills in advance, create without --skip-agent, attach, then build once. --skip-agent on the standalone template build skips the AI step on a rebuild the same way.
Recipe: declare session arguments
Session arguments are values a member supplies when launching a session from the template. Each is injected into the sandbox as an environment variable. Declare them ontemplate create or template update with the repeatable --session-arg flag.
A
select argument needs a non-empty options array. label defaults to the key.
create, session arguments are applied through a follow-up PATCH, so they work with or without --build. On update, --session-arg replaces the whole set; pass every argument you want to keep.
--template-args KEY=VALUE (repeatable or comma-separated, only valid with --template-id). Omitted optional arguments use their default; a missing required argument is rejected.
Recipe: template context and what a session actually receives
Template context is the instruction block injected into every session from the template, layered after the org instructions. It applies to new sessions immediately, no rebuild.resolve is the debugging question: it shows the org block, the template block, and the merged text a session receives. The full layering is on Instructions.
Recipe: template-scoped guardrails
Guardrails that apply only to sessions from this template, layered on top of the org set. Three types:allowlist, hook, network.
runtm-api guardrails rules|hooks|network and attach per template or repo like skills. resolve shows the combined outcome either way. When to add guardrails, and why last, is on Add guardrails and approvals.
Recipe: owning groups and auto-rebuild
--owner-team on update as well.
Recipe: fix a broken template
When a build fails, or sessions from the template can no longer run because dependencies drifted,fix-session boots the template’s sandbox so an agent can repair it, and save-snapshot promotes the repaired sandbox to the template.
save-snapshot waits up to --timeout seconds (default 180) for the snapshot to complete. This is the same recovery an admin performs from the dashboard.
Recipe: monitor builds and rebuild after changes
template build yourself. A fast rebuild without a full reinstall runs automatically when only instructions or skill files changed.
Recipe: template secrets
Templates declare the environment variable names they need. Values are encrypted at rest and injected into every session from the template.Recipe: clean up
Permissions
On a
403, run runtm-api auth status and check both the key’s scopes and the user’s org role.
Definition, connection, attachment
An integration is three separate objects. They live in different places and only one of them ever holds a secret.
Rule of thumb for a coding agent: build definitions and attachments; send the person to the dashboard to create connections, so secrets never pass through the agent.
tools create --credentials and MCP --env or --header can carry a secret for non-interactive automation, but they are not the path for a secret a person is handing you.
Adding a new integration follows the same five steps every time: research every way to reach the service (MCP server, ready-made skill, CLI, SDK, REST API), weigh the auth methods (OAuth, API key, service account file), let the person pick the combination, build the definition, then hand off to the dashboard to connect. Prefer an existing MCP server or skill when a good one exists, then a CLI wrapped in a skill, then SDK or API recipes in a skill. Check runtm-api tools providers list before defining a provider that already exists.
CLI details the Build pages omit
The Build pages show the common path. These flags exist for the rest. Skills and MCP servers (runtm-api skills, runtm-api mcp, same verbs):
resync, lock, unlock and facets exist on mcp as well. Common flags on every list: --page-size, --page-token. Every delete needs --yes.
Tool connections (runtm-api tools, static credentials only; OAuth connects in the dashboard):
runtm-api tools providers, org-admin key with integrations:write):
ProviderSchema: --name (required), --logo, --icon, --tagline, --description, --category, repeatable --package NAME=SPEC (mise specs: latest, npm:pkg, github:owner/repo, cargo:crate, ubi:owner/repo), and --auth-methods '<json>' (at least one). For full control pass --schema '<json>' or --schema-file <path>; flags apply on top. --oauth-secrets '{"<method_id>":{"client_id":"...","client_secret":"..."}}' attaches OAuth app credentials per method. Always pass --logo; without it the dashboard card shows a generic glyph. To find a package spec, call GET /api/cloud/knowledge/package-search?backend=mise|npm|cargo|homebrew|github&q=<name>; each hit returns the mise_spec to use in --package.
Gotchas
- Created is not attached, attached is not built. Two silent failures;
template getexposes both asskills: []andattachments_changed_since_build: true. --skip-agentbuilds immediately. Attach first when you can, or expect one moretemplate build.--session-argonupdatereplaces the set. Pass every argument you want to keep.- Personal key. Every
template,skills,mcpandtoolscommand needs an org-scoped key;--orgdoes not substitute. - Template context needs no rebuild; attachments do. Instructions apply to the next session. Skills and MCP servers apply after the next build.
--allsupersedes scoped attachments. Switching a skill to--allreplaces its template and repo attachments.