import type { SkillEntry, SkillLoader } from '../types/skill.js'; /** Result of validating a proposed skill name. */ export interface SkillNameValidation { /** Whether the name is valid kebab-case AND free of collisions. */ ok: boolean; /** Format violations (empty when the name is valid kebab-case). */ formatViolations: string[]; /** Existing skills with the same name (empty when there's no collision). */ conflicts: SkillEntry[]; } /** * Validate a proposed skill name: format (kebab-case, ≤64 chars) plus collision * check against every skill the loader can see (project, user, foreign, * bundled). A collision isn't fatal — project skills intentionally shadow * lower layers — so `ok` is true when the only collision is with a foreign or * bundled skill (intended shadowing), but `conflicts` is still populated so the * user can decide. A collision with another project or user skill of the same * name does fail (`ok: false`), since that would silently overwrite it. */ export declare function validateSkillNameAvailable(name: string, loader?: SkillLoader): Promise; export interface SkillSkeletonOptions { name: string; description: string; /** Trigger keywords for the `Triggers:` line. */ triggerKeywords?: string[] | undefined; /** Optional version (default `1.0.0`). */ version?: string | undefined; } /** * Generate a SKILL.md body (with frontmatter) following the agentskills.io * format and the `skill-creator` skill's recommended skeleton. Deterministic: * the same inputs always produce the same output, and the result round-trips * through `parseSkillFrontmatter` (so what we write is what the loader reads). * * The body is a skeleton — the user fills in Rules/Patterns/etc. The * `skill-creator` skill is the right tool for the open-ended authoring; this * is the scaffold. */ export declare function generateSkillSkeleton(opts: SkillSkeletonOptions): string; /** Result of extracting a skill draft from a free-form prompt. */ export interface ExtractedSkillDraft { /** Suggested name (kebab-case) derived from the prompt, or empty. */ suggestedName: string; /** Description (first paragraph of the prompt). */ description: string; /** Remaining prompt text, used as the skill body. */ body: string; /** Trigger keywords extracted from the prompt. */ triggerKeywords: string[]; } /** * Heuristically extract a skill draft from a free-form prompt. No LLM — just * light structure detection: * - First non-empty paragraph → `description`. * - A `# heading` or the first line → suggested kebab-case `suggestedName`. * - Remaining text → `body`. * - Quoted tokens and the heading words → `triggerKeywords`. * * The output is a starting point the user (or the skill-creator wizard) refines. */ export declare function extractSkillFromPrompt(prompt: string): ExtractedSkillDraft; /** * Open a file in the user's editor (`$VISUAL` → `$EDITOR` → platform default). * Detached + unref'd so the editor outlives the WrongStack process. Throws a * `WrongStackError` when no editor can be resolved. */ export declare function openInEditor(filePath: string, env?: NodeJS.ProcessEnv): Promise; /** * Write a skeleton skill to `//SKILL.md`. Returns the written * path. Used by `/skill-gen skeleton` and `/skill-gen from-prompt`. Refuses to * overwrite an existing SKILL.md unless `overwrite` is set — a guard against * clobbering a hand-edited skill. */ export declare function writeSkeletonSkill(skillsDir: string, body: string, opts?: { overwrite?: boolean | undefined; }): Promise; /** Soft length advisory for a SKILL.md body (the `skill-creator` 500-line rule). */ export declare function bodyLineAdvisory(body: string): { lines: number; over: boolean; }; //# sourceMappingURL=skill-generator.d.ts.map