skills

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

internal/skills/skills.go 技能系统:发现和加载 SKILL.md 文件

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

Registry 技能注册表

func NewRegistry

func NewRegistry() *Registry

NewRegistry 创建技能注册表

func (*Registry) All

func (r *Registry) All() []*Skill

All 返回所有技能

func (*Registry) Discover

func (r *Registry) Discover(configDir string)

Discover 发现并加载技能 扫描 ~/.xincode/skills/ 和 .xincode/skills/ 目录

func (*Registry) Get

func (r *Registry) Get(name string) (*Skill, bool)

Get 获取技能

func (*Registry) ListString

func (r *Registry) ListString() string

ListString 返回技能列表的格式化字符串

type Skill

type Skill struct {
	Name        string // 技能名称
	Description string // 描述(给 AI 判断是否调用)
	WhenToUse   string // 触发条件描述
	Content     string // 技能内容(Markdown)
	Path        string // SKILL.md 文件路径
	Source      string // 来源:user / project
}

Skill 技能定义

Jump to

Keyboard shortcuts

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