Templates & Roles
A template defines an agent’s role — its job: purpose, instructions, and persona — as a small directory of files you can version, share, and reuse. Templates are harness-agnostic: the same code-reviewer role can run on Claude, Gemini, or any other supported harness. The harness-specific mechanics (container image, concrete model, auth) live separately in a harness-config, so a template stays portable across backends.
Templates work hand-in-hand with skills — reusable instruction snippets a template can bundle or pull from the Skill Bank. A role is the “who”; skills are the “how-to” capabilities you graft onto it.
What a template is
Section titled “What a template is”A template is a directory. Its name is the directory name — there is no name field to keep in sync. A typical template looks like this:
code-reviewer/├── scion-agent.yaml # role configuration (the only file Scion parses)├── agents.md # operational instructions for the agent├── system-prompt.md # the core persona / role definition├── home/ # optional: portable dotfiles copied into the agent's home│ └── .config/│ └── my-tool.conf└── skills/ # optional: template-mounted skills (see Skills, below) └── review-checklist/ └── SKILL.mdOnly scion-agent.yaml is required for Scion to recognize the directory as a template. Everything else is referenced from that file.
scion-agent.yaml
Section titled “scion-agent.yaml”The config file drives the role. Fields that point at content — agent_instructions, system_prompt — accept either a filename (resolved relative to the template directory) or inline text. The convention is to keep prose in separate .md files:
- A single-line value names a file. It must be a relative path inside the template directory (not an absolute path, no
..component, and not.; a single-line value that is not a local relative path is refused with an error). If a template in the chain has that path and it cannot be read as a valid content file, loading fails with an error (template content file refused) instead of using the value as inline text; only when no template in the chain has that file (ErrNotExist) is the value used as inline text. - A value with a line break is always inline text and is never looked up as a file.
- A content file must be a plain regular file of at most 4 MiB inside the template directory, reached without following a symbolic link. A symbolic link at the file or at any directory on its path, a non-directory path component, a hard link, directory or device, a file larger than 4 MiB, or an unreadable file (permission denied) is refused with an error; replace a link with the file or directory itself, or use multi-line inline text.
- The same rules apply when Scion checks for
agents.mdorsystem-prompt.mdby convention (TemplateHasContentFile); a file that would be refused is not picked up. - A system prompt file that is empty or holds only the default template’s
# Placeholdercounts as no system prompt: Scion does not stage~/.scion/harness/inputs/system-prompt.md(and a start-time re-render removes any placeholder recorded earlier in the control-plane inputs directory), so the harness keeps its own prompt. Because thedefaulttemplate is layered under every template, a template without its ownsystem-prompt.mdinherits this placeholder and gets no system prompt. Inlinesystem_promptcontent is staged as given. scion-agent.yaml(or.yml,.json) itself must be a regular file of at most 4 MiB, reached without a symbolic link; a linked config file is refused with an error.
schema_version: "1"description: "Senior code reviewer — correctness, readability, security, performance"
agent_instructions: agents.md # file reference (or inline text)system_prompt: system-prompt.md
default_harness_config: antigravity # harness-config to use when none is given
env: REVIEW_STRICTNESS: high
model: large # portable size alias — see Model size aliases
skills: - uri: "gh://scion-frontiers/agent-team/pr-code-review"Common fields:
| Field | Purpose |
|---|---|
schema_version |
Schema marker; use "1". |
description |
Human-readable summary of the role. |
agent_instructions |
Path to (or inline) operational instructions, mounted as the harness’s agent instructions file. |
system_prompt |
Path to (or inline) the system prompt / persona. |
default_harness_config |
The harness-config to use when the user does not pass one. |
model |
Model size alias (small, medium, large, extra-large) — see Model size aliases. |
skills |
Skill references to resolve at provision time — see Skills. |
env |
Environment variables for the job’s own tools: a fallback, see Template env. |
mcp_servers |
MCP server definitions, translated per harness. |
secrets |
Names of the secrets the job requires (values come from user, project, hub or broker secrets). |
services, max_turns, max_model_calls, max_duration, thinking_level, command_args, task_flag |
Further job settings. |
message_mode |
Hub only: the initial message mode for agents created from the template. With none (sealed), give the task when you create the agent: later messages are refused unless a super-admin sends them (see Piercing). |
A max_turns or max_model_calls of 0 means no limit and overrides the hub and broker default limits (taking effect on Runtime Brokers that advertise the unlimitedCountLimits capability); leave the key out to inherit them. Older versions accepted 0 silently and treated it as “inherit”, and the Runtime Broker logs each template that sets a count limit to 0 when provisioning an agent.
The full field reference is Agent Configuration (scion-agent.yaml).
A template describes the job, not the environment
Section titled “A template describes the job, not the environment”A template sets job keys: what the agent does. Where and how it runs comes from the harness-config, settings and profiles, the hub and the project. The environment keys image, resources, volumes, kubernetes, hub and telemetry are ignored in a template, with a warning (template <name> sets environment key(s) <keys>; ignored (environment comes from settings)). The template still loads, and a hub admin can list affected templates with GET /api/v1/admin/validate-resources.
| You want to set | Put it in |
|---|---|
| Container image | The harness-config’s config.yaml image, or settings harness_configs.<name>.image / a profile harness_overrides.<name>.image |
| CPU, memory, disk | Settings default_resources, profile resources / harness_overrides, hub agent_defaults.resources, or the project’s resource defaults |
| Volumes | Settings harness_configs.<name>.volumes, or the harness-config |
| Kubernetes settings | Settings runtimes and profiles |
| Telemetry | Settings telemetry, the hub telemetry config, or project telemetry policy |
A single agent can still set image, resources, volumes and kubernetes in its own inline config (--config); its inline telemetry can only turn telemetry on or off. Project defaults and the requester override a template’s job keys; hub agent_defaults fill only what the template leaves unset. See Settings Precedence.
Template env
Section titled “Template env”env: in a template is for the tools the job ships with. Each variable is a fallback:
- It applies only when no other source sets the key: settings and harness-config env, hub, project and user env, request env, secrets, and the auth, harness and telemetry env the runtime adds all win over it.
- Values are literal.
${VAR}is not expanded, and an empty value is not filled from the broker host. SCION_*keys are ignored.- No key the harness-config’s auth metadata lists (its
required_env,required_filesalternative andautodetectenv keys) is ever filled from a template. Supply credentials as secrets or hub env. - Edits take effect on the agent’s next start: the broker reads the template’s current env on every start, and never stores it in the agent’s config.
- A template
TZis not applied to Hub-dispatched agents; see Times and Timezones.
Creating an agent from a template
Section titled “Creating an agent from a template”You reference a template by name (or by path/URI) with the --type / -t flag:
# Provision and launch an agent from the code-reviewer templatescion start my-review my task... --type code-reviewer
# Explicitly choose the harness-config as wellscion start my-review --type code-reviewer --harness-config gemini
# Provision without starting (writes the agent dir + prompt.md for later)scion create my-review my task... --type code-reviewer# ...then start itscion start my-review--type also accepts an absolute path or a remote URI, so you can run a template straight from a repository without importing it first:
# Run a role directly from GitHub (deep path into the agent-team repo)scion start coord --type gh://scion-frontiers/agent-team/templates/coordinator
# Run from a locally cloned checkoutscion start coord --type ./templates/coordinatorThe CLI resolves a path or URI on your own machine and uploads the template to the Hub. What reaches the Hub, and from there a Runtime Broker, is always a template name (a single path component; an empty template name resolves the default template and never resolves a templates/ directory itself as a template) or a template ID: an agent create request or a scheduled dispatch_agent event or schedule that sets template in another form is refused (template must be a template name or ID). A project default template (scion.io/default-template) in another form is refused (the project's default template setting must be a template name or ID), and a Hub default template (agent_defaults.default_template) or a template name read back from agent-info.json in another form is ignored with a warning. A Runtime Broker loads a template directory by absolute path only from its own template cache or, when it runs with a Hub that stores files locally, from that Hub’s template storage. A remote default_template in the broker’s settings is still fetched.
Which harness-config is used
Section titled “Which harness-config is used”When you do not pass --harness-config, Scion resolves it in this order:
- CLI flag / request —
--harness-config(alias--harness), orharness_config/default_harness_configin the request’s inline config. Must be a single path component (harness config must be a harness-config name). - Project default — the project’s
scion.io/default-harness-configsetting. - Template default —
default_harness_configin the template’sscion-agent.yaml, else itsharness_config. When both are set,default_harness_configwins. - Hub default —
agent_defaults.default_harness_configon the hub. - System default —
default_harness_configin the active profile, then insettings.yaml.
If a project default, template default, Hub default, or recorded harness-config is not a single path component, the Hub drops that value with a dispatch warning (the <tier> harness config was ignored: it is not a harness-config name) and falls through to the next tier.
A Hub then looks the chosen name up among its harness configs. If the first match is archived or pending, the create fails with 400 naming the harness config, rather than falling through to another scope or to the Runtime Broker’s own harness configs; see Inactive Hub harness configs.
Template composition & inheritance
Section titled “Template composition & inheritance”Every non-default template automatically inherits the default template as a base layer. When an agent is provisioned, Scion builds a chain — default first, then your template — and layers them:
- Config is merged field-by-field (
MergeScionConfig): your template’s values override the base, maps likeenvandmcp_serversare unioned, andskillsare appended (so base skills are kept and yours are added). Environment keys are dropped from every template in the chain before the merge, and the chain’senvbecomes the template env fallback. - Content references (
agents.md,system-prompt.md) are resolved by walking the chain from most-specific to least-specific, so a file inherited from the base is still found even if your template doesn’t redefine it. home/files from the base are copied first, then overlaid by your template’shome/.
This is why a minimal template only needs a scion-agent.yaml plus the files it wants to override — common dotfiles and defaults come from default for free.
Mandatory Instruction Preamble Injection
Section titled “Mandatory Instruction Preamble Injection”To ensure consistent and reliable agent execution across the platform, Scion enforces a mandatory instruction preamble injection mechanism during the provisioning pipeline:
- What it is: Scion automatically loads all Markdown files from an embedded boilerplate filesystem (
mandatory_boilerplate/) and prepends them directly to the finalagent_instructionsfile inside the agent’s home directory. - Why it exists: This guarantees that every provisioned agent — regardless of template, role, or harness choice — is seeded with critical platform contracts before starting.
- Embedded contents:
- Workspace Orientation: Clear explanations of
SCION_WORKSPACE_MODE(shared-plain,worktree-per-agent,clone-per-agent,empty-per-agent),SCION_WORKSPACE_GIT, and how directories/shared volumes are mounted. - Agent Status Signals: Exact protocols directing the agent to explicitly declare its execution states via
sciontool status(e.g.sciontool status ask_user "<question>",sciontool status blocked "<reason>", orsciontool status task_completed "<task>"). This prevents false stall timeouts, handles notifications routing, and tracks progress. - Key Platform Skills: A short closing index of when to read
scion-messaging: always for messaging and decisions, plus entries for decision prompts, secret requests and command requests whileweb.decisions,hub.agent_secretsandhub.command_requestsare on.
- Workspace Orientation: Clear explanations of
- Experiment gates: The preamble uses the same
<!-- scion:experiment <id> -->blocks as platform skills (see Experiment gating), resolved from the agent’s experiment state at provisioning and at a start that re-renders the instructions; text for an experiment that is off is not written. - Template Isolation: Because this preamble is injected programmatically by the Hub or CLI, it cannot be overridden, removed, or bypassed by custom templates, securing baseline platform behaviors across all agents.
The final composition layers on top of the chosen harness-config:
- Harness-config base layer — runtime mechanics (image, model aliases, auth, base tool files).
- Template overlay — the role (config, prompts, instructions, skills).
- Runtime overrides — CLI flags and per-agent tweaks.
Skills
Section titled “Skills”Templates and skills are complementary: a template gives an agent its role, and skills give it reusable, harness-agnostic capabilities that are mounted into the harness’s skills directory at provision time. There are two ways a template delivers skills.
1. Template-mounted skills
Section titled “1. Template-mounted skills”Commit skill folders directly inside the template’s skills/ directory. They travel with the template and need no Hub:
web-builder/├── scion-agent.yaml├── agents.md└── skills/ ├── gcs-static-site/ │ └── SKILL.md └── gcs-auth-proxy/ ├── SKILL.md └── scripts/ └── main.goWhen the template chain is provisioned, Scion collects the skills from each template and mounts them into the harness-specific location:
| Harness | Skills directory |
|---|---|
| Claude | .claude/skills/ |
| Gemini | .gemini/skills/ |
When multiple templates are chained, skills from later templates overlay earlier ones. Each skill directory (template-mounted, Skill Bank, or platform skill) is installed as a whole into the harness’s skills_dir (which must be a relative path inside the Agent home: harness skills_dir must be a relative path inside the agent home) without following symbolic links in either the source or the Agent home, within a per-skill limit of 4096 entries, 64 MiB, and 32 directory levels. Symbolic links, special files, and regular files with more than one hard link in a skill’s source are skipped (still counting toward the entry limit), and a symbolic link or non-directory on the skill’s path in the Agent home or the skill’s source refuses the install.
2. Skill Bank references
Section titled “2. Skill Bank references”Instead of bundling files, declare skills by URI in the skills: list. These are resolved at provision time from the Skill Bank (a Hub-backed registry) or a federated source such as GitHub:
schema_version: "1"description: "Project coordinator — delegates implementation, drives progress"agent_instructions: agents.mdsystem_prompt: system-prompt.md
skills: - uri: "gh://scion-frontiers/agent-team/agent-recovery" - uri: deploy-checklist # bare name → latest, default search order - uri: "skill://scion/global/notes@^1.2" # semver range - uri: "gh://my-org/skills/linting" # federated GitHub source as: lint-rules # mount under a different name - uri: "skill://scion/user/alice/scratch" optional: true # skip (with a warning) if it can't be resolved or installedEach entry supports uri (required), as (mount under a different name), and optional (continue provisioning if it can’t be resolved or installed; the skipped skill is logged as a warning). For the full URI grammar, scopes, versioning, and the scion skills publishing workflow, see Skills — Authoring & Publishing and Skill Registry & Federation.
The team-creation skill
Section titled “The team-creation skill”Scion ships a built-in team-creation skill for generating coordinated multi-agent template sets. It scaffolds orchestrator-worker patterns with best-practice guidance for agent-to-agent communication and template structure — a fast way to bootstrap a whole team of roles rather than hand-writing each template.
Built-in vs custom templates
Section titled “Built-in vs custom templates”default— the built-in template shipped inside the Scion binary. It seeds commonhome/dotfiles and the baselineagents.mdstatus-signaling instructions, and it is the base layer every other template inherits. Your local copy is protected:scion templates deleterefuses to delete the localdefault, andscion templates update-defaultrefreshes it from the binary (--forceto overwrite an existing copy). The Hub copy can be deleted, and a deleted Hub copy is not re-created when the Hub restarts; see Recovering a deleted built-in to bring it back.- Custom templates — anything you create, clone, or import. They live in one of two scopes.
Template locations & resolution order
Section titled “Template locations & resolution order”| Scope | Location |
|---|---|
| Project | .scion/templates/<name>/ (in the current project) |
| Global | ~/.scion/templates/<name>/ (your machine) |
When you reference a template by bare name, Scion searches in this order and uses the first match:
- Remote URI (GitHub URL / deep path, archive, or rclone) — fetched and cached.
- Absolute path to a template directory.
- Project templates (
.scion/templates/). - Global templates (
~/.scion/templates/).
A template name (anything that is not a remote URI or an absolute path) is a single path component, with no /, \, .., ., leading : or ://. A name in another form (for example team/reviewer) is refused rather than looked up. The same rule applies to harness-config names. The Hub and store refuse such a name on every write (CreateTemplate, UpdateTemplate, CreateHarnessConfig, UpdateHarnessConfig, create, rename, clone or import) with name must be a single path component, and when an agent create request names a template (template must be a template name or ID) or harness-config (harness config must be a harness-config name). scion templates pull and scion harness-config pull without --to build the destination directory only from a name in that form.
When connected to a Hub, templates resolve from the Hub across three scopes. If a name matches in several locations, the CLI prompts you to choose; the --local, --hub, and --global flags narrow the search (templates delete defaults to project scope and takes --scope <project|global|user> or --global; templates sync/push and templates update also take --scope <global|project|user>).
Hub Template Scopes
Section titled “Hub Template Scopes”When connected to a Hub, templates exist across three scopes with strict isolation:
- User Scope: Personal templates strictly isolated to your user account. These are managed via the Web UI Profile page, the Hub store listing, or the CLI. Scion enforces strict authorization ownership (via
ScopeID) on list and create operations to guarantee scope isolation and prevent cross-user access or template poisoning. - Project Scope: Shared templates bound to a specific Hub project, available to all members of that project.
- Global Scope: Hub-wide templates available to everyone, maintained by users who hold the global template permissions.
Global template authoring permissions
Section titled “Global template authoring permissions”Writing global templates needs the global template permissions, which only hub-level roles grant: template.create_global to create a global template, clone a template into the global scope on the Hub, import templates into the global catalog or refresh a global template from its source; template.update_global to change a global template’s files; and template.delete_global to delete one. The global-catalog-author role grants all three (with the matching global skill permissions) to non-admin users, and hub-admin holds them as well. The plain template.* permissions do not cover global templates, and creating a global template gives its creator no rights over it: the creator is recorded for audit only.
Importing into the global catalog, or refreshing a global template, needs only template.create_global, even when the template already exists, so it can replace the files of an existing global template.
In the web UI, the global Templates tab on the settings page offers Import, Clone and Refresh All from Source only to users who can create global templates, and offers Delete on each template only where you may delete it. The Refresh from Source button on a template’s detail page is shown regardless; the Hub still refuses the refresh without template.create_global. For CI, use a hub token with the global scopes. See Global catalog authoring for the full model.
In the Web Dashboard’s New Agent creation form, templates are automatically clustered and ordered by scope in the dropdown:
User Templates > Project Templates > Global TemplatesVisual separators clearly segment these categories, ensuring your personal, customized templates are always at the top of the dropdown for fast access.
Hosted Hub template resolution stays project-first (matching the CLI’s resolution order): when a bare template name is resolved for an agent, the Hub searches the agent’s project before global templates. Because a project-scoped template with the same name or slug as a global one would shadow it for every agent in the project—and because the CLI also matches templates and harness configs by name as well as by slug—a hosted Hub refuses to create, rename (PUT/PATCH), clone, or import a project-scoped template or harness config whose slug or name (as written or slugified) matches:
- an existing global template or harness config’s slug or name,
- a built-in template or harness-config name (even if its global row has been deleted), or
- for harness configs, an entry in the Hub’s global
harness_configssettings.
Refusals return 409 Conflict with error code global_name_reserved and details {"field": "slug" | "name", "reason": "shadows_global"}; choose a different name. User-scoped records (which resolve only for their own user) and workstation Hubs are not checked. A rename is checked whenever the name or slug changes; updating other metadata on an existing legacy row is allowed. When cloning a project on a hosted Hub, any legacy project-scoped template or harness config that shadows a global one is skipped with a warning rather than copied into the clone. A global record created later with the name of an existing project record is not refused.
The scion templates CLI
Section titled “The scion templates CLI”The command group is scion templates (singular scion template is an accepted alias).
Local management
Section titled “Local management”# List available templates (local, and Hub when connected), grouped by scopescion templates list
# Show a template's resolved configurationscion templates show code-reviewer
# Create a new template (seeded from the default template)scion templates create my-new-role
# Create in global scope instead of the projectscion --global templates create my-new-role
# Clone an existing template (local or Hub source) to a new local onescion templates clone code-reviewer my-custom-reviewer
# Delete a project template (alias: rm); defaults to project scopescion templates delete my-old-role
# Delete a global or user templatescion templates delete my-old-role --scope globalscion templates delete my-old-role --scope user
# Refresh the built-in default template from the binaryscion templates update-default --forceImporting existing agents
Section titled “Importing existing agents”scion templates import converts agent definitions into Scion templates and writes them into your project (or global) templates directory. It understands Claude Code sub-agents (.claude/agents/*.md), Gemini CLI agents (.gemini/agents/*.md), and existing Scion templates (copied directly, no conversion):
# Import a single Claude sub-agentscion templates import .claude/agents/code-reviewer.md
# Auto-discover and import everything under a project rootscion templates import --all .
# Import Scion templates from another repo (deep GitHub path)scion templates import --all https://github.com/scion-frontiers/agent-team/tree/main/templates
# Preview without writingscion templates import --dry-run .claude/agents/code-reviewer.mdUseful flags: --all (import every discovered agent), --harness/-H (force claude/gemini detection), --name (rename a single import), --force (overwrite), --dry-run (preview).
Hub commands
Section titled “Hub commands”When a Hub is enabled, these commands move templates between the local filesystem and the Hub:
# Upload a local template to the Hub (creates or updates; only changed files upload)scion templates sync code-reviewer # alias: scion templates push
# Sync every local project template at oncescion templates sync --all
# Sync to global or user scope, or under a different Hub namescion --global templates sync code-reviewerscion templates sync code-reviewer --scope userscion templates sync code-reviewer --name team-reviewer
# Sync a template directory by path (Hub name defaults to its base name)scion templates sync ./templates/code-reviewercd templates/code-reviewer && scion templates sync .
# Download a Hub template to the local filesystemscion templates pull code-reviewer --to .scion/templates/code-reviewer
# Compare local vs Hub (synced / out of date / local-only / hub-only)scion templates statussync and push accept a template name or a directory path. An argument that is . or .., is absolute, or contains a path separator (such as ./name) is a path: that directory is synced as is, and the Hub name defaults to its base name unless --name is given. A bare name is looked up in the project and global templates directories as before.
sync is content-aware: it hashes files and uploads only what changed, and templates carry a content hash for traceability (visible in scion templates list, scion templates show, and the Web UI). Syncing an existing template mirrors the local directory: files deleted locally are removed from the Hub copy, and sync lists them as it removes them.
On the Hub, a template’s files are stored as content-addressed blobs, and each commit swaps the template’s file manifest in one compare-and-swap step. If another commit changes the same template first, the losing commit gets 409 template_conflict and nothing is written; scion templates sync re-diffs against the new version and retries once (see the API Reference). Templates stored in the older layout keep working and move to blobs on their next commit. Blobs that are no longer referenced by any template are removed by a background collector after a grace period (24 hours by default), so an agent download that started from an older version still finds its files.
Beyond the CLI, project templates are a fully managed Hub-level resource with full CRUD, SDK, and Web UI support. A connected Hub can import a whole repository of templates server-side via the Load Templates action in the Web UI, and imported templates can be browsed, edited, and deleted directly within the dashboard (when discovering or importing workspace templates for a linked project whose recorded provider path ends in .scion, the Hub resolves paths from the checkout root, the parent of .scion). When the Hub bootstraps or imports a template directory (or any bundled harness-configs/<name> subdirectory inside it), it opens the collected directory as a root, reads only the regular files recorded during collection without following symlinks or replaced directories, and verifies each file’s size and SHA-256 digest on every read (scion-agent.yaml, config.yaml, and uploaded files).
Importing templates from a GitHub URL through the Hub
Section titled “Importing templates from a GitHub URL through the Hub”scion templates import-url <github-url> imports one or more templates from a GitHub folder URL directly on the Hub (mirroring Load Templates in the Web UI):
# Import all templates from a GitHub folder into the current projectscion templates import-url https://github.com/org/repo/tree/main/.scion/templates
# Preview discovered template names without writing anythingscion templates import-url https://github.com/org/repo/tree/main/.scion/templates --dry-run
# Import specific template(s) by namescion templates import-url https://github.com/org/repo/tree/main/.scion/templates --name code-reviewer --name planner
# Import into global or user scope (with --scope or root --global)scion templates import-url https://github.com/org/repo/tree/main/.scion/templates --scope globalscion templates import-url https://github.com/org/repo/tree/main/.scion/templates --scope userImport always overwrites templates with the same name in the target scope (skipping templates whose content hash is unchanged). Credentials are resolved server-side by the Hub from the target scope’s secrets (see Template and Harness-Config Imports); no GitHub token is sent from the CLI. In agent mode (full-role agents), --scope defaults to project, agents can only target their own project, and imports are create-only (existing templates and templates bundling an already-existing harness-config are refused).
scion templates show <name> displays the template’s redacted Source URL (in both text and --format json output) when set.
Sources a hosted Hub imports from
Section titled “Sources a hosted Hub imports from”A hosted Hub import, discovery, or harness-config reimport fetches the source on the Hub’s own host, so hosted Hubs restrict what they fetch. By default a hosted Hub accepts only https://github.com/... URLs (GitHub folders and archives on github.com, without query strings or fragments). An administrator can allow additional sources — https:// URL prefixes and Cloud Storage prefixes (gs://<bucket>/<prefix>, submitted as gs://... or :gcs:<bucket>/<prefix>) — with server.hub.allowed_import_sources in the settings file (no environment variable or API write). Other sources are refused: plain http://, the rclone :local: backend, other rclone backends, and connection strings with inline options are never accepted. HTTP downloads go to public addresses on port 443 only; github.com archive downloads follow redirects only to github.com and codeload.github.com (up to 3 hops, without credentials), redirects are blocked on allowlisted non-GitHub https:// sources, and a failed download reports neither the address nor the server’s response. Workstation hubs are exempt and keep fetching local and http:// sources as before.
Each hosted fetch is bounded. GitHub folder imports resolve the ref (branch, slashed branch, tag, or 40-character commit SHA) via the GitHub API without requiring git (and with no git checkout fallback). Small folders (up to 64 files and 4 MiB) are fetched per file from raw.githubusercontent.com at the resolved commit SHA; larger or truncated folders stream only the requested folder from the repository tarball in a single filtered pass:
- Hosted Hub GitHub limits: up to 2,000 regular files, 16 MiB per file, 32 MiB total written, 64 MiB compressed download, 512 MiB unpacked stream, 2 minutes per request, and 5 minutes total. Only the requested folder counts toward the file-count and written-byte limits (the compressed download and unpacked stream still cover the repository archive).
- Non-GitHub hosted sources (allowlisted
https://archives and Cloud Storage): up to 64 MiB download (2 minutes per request), 512 MiB unpacked, 256 MiB and 20,000 files and directories written, and 5 minutes total. Cloud Storage sources are counted before anything is copied and capped during sync. A.ziparchive’s central directory is checked before it is parsed: one that lists more entries than the file limit, entry names longer than 1,024 bytes, or a ZIP64 archive is refused.
On a workstation Hub and in the CLI (scion templates import, scion harness-config install, and remote --type URIs), GitHub folder fetches use the same fetcher without requiring git on PATH, honouring system proxy settings (HTTPS_PROXY), with local limits of up to 20,000 regular files, 64 MiB per file, 256 MiB total written, 1 GiB compressed download, 4 GiB unpacked stream, 2 minutes per request, and 10 minutes total. Non-GitHub sources (rclone, archives, and http:// URLs) remain accepted on the CLI and workstation Hubs.
Refreshing a Hub template from its source
Section titled “Refreshing a Hub template from its source”A template the Hub imported from a GitHub folder URL remembers that source URL, and can be refreshed from it later. A refresh replaces the template’s files with the current content of the source folder (a full overwrite, no merge):
# Refresh one Hub template from its stored source URLscion templates update code-reviewer
# Refresh from a different GitHub folder; it becomes the stored source URL if the refresh succeedsscion templates update code-reviewer --url https://github.com/myorg/templates/tree/main/code-reviewer
# Refresh every Hub template that has a GitHub source URLscion templates update --all
# Choose a scope when the same name exists in severalscion templates update code-reviewer --scope project
# Refresh a global template on a given Hub, with a token and no linked projectscion templates update code-reviewer --scope global --hub https://scion.example.comInside a project, templates update considers global and user templates plus the current project’s templates (use --project to pick another project); outside a project it considers every template you can see. In agent mode, --scope defaults to project and --url overrides are refused (agents can refresh a template only from its stored source URL).
A hard refresh failure makes the command exit non-zero, in both text and --format json output. If GitHub rate-limits the refresh and the template already has a valid stored commit and content hash at the same source URL (no --url override to a different URL), the Hub leaves the stored files and commit untouched and answers with status: "not_refreshed" (see POST /api/v1/templates/:id/reimport):
- Single template (
scion templates update <name>): printsnot refreshed, keeping <7-char sha> (GitHub rate limit exceeded; retry later)and exits0. With--format json, it exits0and emitsstatus: "warn"withdetailscarryingstatus: "not_refreshed",reason,count: 0,imported: [],keptCommit, andretryAfterSeconds. - All templates (
scion templates update --all): counts rate-limited templates separately from failures — printingUpdated X, not refreshed Y (rate limited), skipped Z (no GitHub source URL), failed Win text output, and in--format jsonsettingstatus: "warn"withdetails.notRefreshedanddetails.notRefreshedItemsalongsidedetails.failedanddetails.failures. It exits0when no hard failures occurred, and exits non-zero whenever one or more templates failed, even if others were kept.
Refreshing works only for sources in a GitHub repository: a folder on a branch (https://github.com/<owner>/<repo>/tree/<branch>/<path>), a branch’s root (https://github.com/<owner>/<repo>/tree/<branch>), or https://github.com/<owner>/<repo>[/<path>] on branch main. As a --url override, a bare repository URL (https://github.com/<owner>/<repo> or github.com/<owner>/<repo>) is read as that repository’s .scion/templates folder on branch main, the same as when importing. Folder names may contain letters, digits, spaces and . _ @ + -, and branch names letters, digits and . _ -. Built-in templates and templates created without a source URL cannot be refreshed: --all skips them, and the Web UI does not offer a refresh for them. The Hub checks the source URL each time, refuses URLs that include a username or password, and limits how large the download and the extracted folder may be and how many entries the folder may contain (directories count toward this limit as well as files). A refresh writes only into the named template, even when the source folder holds several: it uses the one folder named after the template’s name or slug, refuses a source with none or more than one such folder, and never creates a new template. A refresh does not touch harness-configs: a harness-configs/ folder inside the template’s source is stored as part of the template’s files, but no Hub harness-config is created or updated from it. It needs the same permission as importing a template into that scope (template.create_global for a global template; see Global template authoring permissions). A source in a private repository needs a repository credential in the template’s scope, the same one importing would use (see Template and Harness-Config Imports). With --all, each template’s refresh has its own time limit.
The Web UI offers the same action as Refresh from Source on a template’s detail page, and Refresh All from Source on the templates list, which refreshes a few templates at a time. When a rate-limited refresh keeps the prior commit, the detail page shows a warning status message and Refresh All from Source marks kept rows with a warning icon and reports them separately in the summary toast. The detail page shows the stored source without any username or password; sources that are not web URLs are shown as “non-web source”.
When the hub.template_drift_warning experiment is enabled on the Hub, creating an agent from a GitHub-sourced template whose source repository matches the project’s workspace repository checks whether the template folder has changed on its source branch since the template’s recorded source_commit (cached, 2-second budget, fail-open). If it has changed, the Hub returns an advisory warning suggesting scion templates update <name> (or Refresh from Source) without blocking agent creation.
For the condensed command list, see the CLI reference.
Harness-configs
Section titled “Harness-configs”A harness-config is the counterpart to a template: it holds the runtime mechanics a template deliberately omits, so roles stay harness-agnostic. Harness-configs live in ~/.scion/harness-configs/ (global), .scion/harness-configs/ (project), or a template’s own harness-configs/<name>/ directory (see precedence). Each contains:
config.yaml— runtime parameters (container image, model aliases, auth type).home/— base files copied into the agent’s home directory (e.g..claude.json,.gemini/settings.json).
Model size aliases
Section titled “Model size aliases”Templates should express model choice with abstract size aliases — small, medium, large, extra-large — rather than provider model names. The shorthand tiers s, m, l, and xl are accepted too, case-insensitively (so L means large). Each harness-config maps those aliases to real models:
harness: claudeimage: scion-claude:latestmodel_aliases: small: haiku medium: sonnet large: opusharness: gemini-cliimage: scion-gemini-cli:latestmodel_aliases: small: gemini-flash-lite medium: gemini-flash large: gemini-proA template that sets model: large then resolves to opus under Claude and gemini-pro under Gemini — the same role, portable across harnesses. Concrete model names still pass through unchanged (for backward compatibility) but tie the template to one harness.
Customizing and creating variants
Section titled “Customizing and creating variants”Edit the files in a harness-config directory to change defaults (for example, remap large to a newer model, or add a persistent CLI flag in home/.gemini/settings.json). Copy the directory to make a variant:
cp -r ~/.scion/harness-configs/gemini ~/.scion/harness-configs/gemini-experimentalscion start test-agent --type default --harness-config gemini-experimentalIf you break a stock harness-config, restore the factory defaults:
scion harness-config reset geminiSharing templates
Section titled “Sharing templates”A template is just a directory, so sharing is straightforward:
- Version it in a repo. Commit templates under
.scion/templates/(or a dedicated repo like scion-frontiers/agent-team) and reference them bygh://URI or import them withscion templates import. - Publish to a Hub.
scion templates syncuploads a template so teammates on the same Hub can create agents from it by name. - Bundle capabilities as skills. Pull shared behavior out into skills — either template-mounted or published to the Skill Bank — so multiple roles can reuse them.
See also
Section titled “See also”- Skills — Authoring & Publishing — author, version, and publish reusable skills.
- Skill Registry & Federation — Hub-side registry administration and external sources.
- Scion CLI Reference — the full
scion templatescommand list. - scion-frontiers/agent-team — a real-world library of roles and skills.