Skip to content

v0.3.0: --from-template rejects file paths despite PR #84 / release notes describing them as supported #91

@Sophylax

Description

@Sophylax

Summary

PR #84 and the v0.3.0 release notes describe --from-template <path> as accepting three forms: (1) skill directory, (2) SKILL.md file with frontmatter, (3) any other markdown file as raw body. The merged code accepts only form (1) — file paths hard-error before any branching.

Repro

$ skern skill create my-skill --from-template /path/to/SKILL.md --scope project --force
Error: --from-template must point to a skill directory containing a SKILL.md file, but "/path/to/SKILL.md" is a file; pass the parent directory instead

Same error for any non-directory path; raw-body markdown files are rejected identically.

Code reference

internal/cli/skill_create.go @ v0.3.0loadTemplate returns the file-mode error before frontmatter detection or any fallback runs:

if !info.IsDir() {
    return nil, fmt.Errorf("--from-template must point to a skill directory ...")
}

The struct comment confirms the intent (// The flag only accepts a skill directory containing a SKILL.md), so this is the implementation contract — the docs disagree.

Impact

Silent breaking change between v0.2.x (any path read as raw body) and v0.3.0 (directories only). Downstream tools that pass file paths regress on routine upgrades.

Two paths forward

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions