/** * Skills hoocode itself ships. * * hoocode reads skills from `~/.agents/skills`, `.hoocode/skills`, `.claude/skills` * and installed packages — every source except its own. That gap is why it * shipped three subagents and zero skills while telling users skills are the * extension unit: there was simply nowhere for a first-party skill to live. * * The obstacle is that a skill's `` has to be a real readable path — * the model loads a skill by `read`ing it — and the Bun-compiled binary has no * `templates/` beside it. So rather than resolve the package directory (which * differs across npm/pnpm/source/binary layouts and would give the compiled * binary a silently degraded skill set), every install materializes the same * embedded copy into a cache directory. One code path, same behaviour * everywhere. * * The cache is keyed by content hash, so an upgrade writes a new directory and * a dev build that changes a skill without changing the version still takes * effect. It is a cache, not user-editable state: `~/.agents/skills` is where a * user's own skills go, and nothing here ever writes there. */ /** What decides whether a built-in skill is registered this session. */ export interface BuiltinSkillGate { /** The `enablePluginTools` setting (the plugin system's master switch). */ enablePluginTools: boolean; } export interface BuiltinSkill { /** Directory name under `templates/skills`, and the skill's own name. */ name: string; /** Why hoocode ships it. Documentation, and the catalog test reads it. */ summary: string; /** * Registered only when this returns true. A skill costs its description on * every turn, so one that only makes sense alongside a feature rides that * feature's switch rather than the default user's token budget. * * Omit for a skill that should always be available. */ gate?: (options: BuiltinSkillGate) => boolean; } export declare const BUILTIN_SKILLS: readonly BuiltinSkill[]; /** Root of the materialized copy for the current content. */ export declare function builtinSkillsCacheDir(agentDir?: string): string; /** * Write the embedded skills to the cache directory if they are not already * there, and return its path. * * Returns null when nothing could be written — a read-only home, a full disk. * That is a degraded session, not a broken one: the caller contributes no skill * paths and hoocode runs exactly as it did before these existed. */ export declare function materializeBuiltinSkills(agentDir?: string): string | null; /** * Absolute path to the canvas-design guide, or undefined if it is not on disk. * * `canvas-design` is hidden from the per-turn skill list, so nothing would ever * surface it without this: `/new-canvas` names the path in its build brief, at * the one moment the guidance is worth loading. Materialization is * unconditional, so the file is normally there whether or not any skill is * contributed — but a degraded session (read-only home, full disk) has no cache * at all, and then the brief simply ships without the line. */ export declare function canvasDesignGuidePath(agentDir?: string): string | undefined; /** * The skill directories to load this session, after gating. * * Returns per-skill directories rather than the root so a gated-off skill is * genuinely absent rather than loaded and filtered later — the load is what * costs the description on every turn. */ export declare function builtinSkillPaths(gate: BuiltinSkillGate, agentDir?: string): string[]; //# sourceMappingURL=builtin-skills.d.ts.map