/** * Supported agent environments and their target directories. * * `flatLayout` says where the installed rule file sits relative to the skill's * own assets. A subdirectory layout writes `/SKILL.md`, so a link the * skill spells `references/x.md` resolves as written; a flat layout writes * `.md` one level up, so those links have to be re-pointed at the * per-skill asset directory. See `rewriteAssetLinks`. */ declare const AGENTS: { readonly cursor: { readonly label: "Cursor"; readonly detectDir: ".cursor"; readonly targetDir: ".cursor/rules"; readonly flatLayout: true; /** Cursor uses .mdc files (Markdown with Context). */ readonly transformFile: (skillName: string, content: string) => { fileName: string; content: string; }; }; readonly claude: { readonly label: "Claude Code"; readonly detectDir: ".claude"; readonly targetDir: ".claude/skills"; readonly flatLayout: false; /** Claude Code uses the standard SKILL.md format in subdirectories. */ readonly transformFile: (skillName: string, content: string) => { fileName: string; content: string; }; }; readonly windsurf: { readonly label: "Windsurf"; readonly detectDir: ".windsurf"; readonly targetDir: ".windsurf/rules"; readonly flatLayout: true; /** Windsurf uses plain .md files. */ readonly transformFile: (skillName: string, content: string) => { fileName: string; content: string; }; }; readonly gemini: { readonly label: "Gemini CLI / Antigravity"; readonly detectDir: ".agents"; readonly targetDir: ".agents/skills"; readonly flatLayout: false; /** Gemini uses the standard SKILL.md format in subdirectories. */ readonly transformFile: (skillName: string, content: string) => { fileName: string; content: string; }; }; }; type AgentKey = keyof typeof AGENTS; export interface LoadedSkill { name: string; /** Absolute path of the skill's source directory. */ dir: string; content: string; /** Every file the skill ships besides SKILL.md, relative to `dir`. */ assets: string[]; } /** Read all skill directories and return their names, content and assets. */ export declare function loadSkills(skillsDir: string): LoadedSkill[]; /** * Re-point a skill's own asset links at the per-skill subdirectory, for the * agents whose rule file does not live in it. * * Only paths that name a file the skill actually ships are rewritten, and only * where they start a path segment — so prose that happens to contain the same * words is left alone. */ export declare function rewriteAssetLinks(content: string, assets: string[], skillName: string): string; /** Install skills for a specific agent into the project directory. */ export declare function installForAgent(agentKey: AgentKey, skills: LoadedSkill[], projectDir: string): { skills: number; assets: number; }; export declare function skillsCommand(subcommand: string | undefined, rawArgs: string[]): Promise; export {};