Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpandCommands ¶ added in v1.32.5
ExpandCommands replaces all !`command` patterns in the given content with the stdout of executing each command via the system shell. Commands are executed with the specified working directory. If a command fails, the pattern is replaced with an error message rather than failing the entire expansion.
Types ¶
type Skill ¶
type Skill struct {
Name string
Description string
FilePath string
BaseDir string
Files []string
Local bool // true for filesystem-loaded skills, false for remote
License string
Compatibility string
Metadata map[string]string
AllowedTools []string
Context string // "fork" to run the skill as an isolated sub-agent
}
Skill represents a loaded skill with its metadata and content location.
func Load ¶
Load discovers and loads skills from the given sources. Each source is either "local" (for filesystem-based skills) or an HTTP/HTTPS URL (for remote skills per the well-known skills discovery spec).
Local skills are loaded from (in order, later overrides earlier):
Global locations (from home directory):
- ~/.codex/skills/ (recursive)
- ~/.claude/skills/ (flat)
- ~/.agents/skills/ (recursive)
Project locations (from git root up to cwd, closest wins):
- .claude/skills/ (flat, only at cwd)
- .agents/skills/ (flat, scanned from git root to cwd)