DefineSkillOptions
Interface: DefineSkillOptions
Defined in: src/lib/injection-engine/factories/defineSkill.ts:87
Properties
autoActivate?
readonlyoptionalautoActivate?:"currentSkill"
Defined in: src/lib/injection-engine/factories/defineSkill.ts:129
Per-skill tool gating intent. Block A5 / v2.5.
'currentSkill'— when this Skill is the only active one, the agent's tool list should narrow to this Skill'stools(plus the consumer-composed baseline). Used withskillScopedTools(id, tools)fromagentfootprint/tool-providersto materialize the gate. Block C wires this into the runtime automatically.undefined(default) — current additive behavior: this Skill's tools are added to the agent's registry on activation, alongside every other tool already registered.
The field is a forward-compat marker today: the metadata stores
it; consumers can read skill.metadata.autoActivate to drive
their own ToolProvider composition. v2.5 runtime wiring builds
on this contract without API change.
body
readonlybody:string
Defined in: src/lib/injection-engine/factories/defineSkill.ts:92
Body appended to the system-prompt slot once activated.
cache?
readonlyoptionalcache?:CachePolicy
Defined in: src/lib/injection-engine/factories/defineSkill.ts:143
Cache policy for this skill's body. Defaults to 'while-active' —
the body caches while the skill is in activeInjections[] (i.e.,
while it's the most-recently-activated skill); invalidates the
moment it deactivates.
For skills with stable, frequently-accessed bodies, consider
'always' to keep the body cached even when temporarily inactive.
For skills with bodies that depend on per-iter state, use
'never' or { until: ... }.
See CachePolicy in agentfootprint/src/cache/types.ts.
description
readonlydescription:string
Defined in: src/lib/injection-engine/factories/defineSkill.ts:90
Visible to the LLM via the activation tool's description.
id
readonlyid:string
Defined in: src/lib/injection-engine/factories/defineSkill.ts:88
refreshPolicy?
readonlyoptionalrefreshPolicy?:RefreshPolicy
Defined in: src/lib/injection-engine/factories/defineSkill.ts:110
Re-deliver the body past a token threshold to defend against long-context attention decay. Default: undefined (no refresh).
surfaceMode?
readonlyoptionalsurfaceMode?:SurfaceMode
Defined in: src/lib/injection-engine/factories/defineSkill.ts:105
Where the body lands when activated. See SurfaceMode. Default
'auto' — the library resolves per provider via resolveSurfaceMode.
tools?
readonlyoptionaltools?: readonlyTool<Record<string,unknown>,unknown>[]
Defined in: src/lib/injection-engine/factories/defineSkill.ts:94
Optional unlocked tools, added to the tools slot once activated.
viaToolName?
readonlyoptionalviaToolName?:string
Defined in: src/lib/injection-engine/factories/defineSkill.ts:100
Override the activation tool name. Defaults to 'read_skill'.
Multiple Skills sharing one activation tool is the common pattern;
the LLM picks WHICH skill via the tool's argument.
