Documentation
¶
Overview ¶
Package skills provides agent detection, install path resolution, and GitHub-based skill fetching for the oodle CLI.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DetectAgent ¶
func DetectAgent() string
DetectAgent returns the name of the running AI coding agent by checking env vars in priority order (first truthy match wins). Returns "" if none detected.
func FetchContent ¶
FetchContent fetches the SKILL.md content for the named skill. Returns an error wrapping "skill not found: <name>" if the response is 404.
func FindProjectRoot ¶
func FindProjectRoot() string
FindProjectRoot walks up from cwd looking for a directory containing .git. Returns cwd if no .git ancestor is found.
func SetContentsAPIURLOverride ¶
func SetContentsAPIURLOverride(u string)
SetContentsAPIURLOverride sets the URL override for the GitHub contents API. Used in tests only. Pass "" to reset to the real GitHub URL.
func SetRawContentURLOverride ¶
func SetRawContentURLOverride(u string)
SetRawContentURLOverride sets the URL override for GitHub raw content. Used in tests only. Pass "" to reset to the real GitHub URL.
Types ¶
type Entry ¶
type Entry struct {
Name string // directory name, e.g. "oodle-cli"
Description string // extracted from SKILL.md frontmatter description: field
}
Entry represents a single skill available in the agent-skills repo.
type FetchResult ¶ added in v0.5.0
FetchResult holds the outcome of fetching a single skill's content.
func FetchAllContents ¶ added in v0.5.0
func FetchAllContents(ctx context.Context, entries []Entry) []FetchResult
FetchAllContents fetches SKILL.md content for all given entries concurrently using a bounded worker pool. It returns results in the same order as the input entries. If the context is cancelled, in-flight fetches are abandoned and the context error is returned in the remaining results.