skillgen

package
v0.22.171 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 26, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func IsValidName(s string) bool

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

func ParseTriggers(raw string) []string

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

func Render(name, description string, triggers []string) string

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL