Enum SkillInjectionMode
Specifies how skill instructions should be injected into the agent context.
public enum SkillInjectionMode
Fields
SystemPrompt = 0Prepend skill instructions to the system prompt.
Best for skills that define persistent behavioral guidelines that should influence the agent's behavior throughout the conversation.
UserMessage = 1Insert skill instructions as a user message.
Useful for skills that provide task-specific instructions that should appear in the conversation history.
ToolResult = 2Return skill instructions as a tool invocation result.
Default mode for function-calling workflows. The instructions are returned as the result of the skill activation tool call.
Examples
Using different injection modes:
var activator = new SkillActivator();
var skill = AgentSkill.Load("./skills/code-review");
// Inject as system prompt
string systemContent = activator.FormatForInjection(
skill, SkillInjectionMode.SystemPrompt);
// Inject as tool result (default)
string toolResult = activator.FormatForInjection(
skill, SkillInjectionMode.ToolResult);