skill

package
v0.12.0 Latest Latest
Warning

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

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

Documentation

Overview

Package skill 提供文件拷贝功能

Package skill 提供 Skill 相关功能

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyDir

func CopyDir(src, dst string, opts CopyOptions) error

CopyDir 将源目录内容拷贝到目标目录

func CopyFile

func CopyFile(src, dst string) error

CopyFile 拷贝单个文件

func ExtractSkillName

func ExtractSkillName(source string) string

ExtractSkillName 从仓库 URL 或路径中提取 skill 名称

func ReadSkillDescription added in v0.10.0

func ReadSkillDescription(skillDir string) string

ReadSkillDescription 读取指定 skill 目录中的描述信息 入参: skillDir skill 目录路径 返回: description 字段内容,读取失败或不存在则为空

func ValidateSkillDir

func ValidateSkillDir(dir string) error

ValidateSkillDir 验证目录是否是有效的 skill 目录 有效的 skill 目录必须包含 SKILL.md 文件

Types

type CopyOptions

type CopyOptions struct {
	ExcludeDirs  []string // 要排除的目录名
	ExcludeFiles []string // 要排除的文件名
}

CopyOptions 拷贝选项

func DefaultCopyOptions

func DefaultCopyOptions() CopyOptions

DefaultCopyOptions 返回默认的拷贝选项

type SkillInfo

type SkillInfo struct {
	Name string // skill 名称(目录名)
	Path string // skill 完整路径
	Desc string // 从 SKILL.md 提取的描述
}

SkillInfo 表示一个 skill 的信息

func ScanSkills

func ScanSkills(dir string) ([]SkillInfo, error)

ScanSkills scans directory recursively for valid skills (directories containing SKILL.md) Supports nested structures common in monorepos (e.g., root/skills/skill-name/SKILL.md)

Jump to

Keyboard shortcuts

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