export type SkillsPin = { version: string; path: string; }; /** * The skills directory a brief names and an install writes first. The base * repo already ships seven of its own here, so an installed cookbook's * procedure belongs alongside them rather than in a directory of our own * invention — and Claude Code reads no other project path. * * Forward slashes rather than `join`: these are written into agent-facing * prose as often as they are used to build a path, and `join` would put a * backslash in the middle of a sentence on Windows. `join` normalises * separators on the way in, so building paths from this still works. */ export declare const CANONICAL_SKILLS_DIRECTORY = ".claude/skills"; /** * The other directories the same skill is copied to, because no single path * is read by every agent: Claude Code discovers project skills only under * `.claude/skills/` and has declined the `.agents/` convention more than * once, while Cursor, Codex, Gemini and Copilot read `.agents/skills/` and * not `.claude/`. Writing one copy leaves whichever half of that split the * user is on unable to discover the procedure at all. * * The tidier shape — one copy plus a symlink — loses to git, which does not * carry symlinks across a Windows checkout. So this copies, and the cost is * that editing one leaves the other stale. That trade is only acceptable * because a cookbook's `SKILL.md` is a shipped artifact rather than something * a team authors and evolves: adaptations belong in `infra//`, which is * written once. */ export declare const MIRROR_SKILLS_DIRECTORIES: readonly string[]; /** Every directory an installed skill is written to, canonical first. */ export declare const SKILLS_DIRECTORIES: readonly string[]; export declare const SKILLS_INSTALL_COMMAND = "npx skills add getcargohq/cargo-skills"; /** * The skill that owns building a workspace in code. Named here, in the package * that ships the CDK, because three handoffs across two packages load it and a * name they disagree about is a routing bug nothing would report — which is * how the briefs came to ask for the router while the launch loaded this. */ export declare const CDK_SKILL = "cargo-project"; /** * The CLI version the installed skills bundle was written against, from * whichever agent's skills directory holds one. Undefined means no bundle this * knows how to find — which is the signal to offer the install. */ export declare function readSkillsPin(): SkillsPin | undefined; /** * Whether an agent opened on `cwd` will have the skills, installing them if * not. This is what every handoff wants: a repo carrying its own copy needs * nothing, and only a machine without one is asked. * * Asking the question per-caller is how `start` came to re-prompt for a global * install while standing in a repo `cdk init` had just written the bundle into. */ export declare function ensureSkillsInstalled(cwd: string): Promise; /** * Whether an agent opened on `cwd` would already find the skills, asking * nothing and installing nothing. * * The repo's own copy counts, and it is at the repo *root* — while `cwd` is * wherever the user is standing, which is `infra/` as often as not, since that * is where the scaffold's README sends them. Callers that checked * `hasLocalSkills(process.cwd())` instead reported "no skills" from inside a * repo carrying them, and told the reader to install what they already had. */ export declare function skillsInstalledFor(cwd: string): boolean; /** * Make sure the skills are installed globally (`~/.claude/skills/cargo/`) * before a coding agent is opened. Returns whether they are, which the caller * uses to decide what the agent's brief says about them. * * Asks rather than just doing it: this writes into the user's own agent * configuration, and a tool that quietly edits `~/.claude` is a tool people * stop trusting. Declining is a real answer — the brief then carries the * install command instead, and nothing else changes. * * A repo with its own copy should go through `ensureSkillsInstalled` instead, * which checks for one before reaching this. */ export declare function ensureSkillsInstalledGlobally(): Promise; /** * Install the Cargo skills into a CDK repo, so the repo carries them and any * agent opened on it has them without a separate step. Which directories that * writes — there is more than one — is `localSkillsPinCandidates`. * * Returns whether they are there afterwards; a failure is reported but does * not block the scaffold, which works fine without them, just less * conveniently. */ export declare function ensureSkillsInstalledLocally(root: string): boolean; /** * Whether the Cargo skills are installed in `dir` (project-level). Checked * before launching an agent from a CDK repo — the skills install puts them * here rather than globally. */ export declare function hasLocalSkills(root: string): boolean; //# sourceMappingURL=skills.d.ts.map