Documentation
¶
Overview ¶
Package skillgen produces SKILL.md content per the agentskills.io standard. Lives here, not in cli or tools/core, so both surfaces (the `clawtool skill new` CLI and the SkillNew MCP tool) share one template + one validator without forcing a leaf-package to import its sibling.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsValidName ¶
IsValidName enforces kebab-case [a-z0-9-]+ with no leading or trailing dash. Both the directory name and the frontmatter `name` field use this — keeps file paths portable across filesystems and avoids hyphen-prefix shell-arg footguns.
func LocalSkillsRoot ¶
func LocalSkillsRoot() string
LocalSkillsRoot is the project-scope analogue: ./.claude/skills.
func ParseTriggers ¶
ParseTriggers turns "a, b ,c" into ["a","b","c"] — comma- separated, whitespace-trimmed, empties dropped. Used for both CLI flags and MCP arguments.
func Render ¶
Render builds SKILL.md content per agentskills.io: YAML frontmatter (name + description, optional triggers) followed by a body skeleton with the recommended sections. Description is folded onto multiple lines so YAML readers parse cleanly.
func UserSkillsRoot ¶
func UserSkillsRoot() string
UserSkillsRoot returns ~/.claude/skills (or $CLAUDE_HOME/skills when set). Never empty — degrades to ".claude/skills" if the home directory can't be resolved.
Types ¶
This section is empty.