/** * Skills system type definitions. * * Skills are modular capability packages that extend Flynn's abilities. * Each skill lives in its own directory with a manifest.json and SKILL.md. */ /** Three tiers of skills: shipped with Flynn, installed via CLI, or user-created. */ export type SkillTier = 'bundled' | 'managed' | 'workspace'; /** Requirements that must be met for a skill to be available. */ export interface SkillRequirements { /** OS platforms the skill supports (e.g., ['linux', 'darwin']). Empty = all. */ os?: string[]; /** Binaries that must exist in PATH (e.g., ['git', 'docker']). */ binaries?: string[]; /** Environment variables that must be set (e.g., ['GITHUB_TOKEN']). */ env?: string[]; } /** Manifest for a skill (manifest.json). */ export interface SkillManifest { /** Unique skill name (e.g., 'git', 'web-search'). */ name: string; /** Human-readable description. */ description: string; /** Semantic version string. */ version: string; /** Author name or identifier. */ author?: string; /** Skill tier. */ tier: SkillTier; /** System requirements for availability gating. */ requirements?: SkillRequirements; /** Tool names this skill provides (informational — not enforced). */ tools?: string[]; /** npm/system dependencies needed. */ dependencies?: string[]; } /** A loaded skill ready for use. */ export interface Skill { /** The parsed manifest. */ manifest: SkillManifest; /** Content of SKILL.md — injected into the system prompt. */ instructions: string; /** Absolute path to the skill directory. */ directory: string; /** Whether the skill's requirements are met on this system. */ available: boolean; /** If not available, the reason(s) why. */ unavailableReasons?: string[]; }