import type { FileSystemProvider } from '../fs/index.js'; import type { Skill, SkillContext, SkillReference } from './types.js'; /** * Service for discovering and loading Agent Skills from filesystem * * Skills are discovered from three sources with priority: * 1. Project skills at .claude/skills/ (highest priority) * 2. Personal skills at ~/.claude/skills/ * 3. Plugin skills at node_modules (lowest priority) */ export declare class SkillDiscoveryService { private fs; private personalSkillsDir; private projectSkillsDir; private pluginSkillsDirs; constructor(options: { cwd: string; personalSkillsDir?: string; pluginSkillsDirs?: string[]; fs?: FileSystemProvider; }); /** * Discover all available skills from all sources * Removes duplicates (project skills take priority over personal/plugin) */ discoverAll(): Promise; /** * Discover skills in a specific directory */ discoverInDirectory(dir: string, source: 'personal' | 'project' | 'plugin'): Promise; /** * Discover skills from plugin directories (node_modules) */ discoverPlugins(): Promise; /** * Load a single skill from its directory */ loadSkill(skillPath: string, source: 'personal' | 'project' | 'plugin'): Promise; /** * Parse SKILL.md content and extract frontmatter */ private parseSkillMd; /** * Parse and validate YAML frontmatter */ private parseMetadata; /** * Recursively load files from a directory into the files map * @returns The total size of all files loaded (in bytes) */ private loadDirectoryFiles; /** * Create an initial skill context object */ createContext(): Promise; }