pub fn write_skill_template(
dest: &Path,
name: &str,
description: &str,
) -> Result<PathBuf, SkillError>Expand description
Resolve where a template write should land and write it.
dest interpretation:
- If
destis an existing directory, the file is written todest/<name>.md. - If
destends in.md, it is used verbatim and its parent must already exist. - Otherwise
destis treated as a directory that should be created (and its parents created withcreate_dir_all) before writingdest/<name>.md.
Existing files are never overwritten — if the destination already
exists, returns a SkillError::Io wrapping AlreadyExists. The
caller should delete first if they really want to replace.