import { Plugin } from '@opencode-ai/plugin';

interface SkillSettings {
    useSummary?: boolean;
}
type InjectionMethod = "systemPrompt" | "chatMessage";
type MinificationLevel = "standard" | "aggressive";
interface PreloadSkillsConfig {
    skills: string[];
    fileTypeSkills?: Record<string, string[]>;
    agentSkills?: Record<string, string[]>;
    pathPatterns?: Record<string, string[]>;
    contentTriggers?: Record<string, string[]>;
    groups?: Record<string, string[]>;
    conditionalSkills?: ConditionalSkill[];
    skillSettings?: Record<string, SkillSettings>;
    injectionMethod?: InjectionMethod;
    maxTokens?: number;
    useSummaries?: boolean;
    useMinification?: boolean | MinificationLevel;
    showToasts?: boolean;
    enableTools?: boolean;
    analytics?: boolean;
    persistAfterCompaction?: boolean;
    debug?: boolean;
}
interface ConditionalSkill {
    skill: string;
    if: ConditionCheck;
}
interface ConditionCheck {
    fileExists?: string;
    packageHasDependency?: string;
    envVar?: string;
}
interface ParsedSkill {
    name: string;
    description: string;
    summary?: string;
    content: string;
    filePath: string;
    tokenCount: number;
}

declare function loadSkills(skillNames: string[], projectDir: string): ParsedSkill[];
interface FormatOptions {
    useSummaries?: boolean;
    useMinification?: boolean | MinificationLevel;
    skillSettings?: Record<string, SkillSettings>;
}
declare function formatSkillsForInjection(skills: ParsedSkill[], options?: boolean | FormatOptions): string;

declare const PreloadSkillsPlugin: Plugin;

export { type ParsedSkill, type PreloadSkillsConfig, PreloadSkillsPlugin, PreloadSkillsPlugin as default, formatSkillsForInjection, loadSkills };
