Documentation
¶
Overview ¶
skill parses SKILL.md files
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsAgentFile ¶ added in v0.31.0
IsAgentFile returns true if the filename matches the *.agent.md pattern.
Types ¶
type AgentFrontmatter ¶ added in v0.31.0
type AgentFrontmatter struct {
Frontmatter `yaml:",inline"`
Tools []string `yaml:"tools,omitempty"`
Model string `yaml:"model,omitempty"`
Handoffs []AgentHandoff `yaml:"handoffs,omitempty"`
MCPServers []AgentMCPServer `yaml:"mcp-servers,omitempty"`
Agents []string `yaml:"agents,omitempty"`
}
AgentFrontmatter holds parsed agent-specific YAML fields from .agent.md files.
func LoadAgentDefinition ¶ added in v0.31.0
func LoadAgentDefinition(path string) (*AgentFrontmatter, string, error)
LoadAgentDefinition reads an .agent.md file and returns its parsed frontmatter and body. Returns nil if path is not an agent file or doesn't exist.
func ParseAgentFrontmatter ¶ added in v0.31.0
func ParseAgentFrontmatter(content string) (*AgentFrontmatter, string, error)
ParseAgentFrontmatter splits an .agent.md file into its YAML frontmatter and markdown body. It reuses the existing parseFrontmatter helper to split the --- delimited blocks, then unmarshals agent-specific fields.
type AgentHandoff ¶ added in v0.31.0
type AgentHandoff struct {
Name string `yaml:"name"`
Description string `yaml:"description,omitempty"`
}
AgentHandoff describes a handoff target for an agent.
type AgentMCPServer ¶ added in v0.31.0
type AgentMCPServer struct {
Name string `yaml:"name"`
Config map[string]any `yaml:"config,omitempty"`
}
AgentMCPServer describes an MCP server configuration for an agent.
type Frontmatter ¶
Frontmatter holds parsed YAML frontmatter from SKILL.md.
type Skill ¶
type Skill struct {
Frontmatter Frontmatter
FrontmatterRaw map[string]any
FrontmatterNode *yaml.Node
Body string
Path string
RawContent string
Tokens int
Characters int
Lines int
}
Skill represents the current state of a skill for scoring.