Documentation
¶
Index ¶
- func BuildPrompt(validSkills []*Skill) string
- func GetDefaultSkill(atmosConfig *schema.AtmosConfiguration) string
- type Registry
- func (r *Registry) Count() int
- func (r *Registry) Get(name string) (*Skill, error)
- func (r *Registry) Has(name string) bool
- func (r *Registry) List() []*Skill
- func (r *Registry) ListBuiltIn() []*Skill
- func (r *Registry) ListByCategory(category string) []*Skill
- func (r *Registry) ListCustom() []*Skill
- func (r *Registry) Register(skill *Skill) error
- func (r *Registry) ToPromptXML(currentSkillName string) string
- func (r *Registry) Unregister(name string) error
- type Skill
- type SkillLoader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildPrompt ¶ added in v1.210.0
BuildPrompt concatenates system prompts from multiple skills with a separator. Returns an empty string if no skills have system prompts.
func GetDefaultSkill ¶
func GetDefaultSkill(atmosConfig *schema.AtmosConfiguration) string
GetDefaultSkill returns the name of the default skill from configuration. Returns empty string if not specified (caller should handle fallback).
Types ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry manages available skills.
func LoadSkills ¶
func LoadSkills(atmosConfig *schema.AtmosConfiguration, marketplaceLoader ...SkillLoader) (*Registry, error)
LoadSkills loads all skills (marketplace-installed and custom) from configuration. If a marketplaceLoader is provided, it loads marketplace-installed skills first.
func (*Registry) ListBuiltIn ¶
ListBuiltIn returns only built-in skills sorted alphabetically by name.
func (*Registry) ListByCategory ¶
ListByCategory returns skills in a specific category sorted alphabetically by name.
func (*Registry) ListCustom ¶
ListCustom returns only custom (user-defined) skills sorted alphabetically by name.
func (*Registry) ToPromptXML ¶
ToPromptXML generates an XML block listing available skills for injection into the system prompt. This follows the Agent Skills integration guide recommendation for Claude models. The XML format helps the model understand what skills are available and when to use them.
func (*Registry) Unregister ¶
Unregister removes a skill from the registry.
type Skill ¶
type Skill struct {
// Name is the unique identifier for the skill (e.g., "stack-analyzer").
Name string
// DisplayName is the user-facing name (e.g., "Stack Analyzer").
DisplayName string
// Description explains what this skill does.
Description string
// SystemPrompt contains specialized instructions for the AI.
SystemPrompt string
// AllowedTools lists tool names this skill can use.
// Empty list means all tools are allowed.
AllowedTools []string
// RestrictedTools lists tools requiring extra confirmation.
RestrictedTools []string
// Category groups skills by purpose (e.g., "analysis", "refactor", "security").
Category string
// IsBuiltIn indicates if this is a built-in skill.
IsBuiltIn bool
}
Skill represents a specialized AI assistant with specific expertise and tool access. Skills follow the Agent Skills open standard (https://agentskills.io).
func FromConfig ¶
func FromConfig(name string, config *schema.AISkillConfig) *Skill
FromConfig creates a Skill from configuration.
func LoadAndValidate ¶ added in v1.210.0
func LoadAndValidate(atmosConfig *schema.AtmosConfiguration, skillNames []string, loader SkillLoader) ([]*Skill, error)
LoadAndValidate loads the skill registry and validates that all specified skills exist. An optional SkillLoader can be provided to load marketplace-installed skills. Returns the validated skills or a helpful error listing invalid and available skills.
func NewFallbackSkill ¶
func NewFallbackSkill() *Skill
NewFallbackSkill returns a minimal fallback skill for when no skills are installed.
func (*Skill) IsToolAllowed ¶
IsToolAllowed checks if a tool is allowed for this skill.
func (*Skill) IsToolRestricted ¶
IsToolRestricted checks if a tool requires extra confirmation.
func (*Skill) LoadSystemPrompt ¶
LoadSystemPrompt returns the skill's system prompt.
type SkillLoader ¶
SkillLoader is the interface for loading marketplace-installed skills into a registry. This allows the loader to be decoupled from the marketplace package.