import { type Logger } from "webappwiz/log"; import type { Fs, Ps } from "webappwiz/system"; /** * Where a project keeps its skills. `skills` writes each one here, which * Codex and most agents read, and links the directories of the rest, such as * Claude Code's `.claude/skills`, to it. */ export declare const SKILLS_DIR = ".agents/skills"; /** What `ProjectSkills` works through, and where its skills come from. */ export interface ProjectSkillsOptions { fs: Fs; ps: Ps; log: Logger; /** * The GitHub repository the skills come from, as `owner/name`: each * release is a `v` tag in it, and each skill a * `skills//SKILL.md` there, which `bunx skills add` finds. */ source: string; } /** The `version:` in a skill's frontmatter, or null when it has none. */ export declare function versionOf(md: string): string | null; /** * The agent skills a project has, those from one repository installed through * the `skills` CLI from the tag of one of its releases, so a project's copy is * always some release's, whichever tool put it there. A skill whose copy is a * symbolic link is one someone keeps by hand, as a repository links its own * to the source it edits, so it is left as it is. */ export declare class ProjectSkills { /** The project's root, where `.agents/skills` is. */ private root; private opts; constructor( /** The project's root, where `.agents/skills` is. */ root: string, opts: ProjectSkillsOptions); /** Where the project keeps `name`, under its root. */ path(name: string): string; /** The skills the project has, ours or not, in name order. */ installed(): Promise; /** The release the project's copy of `name` came from; null when it has none. */ version(name: string): Promise; /** Whether the project's copy of `name` is a link to one kept by hand. */ linked(name: string): Promise; /** * Installs each of `names` as release `version` ships it, over whatever * copy is there, or throws when `skills` fails. Skips a linked copy and * one already at `version`, saying so, so running it again changes * nothing and needs no network. */ add(names: string[], version: string): Promise; private file; }