Documentation
¶
Overview ¶
Package skills discovers and renders Codog skill instructions.
Index ¶
- Variables
- func MatchesAnyPath(skill Skill, paths []string) bool
- func RenderInvocation(skill Skill, args string) string
- func RenderInvocationWithSession(skill Skill, args string, sessionID string) string
- func RenderPromptBlock(skill Skill) string
- type DiscoveryRoot
- type InstallReport
- type MetadataDrift
- type Origin
- type Skill
- func Bundled() []Skill
- func ContextualForPaths(configHome, workspace string, paths []string) ([]Skill, error)
- func ContextualForPathsWithManifests(configHome, workspace string, paths []string, manifests []plugins.Manifest) ([]Skill, error)
- func Find(configHome, workspace, name string) (Skill, error)
- func Load(configHome, workspace string) ([]Skill, error)
- func LoadForPaths(configHome, workspace string, paths []string) ([]Skill, error)
- func LoadForPathsWithManifests(configHome, workspace string, paths []string, manifests []plugins.Manifest) ([]Skill, error)
- func LoadWithManifests(configHome, workspace string, manifests []plugins.Manifest) ([]Skill, error)
- func ParseDocument(name string, path string, source string, text string) Skill
- type SourceNotFoundError
- type UninstallReport
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("skill not found")
Functions ¶
func MatchesAnyPath ¶
func RenderInvocation ¶
func RenderPromptBlock ¶
Types ¶
type DiscoveryRoot ¶
type DiscoveryRoot struct {
Source string `json:"source"`
Label string `json:"label"`
Path string `json:"path"`
Exists bool `json:"exists"`
Origin *Origin `json:"origin,omitempty"`
PluginID string `json:"plugin_id,omitempty"`
PluginRoot string `json:"plugin_root,omitempty"`
}
func Sources ¶
func Sources(configHome, workspace string) []DiscoveryRoot
func SourcesWithManifests ¶
func SourcesWithManifests(configHome, workspace string, manifests []plugins.Manifest) []DiscoveryRoot
SourcesWithManifests reports skill roots for a resolved runtime plugin set.
type InstallReport ¶
type MetadataDrift ¶
type MetadataDrift struct {
InvocationName string `json:"invocation_name"`
FrontmatterName string `json:"frontmatter_name"`
Path string `json:"path"`
Source string `json:"source"`
}
func MetadataDrifts ¶
func MetadataDrifts(all []Skill) []MetadataDrift
type Skill ¶
type Skill struct {
Name string `json:"name"`
DisplayName string `json:"display_name,omitempty"`
Path string `json:"path"`
Description string `json:"description,omitempty"`
WhenToUse string `json:"when_to_use,omitempty"`
Version string `json:"version,omitempty"`
AllowedTools []string `json:"allowed_tools,omitempty"`
ArgumentHint string `json:"argument_hint,omitempty"`
Arguments []string `json:"arguments,omitempty"`
Paths []string `json:"paths,omitempty"`
SkillDir string `json:"skill_dir,omitempty"`
PluginRoot string `json:"plugin_root,omitempty"`
PluginData string `json:"plugin_data,omitempty"`
Model string `json:"model,omitempty"`
ExecutionContext string `json:"execution_context,omitempty"`
Agent string `json:"agent,omitempty"`
Effort string `json:"effort,omitempty"`
UserInvocable bool `json:"user_invocable"`
DisableModelInvocation bool `json:"disable_model_invocation,omitempty"`
FrontmatterError string `json:"frontmatter_error,omitempty"`
Body string `json:"body,omitempty"`
Source string `json:"source"`
Origin *Origin `json:"origin,omitempty"`
Active bool `json:"active"`
ShadowedBy string `json:"shadowed_by,omitempty"`
ShadowedByPath string `json:"shadowed_by_path,omitempty"`
NameDrift bool `json:"metadata_drift,omitempty"`
// contains filtered or unexported fields
}
func ContextualForPaths ¶
func ContextualForPathsWithManifests ¶
func ContextualForPathsWithManifests(configHome, workspace string, paths []string, manifests []plugins.Manifest) ([]Skill, error)
ContextualForPathsWithManifests resolves contextual skills from a runtime plugin set.
func LoadForPaths ¶
func LoadForPathsWithManifests ¶
func LoadForPathsWithManifests(configHome, workspace string, paths []string, manifests []plugins.Manifest) ([]Skill, error)
LoadForPathsWithManifests adds path-contextual skills to a resolved runtime plugin set.
func LoadWithManifests ¶
LoadWithManifests loads skills from a resolved runtime plugin set.
type SourceNotFoundError ¶
func (SourceNotFoundError) Error ¶
func (e SourceNotFoundError) Error() string
func (SourceNotFoundError) Unwrap ¶
func (e SourceNotFoundError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.