Documentation
¶
Index ¶
- func ApplyDisabledState(cmds map[string]*Command)
- func InvalidateDisabledCache()
- func PersistEnabledState(name string, enabled bool)
- func RecordUsage(name string) error
- func UsageScore(name string) float64
- type Command
- type LoadedFrom
- type Loader
- type Manager
- func (m *Manager) Commands() map[string]*Command
- func (m *Manager) Get(name string) (*Command, bool)
- func (m *Manager) List() []*Command
- func (m *Manager) RecordUsage(name string)
- func (m *Manager) Reload() bool
- func (m *Manager) SetEnabled(name string, enabled bool)
- func (m *Manager) SetExtraProviders(providers ...func() []*Command)
- func (m *Manager) UserSlashCommands() map[string]*Command
- type Source
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyDisabledState ¶ added in v1.1.34
ApplyDisabledState sets the Enabled field on each command based on persisted state. New skills (not in the persisted set) default to enabled.
func InvalidateDisabledCache ¶ added in v1.1.34
func InvalidateDisabledCache()
InvalidateDisabledCache clears the in-memory cache so next load reads from disk.
func PersistEnabledState ¶ added in v1.1.34
PersistEnabledState saves the enabled/disabled state for a single skill.
func RecordUsage ¶
func UsageScore ¶
Types ¶
type Command ¶
type Command struct {
Name string
Template string
Description string
Source Source
LoadedFrom LoadedFrom
Path string
DisplayName string
AllowedTools []string
ArgumentHint string
Arguments []string
WhenToUse string
UserInvocable bool
DisableModelInvocation bool
Context string
Enabled bool // false = skill is disabled and won't be invoked by the agent
}
Command represents a reusable slash command or skill loaded from markdown.
func (*Command) Expand ¶
Expand replaces template variables in the command template. Supported: $FILE, $DIR, $ARGS, plus any named variables supplied.
func (*Command) IsBuiltin ¶ added in v1.1.34
IsBuiltin returns true for bundled/internal skills that cannot be disabled.
func (*Command) UserSlashVisible ¶ added in v1.1.6
type LoadedFrom ¶
type LoadedFrom string
const ( LoadedFromBundled LoadedFrom = "bundled" LoadedFromSkills LoadedFrom = "skills" LoadedFromCommands LoadedFrom = "commands" LoadedFromPlugin LoadedFrom = "plugin" LoadedFromMCP LoadedFrom = "mcp" )
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
Loader finds and loads reusable skills and legacy custom slash commands.
func (*Loader) CommandDirs ¶
CommandDirs returns the directories being scanned (for display purposes).
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) RecordUsage ¶
func (*Manager) SetEnabled ¶ added in v1.1.34
SetEnabled enables or disables a skill by name and persists the state.