ObjectStackObjectStack

Skill

Skill protocol schemas

Skill Trigger Condition Schema

Defines programmatic conditions under which a skill becomes active. Allows context-aware activation based on object type, user role, etc.

Source: packages/spec/src/ai/skill.zod.ts

TypeScript Usage

import { SkillSchema, SkillTriggerConditionSchema } from '@objectstack/spec/ai';
import type { Skill, SkillTriggerCondition } from '@objectstack/spec/ai';

// Validate data
const result = SkillSchema.parse(data);

Skill

Properties

PropertyTypeRequiredDescription
namestringSkill unique identifier (snake_case)
labelstringSkill display name
descriptionstringoptionalSkill description
surfaceEnum<'ask' | 'build' | 'both'>Agent surface this skill binds to ('ask' | 'build' | 'both') — ADR-0063 §3; read by the cloud agent runtime only
instructionsstringoptionalLLM instructions when skill is active — also served as an MCP prompt (#3905)
toolsstring[]Tool names belonging to this skill (supports trailing wildcard, e.g. action_*) — bound by the cloud agent runtime only
triggerPhrasesneveroptional[REMOVED] skill.triggerPhrases was removed in @objectstack/spec 17.0.0 (#3896 audit close-out) — phrases were never matched against the user's message; skill activation is triggerConditions (AND of context field/operator/value) intersected with the agent's skills[], plus explicit /skill-name pinning. Delete the key. Put routing intent in triggerConditions; describe intent in description/instructions for the LLM. Run os migrate meta --from 16 to rewrite existing sources automatically.
triggerConditions{ field: string; operator: Enum<'eq' | 'neq' | 'in' | 'not_in' | 'contains'>; value: string | string[] }[]optionalProgrammatic activation conditions — evaluated by the cloud agent runtime only
activebooleanWhether the skill is enabled
protection{ lock: Enum<'none' | 'no-overlay' | 'no-delete' | 'full'>; reason: string; docsUrl?: string }optionalPackage author protection block — lock policy for this skill.
_lockEnum<'none' | 'no-overlay' | 'no-delete' | 'full'>optionalItem-level lock — controls overlay & delete (ADR-0010).
_lockReasonstringoptionalHuman-readable reason shown when a write is refused by _lock.
_lockSourceEnum<'artifact' | 'package' | 'env-forced'>optionalLayer that set _lock (artifact | package | env-forced).
_provenanceEnum<'package' | 'org' | 'env-forced'>optionalOrigin of the item (package | org | env-forced).
_packageIdstringoptionalOwning package machine id.
_packageVersionstringoptionalOwning package version.
_lockDocsUrlstringoptionalOptional documentation link surfaced next to _lockReason.

SkillTriggerCondition

Properties

PropertyTypeRequiredDescription
fieldstringContext field to evaluate
operatorEnum<'eq' | 'neq' | 'in' | 'not_in' | 'contains'>Comparison operator
valuestring | string[]Expected value or values

On this page