skills

package
v0.30.2 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Description added in v0.30.1

func Description(s Skill) string

Description extracts a compact description from common skill frontmatter.

func Inject

func Inject(systemPrompt string, skills []Skill) string

Inject augments a system prompt with relevant skill content.

func InjectForPrompt added in v0.30.1

func InjectForPrompt(systemPrompt string, available []Skill, userPrompt string) string

InjectForPrompt adds a compact skill index plus full skill contents for skills explicitly referenced by the user prompt.

Types

type Skill

type Skill struct {
	Name          string
	Path          string
	Content       string
	Source        string
	PluginName    string
	PluginVersion string
}

Skill represents a discovered and loaded skill.

func Discover

func Discover(workingDir string) []Skill

Discover finds skills from ~/.ratchet/skills/ and .ratchet/skills/. Project skills take precedence over global skills.

func Merge added in v0.30.1

func Merge(skillLists ...[]Skill) []Skill

Merge combines skill lists while preserving first-seen order and allowing later lists to override same-name content.

func NamespacedAliases added in v0.30.1

func NamespacedAliases(pluginSkills []Skill) []Skill

NamespacedAliases returns plugin-name aliases for plugin skills. Legacy unqualified skill names are left intact by the plugin loader for backwards compatibility; aliases make explicit invocations like $autodev:using-autodev resolvable without changing older tests or installed plugin layouts.

func SelectForPrompt added in v0.30.1

func SelectForPrompt(available []Skill, userPrompt string) []Skill

SelectForPrompt returns skills explicitly referenced by name in the prompt.

Jump to

Keyboard shortcuts

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