Prefill and Placeholders
Skill content carries two complementary template mechanisms that the runtime processes before handing the Skill to an agent. Placeholders are tokens embedded directly in the content — {{type:reference}} — that are substituted with tool descriptions, resource references, user input, or shared-list values at resolution time. Prefill goes one step further: a Skill can declare tool calls in a prefill array that the runtime executes up front, then embeds the live results into the content via {{prefill:...}} tokens, so the agent receives a Skill already populated with current data.
Placeholder Syntax
Section titled “Placeholder Syntax”All placeholders use double-brace syntax: {{type:reference}} or {{type:reference:field}}.
Complete Placeholder Table
Section titled “Complete Placeholder Table”| Syntax | Resolves To |
|---|---|
{{tool:ns/name}} | Complete tool block (description + parameters) |
{{tool:ns/name:description}} | Tool description only |
{{tool:ns/name:parameters}} | Parameter table only |
{{tool:ns/name:test}} | First test case as example call |
{{tool:ns/name:meta}} | Meta flags (isReadOnly, isDestructive, etc.) |
{{tool:ns/name:call}} | Ready-to-use call command |
{{resource:ns/name}} | Resource reference |
{{prompt:ns/name}} | Prompt reference |
{{skill:name}} | Skill reference (1 level, no nesting) |
{{input:key}} | User input parameter |
{{prefill:ns/tool/name}} | Pre-executed tool result |
{{listName:alias}} | Shared List value via alias |
Prefill Declaration
Section titled “Prefill Declaration”In a Skill, prefill is declared in the prefill array:
export const skill = { name: 'contract-analysis', prefill: [ { tool: 'etherscan-io/tool/getNetworkStatus', params: { network: '{{input:chain}}' } } ], content: `Network status: {{prefill:etherscan-io/tool/getNetworkStatus}}
Now analyze contract at {{input:address}}...`}Resolution Flow (8 Steps)
Section titled “Resolution Flow (8 Steps)”- Skill is requested (with
inputparameters) prefill[]entries are executed in order- Results are stored temporarily
{{input:key}}tokens are replaced with user parameters{{prefill:ns/tool/name}}tokens are replaced with pre-executed results{{tool:...}},{{resource:...}},{{prompt:...}}tokens are resolved from catalog{{listName:alias}}tokens are resolved from Shared Lists- Fully resolved Skill content is delivered to the agent
Error Handling
Section titled “Error Handling”Principle: Always deliver the Skill. Errors are visible in the placeholder, not silent.
If a placeholder cannot be resolved, the error message replaces the placeholder:
{{tool:unknown/ns/missingTool}} → [ERROR: Tool 'unknown/ns/missingTool' not found]{{prefill:ns/tool/name}} → [ERROR: Prefill execution failed: HTTP 503]This ensures the Skill is always delivered — even if some references are broken.
Related
Section titled “Related”- ./00-overview.md — see chapter 00.
- ./02-parameters.md — see chapter 02.
- ./12-prompt-architecture.md — see chapter 12.
- ./14-skills.md — see chapter 14.
- ./16-id-schema.md — see chapter 16.
- ./17-selections.md — see chapter 17.