skills

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 66 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package skills ports the skills system, bundled skills, slash commands, hub, guard, and skill tools

Index

Constants

View Source
const (
	MaxNameLength        = 64
	MaxDescriptionLength = 1024
)

Progressive disclosure limits on a listed skill name and description

View Source
const (
	IndexURL = "https://icebath.app/api/skills-index.json"
	IndexTTL = 6 * 3600.0
)
View Source
const (
	LintError   = "error"
	LintWarning = "warning"
)

Lint severities attached to findings

View Source
const (
	MaxSkillContentChars = 100_000
	MaxSkillFileBytes    = 1_048_576
)

Content and file budgets of skill_manage writes

View Source
const (
	// ScannerBin is the SkillEvaluator executable looked up on PATH
	ScannerBin = "skillevaluator"
	// Tier1Checks are the keyless deterministic SkillEvaluator checks run at install time
	Tier1Checks = "pii,unicode,lint,license,security"
	// ScanTimeoutSeconds bounds one Tier 1 scan
	ScanTimeoutSeconds = 120
)
View Source
const (
	TierProject = iota
	TierLocal
	TierCreateDir
	TierExternal
)

Precedence tiers, lowest wins

View Source
const (
	StateActive   = "active"
	StateStale    = "stale"
	StateArchived = "archived"
)
View Source
const (
	ReadinessAvailable   = "available"
	ReadinessSetupNeeded = "setup_needed"
	ReadinessUnsupported = "unsupported"
)

Readiness states a skill_view result reports

View Source
const AmbiguousSkillPrefix = "Ambiguous skill name "

Leading words of every same tier ambiguity refusal

View Source
const BackgroundReview = "background_review"

Write origin the self improvement review fork binds before its tool loop

View Source
const CatalogPageRetries = 5

Consecutive failed catalog page fetches before a walk gives up as partial

View Source
const DistSwapDir = ".icebath-dist"

Directory profile distribution installs stage into before an atomic swap

View Source
const IndexCacheTTL = 3600.0

Seconds a shared index cache entry stays fresh

View Source
const NoBundledSkillsMarker = ".no-bundled-skills"

Marker file that limits sync to the essential skills on an opted out profile

View Source
const ScannerVersion = "skills-guard-v10"

Version stamped into scan provenance so cached verdicts expire with the rules

View Source
const SkillConfigPrefix = "skills.config"

Config prefix under which skill config values live

View Source
const SkillPromptDescLimit = 60

Description width the system prompt index shows per row

Variables

View Source
var AppAvailability func(name string) (declared bool, offerable bool)

AppAvailability answers whether a declared app has a registered declaration this host can offer

View Source
var DefaultGitHubTaps = func() []GitHubTap {
	taps := []GitHubTap{
		{"openai/skills", "skills/.curated/", ""}, {"openai/skills", "skills/.system/", ""},
		{"anthropics/skills", "skills/", ""}, {"huggingface/skills", "skills/", ""}, {"NVIDIA/skills", "skills/", ""},
		{"wandb/skills", "skills/", ""}, {"qdrant/skills", "skills/", ""}, {"pinecone-io/skills", "skills/", ""},
		{"garrytan/gstack", "", ""}, {"K-Dense-AI/scientific-agent-skills", "skills/", "science"},
	}
	for _, c := range []string{"biology", "chemistry", "cloud-compute", "coding", "data-engineering", "databases",
		"document-parsing", "llm-tools", "ml-inference", "ml-training", "other", "physics", "quantum", "research",
		"scholar-evaluation", "visualization", "writing"} {
		taps = append(taps, GitHubTap{"synthetic-sciences/openscience", "backend/cli/skills/" + c + "/", "science"})
	}
	return taps
}()

Taps every GitHub source searches before the user taps

View Source
var EssentialSkills = map[string]bool{"icebath-agent": true}

Skills that can never be disabled because the system prompt points at them

View Source
var ExcludedSkillDirs = map[string]bool{
	".git": true, ".github": true, ".hub": true, ".archive": true, ".curator_backups": true, ".locks": true,
	DistSwapDir: true, ".venv": true, "venv": true, "node_modules": true, "site-packages": true,
	"__pycache__": true, ".tox": true, ".nox": true, ".pytest_cache": true, ".mypy_cache": true, ".ruff_cache": true,
}

Directory names never scanned for skills

View Source
var GitHubTapProviders = map[string]string{
	"openai/skills": "OpenAI", "anthropics/skills": "Anthropic", "huggingface/skills": "HuggingFace",
	"nvidia/skills": "NVIDIA", "voltagent/awesome-agent-skills": "VoltAgent", "garrytan/gstack": "gstack",
	"minimax-ai/cli": "MiniMax", "wandb/skills": "Weights & Biases", "qdrant/skills": "Qdrant",
	"pinecone-io/skills": "Pinecone",
}

GitHub tap repo to the provider label the docs site catalog shows

View Source
var MetadataKeys = []string{"icebath", "hermes"}

Frontmatter metadata keys read in order, icebath first then the spelling skills written before the rename carry

View Source
var ProtectedBuiltinSkills = map[string]bool{}

Load bearing built-in names the curator never archives or consolidates

View Source
var SecretsClassChecks = map[string]bool{"database_credentials": true, "hardcoded_secrets": true, "jwt_tokens": true,
	"webhook_urls": true, "aws_identifiers": true, "github_tokens": true, "private_keys": true}

SecretsClassChecks are the pii categories that indicate a possibly real credential

View Source
var SkillSupportDirs = map[string]bool{"references": true, "templates": true, "assets": true, "scripts": true}

Support directories inside a skill package loaded through skill_view file_path

View Source
var TransientDirs = map[string]bool{
	".venv": true, "venv": true, "env": true, ".env": true,
	"node_modules": true, "__pycache__": true,
	".pytest_cache": true, ".mypy_cache": true, ".ruff_cache": true,
	".git": true,
}

Transient local artifact directory names never swept into a ledger snapshot or a curator tarball

View Source
var TrustRank = map[string]int{"builtin": 2, "trusted": 1, "community": 0}

Ordering of trust levels, unknown levels rank as community

View Source
var TrustedRepos = map[string]bool{
	"openai/skills": true, "anthropics/skills": true, "huggingface/skills": true, "NVIDIA/skills": true,
	"wandb/skills": true, "qdrant/skills": true, "pinecone-io/skills": true,
}

Repositories whose skills install as trusted

Functions

func ActivityCount

func ActivityCount(rec *jsonutil.Object) (int64, error)

Total use, view and patch events of a record

func AmbiguousSkillLabel

func AmbiguousSkillLabel(identifier string, payload map[string]any) (string, bool)

Ambiguity label naming the exact load names of a same tier collision, false otherwise

func AppendUserInstruction

func AppendUserInstruction(parts *[]string, instruction string) string

Appends the volatile user instruction and returns the stable scaffold prefix ending at its marker

func ApplySkillPending

func ApplySkillPending(ctx context.Context, env *tools.Env, payload map[string]any) string

Replays an approved staged skill write past the approval gate

func BlueprintToJobSpec

func BlueprintToJobSpec(spec *BlueprintSpec, name string) *jsonutil.Object

Cron create_job kwargs of a spec, the one translation the job and suggestion paths share

func BundledFS

func BundledFS() fs.FS

Bundled skills tree rooted at the category directories

func CheckPackageForMalware

func CheckPackageForMalware(command string, args []string) (string, error)

Blocked message when an npx, uvx or pipx package has MAL advisories, empty when clean or unchecked

func ClearSkillsCache

func ClearSkillsCache()

Drops every scanned catalog so the next listing scans again without waiting out the TTL

func ClearSkillsSystemPromptCache

func ClearSkillsSystemPromptCache(home string, disk bool)

Drops the in process skills prompt cache and with disk also the home snapshot file

func ClipSkillDescription

func ClipSkillDescription(desc string) string

Description fitted to the index budget and cut at a word boundary

func CommandSnapshot

func CommandSnapshot(cmds SkillCommands) map[string]any

Slug to description snapshot of a command map for diffing

func ContentHash

func ContentHash(skillPath string) string

Short integrity hash of a skill directory symmetric with the bundle hash

func CurrentWriteOrigin

func CurrentWriteOrigin(env *tools.Env) string

Write origin bound on the env, foreground for every regular agent

func DescribeSkillInvocation

func DescribeSkillInvocation(content, separator string) (string, bool)

Short description of a skill invocation or auto load turn, false for any other text

func DetermineVerdict

func DetermineVerdict(findings []Finding) string

DetermineVerdict maps findings to safe, caution, or dangerous by their worst severity

func DiffCommandSnapshots

func DiffCommandSnapshots(before, after map[string]any) map[string]any

Added, removed, unchanged and total between two name to description snapshots

func DirHash

func DirHash(directory string) string

MD5 of a directory's package paths and content excluding generated runtime state

func EditSkill

func EditSkill(ctx context.Context, env *tools.Env, name, content string) map[string]any

Full SKILL.md rewrite of an existing skill as a plain result map

func ExtractUserInstructionFromSkillMessage

func ExtractUserInstructionFromSkillMessage(content string) (string, bool)

User instruction of a skill invocation turn, false when the text carries no instruction

func FormatASTReport

func FormatASTReport(findings []ASTFinding, skillName string) string

Plain text report of findings grouped by file with the diagnostic footer

func FormatMissingSkills

func FormatMissingSkills(missing []string) string

Ambiguity labels then one unknown skills line

func FormatScanReport

func FormatScanReport(result ScanResult) string

Compact multi line report with findings sorted critical to low

func FormatTier1Report

func FormatTier1Report(report Tier1Report, limit int) string

Console advisory summary of a Tier 1 report, empty when the scan was unavailable

func GetDisabledSkills

func GetDisabledSkills(cfg map[string]any, platform string) map[string]bool

Disabled skill names, the global list unioned with the platform list when a platform is given

func IndexEntries

func IndexEntries(prompt any) map[string]string

Index row text by skill name for every skill in the prompt available_skills block, names only rows mapping to empty

func InvalidatePluginSkillCommands

func InvalidatePluginSkillCommands()

Drops the cached plugin skill projection

func IsBackgroundReview

func IsBackgroundReview(env *tools.Env) bool

Reports whether the env runs inside the background review fork

func IsExcludedSkillPath

func IsExcludedSkillPath(path, root string) bool

Reports whether a path has an excluded directory component or sits in a skill support package

func IsProtectedBuiltin

func IsProtectedBuiltin(name string) bool

Reports whether a skill name is a protected built-in

func IsSuspiciousBinaryExtension

func IsSuspiciousBinaryExtension(ext string) bool

IsSuspiciousBinaryExtension reports whether a bundled file extension cannot be scanned

func IsValidNamespace

func IsValidNamespace(candidate string) bool

Reports whether a plugin namespace is well formed, the check a plugin data namespace has to pass

func IterSkillIndexFiles

func IterSkillIndexFiles(skillsDir, filename string) []string

Sorted SKILL.md style index paths under a skills dir, skipping excluded trees and skill support dirs

func LatestActivityAt

func LatestActivityAt(rec *jsonutil.Object) any

Newest use, view or patch timestamp text of a record, nil when none parses

func OptionalFS

func OptionalFS() fs.FS

Optional skills tree rooted at the category directories

func ParseFrontmatter

func ParseFrontmatter(content string) (map[string]any, string)

Splits YAML frontmatter from a markdown body, falling back to key value line splitting on bad YAML

func ReadSkillName

func ReadSkillName(skillMD string, fallback string) string

Exported form for pkg/memory, same answer as the package reader

func RegisterBlueprintSuggestion

func RegisterBlueprintSuggestion(ctx context.Context, spec *BlueprintSpec) (map[string]any, error)

Registers an installed blueprint as a suggested cron job, nil when skipped

func RegisterCoreCommandResolver

func RegisterCoreCommandResolver(fn func(name string) bool)

Installs the core slash command lookup, pkg/commands registers its Resolve at init

func RegisterCronBlueprintHooks

func RegisterCronBlueprintHooks(add func(ctx context.Context, title, description, source string, jobSpec *jsonutil.Object, dedupKey string) (map[string]any, error))

Installs the cron suggestion registrar the blueprint bridge calls

func RegisterLifecycleDispatch

func RegisterLifecycleDispatch(d LifecycleDispatch)

Installs the lifecycle dispatch skill telemetry emits through

func RegisterPluginSkillHost

func RegisterPluginSkillHost(fn func(ctx context.Context, home string) PluginSkillHost)

Installs the plugin skill host factory, called by pkg/plugins at init

func RegisterSecretResolver

func RegisterSecretResolver(fn func(ctx context.Context, name string) (string, bool, error))

Installs the secret_scope.get_secret port, pkg/provider passes its GetSecret

func RegisterStablePrefixSink

func RegisterStablePrefixSink(fn func(prefix string))

Installs the prompt cache boundary registry, called by pkg/provider at init with RegisterStablePrefix

func ResetBackgroundReviewReadMarks

func ResetBackgroundReviewReadMarks(env *tools.Env)

Starts a fresh read set for the current review run

func ResetSkillViewDedup

func ResetSkillViewDedup(taskID string)

Clears the skill view dedup cache of one task, every task when taskID is empty

func ResolveSlashKey

func ResolveSlashKey[V any](command string, table map[string]V) (string, bool)

"/slug" for a command present in table, underscores tried as hyphens, false otherwise

func SaveDisabledSkills

func SaveDisabledSkills(ctx context.Context, h string, cfg map[string]any, disabled map[string]bool, platform string) error

Persists disabled skill names globally or for one platform, essential skills dropped

func SetContextSecretCaptureCallback

func SetContextSecretCaptureCallback(cb ContextSecretCaptureFunc)

Installs the process wide secret capture callback that reads the caller's session from its context

func SetCurrentWriteOrigin

func SetCurrentWriteOrigin(env *tools.Env, origin string)

Binds the skill write origin on a session env, foreground when origin is empty

func SetReviewAttended

func SetReviewAttended(env *tools.Env, attended bool)

Marks whether a user attends the background review

func ShouldAllowInstall

func ShouldAllowInstall(result ScanResult, force bool) (*bool, string)

Install decision from verdict and trust, allowed nil when policy says ask

func SkillCommandCollisionNote

func SkillCommandCollisionNote(name string) (string, bool)

Note shown when the slug of a skill name is a core command or alias, false otherwise

func SkillFileLock

func SkillFileLock(ctx context.Context, lockPath string) (context.Context, func(), error)

Exclusive cross process lock on a path, reentrant for callers holding the returned context

func SkillManageSchema

func SkillManageSchema() *jsonutil.Object

Schema of the skill_manage tool advertising only the operations array

func SkillSettingsForShow

func SkillSettingsForShow() ([]config.SkillConfigVar, map[string]any, error)

Skill config declarations and their resolved values for config show

func SkillViewSchema

func SkillViewSchema() *jsonutil.Object

Schema of the skill_view tool

func SkillsCommand

func SkillsCommand(ctx context.Context, c *cliui.Console, h string) error

Interactive enable and disable of installed skills globally or per platform

func SkillsConfigPlatformLabel

func SkillsConfigPlatformLabel(key string) (string, bool)

SkillsConfigPlatformLabel is the label of a platform the skills configurator offers, false when it offers none

func SkillsListSchema

func SkillsListSchema() *jsonutil.Object

Schema of the skills_list tool

func SkillsLoadedByScaffold

func SkillsLoadedByScaffold(content string) []string

Skill names a complete invocation, bundle or auto load scaffold activated, empty for other text

func SkillsTrustCommand

func SkillsTrustCommand(ctx context.Context, h, action, rawPath string, out io.Writer) error

Adds or removes a project root in skills.trusted_project_dirs, the cwd checkout when no path is given

func SlugifySkillName

func SlugifySkillName(name string) string

Slash command form of a skill name with spaces and underscores hyphenated and invalid characters stripped

func SortSkills

func SortSkills(skills []map[string]any) []map[string]any

Orders listings by category then name

func SubstituteTemplateVars

func SubstituteTemplateVars(content, skillDir, sessionID string) string

Replaces skill dir and session id template tokens, tokens without a value stay in place

func SwapCoreCommandResolverForTests

func SwapCoreCommandResolverForTests(fn func(name string) bool) (restore func())

Installs fn as the core command lookup and returns the restore of the lookup installed before it

func SwapWalkReadDir

func SwapWalkReadDir(f func(dir string) ([]os.DirEntry, error)) (restore func())

Replaces the directory listing of the skill tree walk until the returned restore runs

func SyncSkills

func SyncSkills(ctx context.Context, quiet bool) (map[string]any, error)

Syncs bundled skills into the home of ctx and returns the per category result

func SyncSkillsMain

func SyncSkillsMain(ctx context.Context) error

Script entry that syncs the home of ctx loudly and prints the new, updated and unchanged summary line

func ThreatPatternByID

func ThreatPatternByID(id string) *regexp2.Regexp

ThreatPatternByID returns the compiled regex behind one finding id so install scanners can locate its token

func WithLedgerActor

func WithLedgerActor(ctx context.Context, actor string) context.Context

Context binding an explicit ledger actor, an empty actor clears the override

func WithTurnSecretCapture

func WithTurnSecretCapture(ctx context.Context, cb SecretCaptureFunc) context.Context

Binds a secret capture callback for one turn, winning over the process wide callback

Types

type ASTFinding

type ASTFinding struct {
	File        string
	Line        int
	PatternID   string
	Description string
}

One AST deep scan hit, the (file, line, pattern_id, description) tuple of tools/skills_ast_audit.py

func ASTScanPath

func ASTScanPath(path string) []ASTFinding

Findings of one .py file or every .py under a directory outside ignored dirs, none for other paths

type BlueprintError

type BlueprintError struct{ Msg string }

Blueprint block present but malformed, the ValueError subclass of tools/blueprints.py

func (*BlueprintError) Error

func (e *BlueprintError) Error() string

type BlueprintSpec

type BlueprintSpec struct {
	SkillName, Schedule, Deliver string
	Prompt                       *string
	NoAgent                      bool
	Model, Provider              *string
	EnabledToolsets              []string
	Raw                          map[string]any
}

Parsed metadata.icebath.blueprint automation spec of a skill, nil pointers and slices standing for None

func ParseBlueprint

func ParseBlueprint(skillMD string) (*BlueprintSpec, error)

Blueprint spec of a SKILL.md, nil when it is no blueprint and a BlueprintError when the block is malformed

type BrowseItem

type BrowseItem struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Source      string `json:"source"`
	Trust       string `json:"trust"`
	Identifier  string `json:"identifier"`
}

One row of a programmatic browse page

type BrowsePage

type BrowsePage struct {
	Items      []BrowseItem `json:"items"`
	Page       int          `json:"page"`
	TotalPages int          `json:"total_pages"`
	Total      int          `json:"total"`
}

Programmatic browse page

type BrowseShSource

type BrowseShSource struct {
	SourceBase
	// contains filtered or unexported fields
}

Browserbase browse.sh catalog of site specific browser automation skills

func NewBrowseShSource

func NewBrowseShSource(h *Hub) *BrowseShSource

browse.sh adapter over the hub

func (*BrowseShSource) Fetch

func (b *BrowseShSource) Fetch(ctx context.Context, identifier string) (bundle *SkillBundle, err error)

SKILL.md of one catalog skill from its detail skillMdUrl or a raw GitHub source URL

func (*BrowseShSource) Inspect

func (b *BrowseShSource) Inspect(ctx context.Context, identifier string) (m *SkillMeta, err error)

Catalog metadata of one skill

func (*BrowseShSource) Search

func (b *BrowseShSource) Search(ctx context.Context, query string, limit int) (out []SkillMeta, err error)

Catalog skills matching the query

type BundleError

type BundleError struct{ Class, Msg string }

Refusal of a bundle CRUD call: Class is ValueError for unusable input, FileExistsError for a bundle file already present and FileNotFoundError for one that is missing

func (*BundleError) Error

func (e *BundleError) Error() string

func (*BundleError) Is

func (e *BundleError) Is(target error) bool

Matches fs.ErrExist for the existing bundle refusal and fs.ErrNotExist for the missing one

type BundleFile

type BundleFile struct {
	Path   string
	Data   []byte
	Binary bool
}

One bundle member, Binary set when the registry delivered bytes rather than text

type BundlesArgs

type BundlesArgs struct {
	Action      string
	Name        string
	Skill       []string
	Description string
	Instruction string
	Force       bool
}

Namespace of one icebath bundles command line, the action empty when no subcommand was given

type BundlesCLI

type BundlesCLI struct {
	Scope     *Scope
	Out       io.Writer
	LineInput func(prompt string) (string, error)
}

Bundles command runner over a scope, printing to Out and reading skill names through LineInput

func NewBundlesCLI

func NewBundlesCLI(s *Scope, out io.Writer) *BundlesCLI

Runner over the scope writing to out and reading from the default terminal

func (*BundlesCLI) BundlesCommand

func (b *BundlesCLI) BundlesCommand(ctx context.Context, a BundlesArgs) (int, error)

Dispatches one bundles command line, listing when no subcommand handler applies

type ClawHubSource

type ClawHubSource struct {
	SourceBase

	BaseURL                                    string
	CatalogWalkBudgetSeconds                   float64
	ZipDownloadMaxBytes, ZipDownloadChunkBytes int64
	// contains filtered or unexported fields
}

ClawHub registry, every skill community trust

func NewClawHubSource

func NewClawHubSource(h *Hub) *ClawHubSource

ClawHub source with the upstream endpoint and download bounds

func (*ClawHubSource) EnrichOwners

func (c *ClawHubSource) EnrichOwners(ctx context.Context, skills []SkillMeta, maxWorkers int, budgetSeconds *float64) int

Fills missing owner handles in place through a worker pool, stopping on budget or fifty straight failures

func (*ClawHubSource) Fetch

func (c *ClawHubSource) Fetch(ctx context.Context, identifier string) (b *SkillBundle, err error)

Skill downloaded as the ZIP bundle, the version metadata files when the ZIP lacks SKILL.md

func (*ClawHubSource) Inspect

func (c *ClawHubSource) Inspect(ctx context.Context, identifier string) (m *SkillMeta, err error)

Detail metadata of a skill with its owner qualified identifier

func (*ClawHubSource) Search

func (c *ClawHubSource) Search(ctx context.Context, query string, limit int) (out []SkillMeta, err error)

Direct slug hit, catalog search, or the paginated catalog, falling back to the listing API

type ContextSecretCaptureFunc

type ContextSecretCaptureFunc func(ctx context.Context, name, prompt string, metadata map[string]any) (map[string]any, error)

Process wide secret capture callback resolving its owner from the calling context

type Finding

type Finding struct {
	PatternID   string `json:"pattern_id"`
	Severity    string `json:"severity"`
	Category    string `json:"category"`
	File        string `json:"file"`
	Line        int    `json:"line"`
	Match       string `json:"match"`
	Description string `json:"description"`
}

Finding is one matched threat pattern or structural anomaly

func ScanFile

func ScanFile(filePath string, relPath string) []Finding

Threat pattern and invisible unicode scan of one file, findings deduped per pattern per line

type GitHubAuth

type GitHubAuth struct {
	S *Scope
	// contains filtered or unexported fields
}

GitHub API credentials tried as PAT, gh CLI, GitHub App, then anonymous, skipping rejected ones

func NewGitHubAuth

func NewGitHubAuth(s *Scope) *GitHubAuth

Credential chain over the scope secrets

func (*GitHubAuth) AuthMethod

func (a *GitHubAuth) AuthMethod() string

One of pat, gh-cli, github-app or anonymous

func (*GitHubAuth) GetHeaders

func (a *GitHubAuth) GetHeaders() map[string]string

Accept header plus the token authorization when a credential resolves

func (*GitHubAuth) IsAuthenticated

func (a *GitHubAuth) IsAuthenticated() bool

Whether any credential resolves

func (*GitHubAuth) Reject

func (a *GitHubAuth) Reject(token string)

Stops sending a token GitHub answered 401 to so the next credential and anonymous get tried

func (*GitHubAuth) Rejected

func (a *GitHubAuth) Rejected() []string

Labels of the credentials GitHub answered 401 to, in rejection order

type GitHubSource

type GitHubSource struct {
	SourceBase

	Auth *GitHubAuth
	Taps []GitHubTap
	// contains filtered or unexported fields
}

Skills of GitHub repos read through the Contents and Trees APIs

func NewGitHubSource

func NewGitHubSource(h *Hub, auth *GitHubAuth, extraTaps []GitHubTap) *GitHubSource

Source over the default taps followed by the extra taps

func (*GitHubSource) CurrentRevision

func (g *GitHubSource) CurrentRevision(ctx context.Context, identifier string) (rev string, err error)

Tree sha the default branch resolves to, one cached tree lookup per repo

func (*GitHubSource) Fetch

func (g *GitHubSource) Fetch(ctx context.Context, identifier string) (b *SkillBundle, err error)

Skill directory downloaded at the pinned tree revision

func (*GitHubSource) Inspect

func (g *GitHubSource) Inspect(ctx context.Context, identifier string) (m *SkillMeta, err error)

SKILL.md metadata of a skill for preview

func (*GitHubSource) IsRateLimited

func (g *GitHubSource) IsRateLimited() bool

Whether a terminal rate limit exhaustion happened during this flow

func (*GitHubSource) Search

func (g *GitHubSource) Search(ctx context.Context, query string, limit int) ([]SkillMeta, error)

Search across every tap without a provider filter

func (*GitHubSource) SearchProvider

func (g *GitHubSource) SearchProvider(ctx context.Context, query string, limit int, providerFilter string) ([]SkillMeta, error)

Substring matches of every tap of the provider, deduped by trust and cut to limit

func (*GitHubSource) TrustLevelFor

func (g *GitHubSource) TrustLevelFor(identifier string) string

Trusted when the owner and repo of the identifier is a trusted repo

type GitHubTap

type GitHubTap struct{ Repo, Path, Bucket string }

Repo, path and bucket of one GitHub tap, an empty bucket meaning none

type Hub

type Hub struct {
	S                                                                                                             *Scope
	HubDirOverride, LockFileOverride, QuarantineDirOverride, AuditLogOverride, TapsFileOverride, IndexDirOverride string
	// contains filtered or unexported fields
}

Skills hub state paths and network seams of one scope, each override standing in for a patched module path

func NewHub

func NewHub(s *Scope) *Hub

Hub over a scope with live path resolution

func (*Hub) AppendAuditLog

func (h *Hub) AppendAuditLog(action, skillName, source, trustLevel, verdict, extra string) error

Appends one space separated line to the audit log, a failed write only logged

func (*Hub) AuditLogPath

func (h *Hub) AuditLogPath() string

Append only audit log of hub actions

func (*Hub) CheckForSkillUpdates

func (h *Hub) CheckForSkillUpdates(ctx context.Context, name string, lock *HubLockFile, sources []SkillSource, auth *GitHubAuth) ([]SkillUpdateCheck, error)

Checks installed hub skills against the adapters of their recorded source only

func (*Hub) EnsureHubDirs

func (h *Hub) EnsureHubDirs() error

Creates the hub dir, quarantine, index cache and empty state files when missing

func (*Hub) HTTPSession

func (h *Hub) HTTPSession(ctx context.Context) (context.Context, func())

Context reusing one SSRF safe client for a single hub resolution, release closes it

func (*Hub) HubDir

func (h *Hub) HubDir() string

Hub state directory under the skills dir

func (*Hub) IndexCacheDir

func (h *Hub) IndexCacheDir() string

Shared index cache directory of every adapter

func (*Hub) InstallFromQuarantine

func (h *Hub) InstallFromQuarantine(ctx context.Context, quarantinePath, skillName, category string, b *SkillBundle,
	scan ScanResult, scanProvenance *jsonutil.Object) (string, error)

Moves a scanned skill from quarantine into the skills dir and records its provenance

func (*Hub) LockFile

func (h *Hub) LockFile(path string) *HubLockFile

Lock file at path, the hub lock path when empty

func (*Hub) LockFilePath

func (h *Hub) LockFilePath() string

Provenance lock file of installed hub skills

func (*Hub) ParallelSearchSources

func (h *Hub) ParallelSearchSources(ctx context.Context, sources []SkillSource, query string, perSourceLimits map[string]int,
	sourceFilter string, overallTimeout time.Duration, onSourceDone func(string, int)) ([]SkillMeta, *jsonutil.Object, []string)

Merged results, per source counts in completion order and the ids of sources that timed out

func (*Hub) QuarantineBundle

func (h *Hub) QuarantineBundle(b *SkillBundle) (string, error)

Writes a bundle into its quarantine directory after validating every member path

func (*Hub) QuarantineDir

func (h *Hub) QuarantineDir() string

Directory downloaded bundles wait in before install

func (*Hub) Taps

func (h *Hub) Taps(path string) *TapsManager

Tap list at path, the hub taps path when empty

func (*Hub) TapsFilePath

func (h *Hub) TapsFilePath() string

Custom GitHub tap list file

func (*Hub) UnifiedSearch

func (h *Hub) UnifiedSearch(ctx context.Context, query string, sources []SkillSource, sourceFilter string, limit int) []SkillMeta

Parallel search deduped by trust and stably ranked by trust before the limit cut

func (*Hub) UninstallSkill

func (h *Hub) UninstallSkill(ctx context.Context, skillName string) (bool, string, error)

Removes a hub installed skill inside the skills dir, refusing builtins and unsafe lock paths

type HubCLI

type HubCLI struct {
	S   *Scope
	Hub *Hub
	// Console every command prints to unless one is passed in
	C *consoleutil.Console
	// Plain stdout of print and sys.stdout.write
	Stdout io.Writer
	// input() of the confirm prompt and line_input of the name and category prompts
	Input     func(prompt string) (string, error)
	LineInput func(prompt string) (string, error)
	Now       func() time.Time
	// GitHub repos API base and client of the publish flow
	GitHubAPI  string
	HTTPClient *http.Client
	// Source router of every hub command, nil builds the configured router as _sources does
	Sources func() []SkillSource
	// contains filtered or unexported fields
}

Skills hub command runner over one scope with its module state as fields

func NewHubCLI

func NewHubCLI(s *Scope) *HubCLI

Hub command runner over a scope, printing to stdout

func (*HubCLI) BrowseSkills

func (x *HubCLI) BrowseSkills(ctx context.Context, page, pageSize int, source string) BrowsePage

Paginated hub browse for programmatic callers such as the TUI gateway

func (*HubCLI) DoAudit

func (x *HubCLI) DoAudit(ctx context.Context, name string, c *consoleutil.Console, deep bool) error

Re-scans installed hub skills, deep adding the AST diagnostic

func (*HubCLI) DoBrowse

func (x *HubCLI) DoBrowse(ctx context.Context, page, pageSize int, source string, c *consoleutil.Console)

Browses every registry paginated with official skills first

func (*HubCLI) DoCheck

func (x *HubCLI) DoCheck(ctx context.Context, name string, c *consoleutil.Console) error

Checks hub installed skills for upstream updates

func (*HubCLI) DoDiff

func (x *HubCLI) DoDiff(ctx context.Context, name string, c *consoleutil.Console) error

Shows how the user copy of a bundled skill differs from the stock version

func (*HubCLI) DoInspect

func (x *HubCLI) DoInspect(ctx context.Context, identifier string, c *consoleutil.Console)

Previews a skill SKILL.md without installing

func (*HubCLI) DoInstall

func (x *HubCLI) DoInstall(ctx context.Context, identifier string, o HubInstallOptions) (HubOutcome, error)

Fetches, quarantines, scans, confirms and installs a skill

func (*HubCLI) DoList

func (x *HubCLI) DoList(ctx context.Context, sourceFilter string, enabledOnly bool, c *consoleutil.Console) error

Lists installed skills as hub, builtin or local with their enabled state in the active profile

func (*HubCLI) DoListModified

func (x *HubCLI) DoListModified(ctx context.Context, c *consoleutil.Console, asJSON bool) error

Lists the bundled skills the user has edited

func (*HubCLI) DoOptIn

func (x *HubCLI) DoOptIn(ctx context.Context, sync bool, c *consoleutil.Console, deferCache bool) error

Removes the opt out marker, sync re-seeding bundled skills now

func (*HubCLI) DoOptOut

func (x *HubCLI) DoOptOut(ctx context.Context, remove bool, c *consoleutil.Console, skipConfirm, deferCache bool) error

Writes the bundled skills opt out marker, remove also deleting pristine bundled skills

func (*HubCLI) DoPublish

func (x *HubCLI) DoPublish(ctx context.Context, skillPath, target, repo string, c *consoleutil.Console) error

Publishes a local skill to a registry after a security scan

func (*HubCLI) DoRepairOfficial

func (x *HubCLI) DoRepairOfficial(ctx context.Context, name string, restore bool, c *consoleutil.Console, skipConfirm, deferCache bool) error

Backfills or restores official optional skills from repo source

func (*HubCLI) DoReset

func (x *HubCLI) DoReset(ctx context.Context, name string, restore bool, c *consoleutil.Console, skipConfirm, deferCache bool) error

Resets a bundled skill manifest entry, restore also re-copying the bundled version

func (*HubCLI) DoSearch

func (x *HubCLI) DoSearch(ctx context.Context, query, source string, limit int, c *consoleutil.Console, asJSON bool) error

Searches the registries and prints a table, or a JSON array for scripting

func (*HubCLI) DoSnapshotExport

func (x *HubCLI) DoSnapshotExport(ctx context.Context, outputPath string, c *consoleutil.Console) error

Exports the hub skill configuration to a portable JSON file, a dash writing it to stdout

func (*HubCLI) DoSnapshotImport

func (x *HubCLI) DoSnapshotImport(ctx context.Context, inputPath string, force bool, c *consoleutil.Console) (HubOutcome, error)

Re-installs skills from a snapshot file, failing when it is unreadable or any entry failed

func (*HubCLI) DoTap

func (x *HubCLI) DoTap(ctx context.Context, action, repo string, c *consoleutil.Console) error

Manages taps, the custom GitHub repo sources

func (*HubCLI) DoUninstall

func (x *HubCLI) DoUninstall(ctx context.Context, name string, c *consoleutil.Console, skipConfirm, deferCache bool) (HubOutcome, error)

Removes a hub installed skill after confirmation

func (*HubCLI) DoUpdate

func (x *HubCLI) DoUpdate(ctx context.Context, name string, c *consoleutil.Console, force bool) (HubOutcome, error)

Updates hub installed skills, skipping locally edited ones unless forced

func (*HubCLI) InspectSkill

func (x *HubCLI) InspectSkill(ctx context.Context, identifier string) *InspectResult

Metadata of a skill with its SKILL.md preview, nil when unresolved

func (*HubCLI) ResolvedSources

func (x *HubCLI) ResolvedSources() []SkillSource

Source list the CLI searches, the Sources seam when set else the hub's router

func (*HubCLI) SkillsCommand

func (x *HubCLI) SkillsCommand(ctx context.Context, a SkillsArgs) (int, error)

Routes icebath skills subcommands and returns the exit code, 1 when a handler reported failure

type HubInstallOptions

type HubInstallOptions struct {
	Category           string
	Force, SkipConfirm bool
	// Leaves the prompt cache alone, as invalidate_cache=False
	DeferCache   bool
	NameOverride string
	// Adapter the identifier is pinned to, empty for none
	SourceID string
	Console  *consoleutil.Console
}

Options of one hub install, the zero value matching the Python defaults except DeferCache

type HubLockFile

type HubLockFile struct {
	// contains filtered or unexported fields
}

Lock file of installed hub skill provenance

func (*HubLockFile) ByIdentifier

func (l *HubLockFile) ByIdentifier() (map[string]*jsonutil.Object, error)

Installed entries keyed by identifier plus the clawhub/<slug> alias of each ClawHub row, exact ids winning

func (*HubLockFile) ByIdentifierObject

func (l *HubLockFile) ByIdentifierObject() (*jsonutil.Object, error)

Installed entries keyed by identifier in lock order, ClawHub catalog aliases after them, exact ids winning

func (*HubLockFile) GetInstalled

func (l *HubLockFile) GetInstalled(name string) (any, error)

Installed entry of a skill name, nil when absent

func (*HubLockFile) ListInstalled

func (l *HubLockFile) ListInstalled() ([]*jsonutil.Object, error)

Installed entries each led by its name

func (*HubLockFile) Load

func (l *HubLockFile) Load() (*jsonutil.Object, error)

Whole lock document

func (*HubLockFile) RecordInstall

func (l *HubLockFile) RecordInstall(ctx context.Context, name, source, identifier, trustLevel, scanVerdict, skillHash, installPath string,
	files []string, metadata, scanProvenance *jsonutil.Object) error

Records one install after validating the name and install path shape a later uninstall trusts

func (*HubLockFile) RecordUninstall

func (l *HubLockFile) RecordUninstall(ctx context.Context, name string) error

Drops one installed entry

func (*HubLockFile) Save

func (l *HubLockFile) Save(ctx context.Context, data *jsonutil.Object) error

Rewrites the lock document keeping non ASCII text

type HubOutcome

type HubOutcome int8

Result of a hub command that Python returns as True, False or None

const (
	HubNoop   HubOutcome = 0
	HubOK     HubOutcome = 1
	HubFailed HubOutcome = -1
)

type IndexSource

type IndexSource struct {
	SourceBase

	Auth *GitHubAuth
	// contains filtered or unexported fields
}

Skills of the centralized index, every method empty when the index is unavailable

func NewIndexSource

func NewIndexSource(h *Hub, auth *GitHubAuth) *IndexSource

Index source sharing the credentials for its GitHub fetches

func (*IndexSource) Fetch

func (x *IndexSource) Fetch(ctx context.Context, identifier string) (b *SkillBundle, err error)

Bundle of the resolved GitHub id or repo path, a skills.sh slug located in the repo tree as a last resort

func (*IndexSource) Inspect

func (x *IndexSource) Inspect(ctx context.Context, identifier string) (m *SkillMeta, err error)

Index metadata of the identifier

func (*IndexSource) IsAvailable

func (x *IndexSource) IsAvailable() bool

Whether the index loaded with at least one skill

func (*IndexSource) Search

func (x *IndexSource) Search(ctx context.Context, query string, limit int) ([]SkillMeta, error)

Search without a provider filter

func (*IndexSource) SearchProvider

func (x *IndexSource) SearchProvider(ctx context.Context, query string, limit int, providerFilter string) (out []SkillMeta, err error)

Ranked index matches, exact name first then prefix, provider, whole word, substring, other

func (*IndexSource) TrustLevelFor

func (x *IndexSource) TrustLevelFor(identifier string) string

Trust level recorded for the identifier in the index, community otherwise

type InspectResult

type InspectResult struct {
	Name           string   `json:"name"`
	Description    string   `json:"description"`
	Source         string   `json:"source"`
	Identifier     string   `json:"identifier"`
	Tags           []string `json:"tags"`
	SkillMDPreview *string  `json:"skill_md_preview,omitempty"`
}

Skill metadata and SKILL.md preview for programmatic callers

type LedgerMutation

type LedgerMutation struct {
	BeforeRoot     string
	Before         []map[string]string
	BeforeCaptured bool
	AfterRoot      string
	Actor          string
	Evidence       *jsonutil.Object
}

Ledger write a skill mutation records, Before nil with BeforeCaptured false captures from BeforeRoot

type LifecycleDispatch

type LifecycleDispatch struct {
	HasHook    func(ctx context.Context, hookName string) bool
	InvokeHook func(ctx context.Context, hookName string, kwargs map[string]any) []any
}

Lifecycle observers and plugin hooks the top level wiring installs from the lifecycle port

type LintFinding

type LintFinding struct {
	Severity string
	Rule     string
	Message  string
}

One advisory lint result

func LintContent

func LintContent(content, skillDir string) []LintFinding

Lints SKILL.md text, the on disk checks running only when a skill dir is given

func LintSkill

func LintSkill(skillMD string) ([]LintFinding, error)

Lints a SKILL.md on disk with every on disk check enabled

type LobeHubSource

type LobeHubSource struct {
	SourceBase
	// contains filtered or unexported fields
}

LobeHub agent marketplace converted to SKILL.md on fetch

func NewLobeHubSource

func NewLobeHubSource(h *Hub) *LobeHubSource

LobeHub adapter over the hub

func (*LobeHubSource) Fetch

func (l *LobeHubSource) Fetch(ctx context.Context, identifier string) (b *SkillBundle, err error)

One agent converted to a SKILL.md bundle

func (*LobeHubSource) Inspect

func (l *LobeHubSource) Inspect(ctx context.Context, identifier string) (m *SkillMeta, err error)

Index metadata of one agent

func (*LobeHubSource) Search

func (l *LobeHubSource) Search(ctx context.Context, query string, limit int) (out []SkillMeta, err error)

Agents whose title, description or tags match the query

type OptionalSkillSource

type OptionalSkillSource struct {
	SourceBase
	// contains filtered or unexported fields
}

Official optional skills of the packaged tree with a live repo fallback, builtin trust

func NewOptionalSkillSource

func NewOptionalSkillSource(h *Hub, auth *GitHubAuth) *OptionalSkillSource

Source over the packaged optional skills tree

func (*OptionalSkillSource) Fetch

func (o *OptionalSkillSource) Fetch(ctx context.Context, identifier string) (b *SkillBundle, err error)

Packaged skill directory, its upstream redirect, or the live repo copy when missing locally

func (*OptionalSkillSource) Inspect

func (o *OptionalSkillSource) Inspect(ctx context.Context, identifier string) (m *SkillMeta, err error)

Local metadata by skill name, else the live repo entry when exactly one remote dir matches

func (*OptionalSkillSource) ListLocal

func (o *OptionalSkillSource) ListLocal() (out []SkillMeta, err error)

Every optional skill of the packaged tree with its frontmatter metadata

func (*OptionalSkillSource) Search

func (o *OptionalSkillSource) Search(ctx context.Context, query string, limit int) (out []SkillMeta, err error)

Local matches up to limit, then live repo skills missing locally whose path contains the query

type PluginSkillHost

type PluginSkillHost interface {
	Discover(ctx context.Context)
	FindPluginSkill(qualified string) (string, bool)
	ListPluginSkills(namespace string) []string
	ListPluginSkillMetadata() []map[string]any
	RemovePluginSkill(qualified string)
	LegacyPortableSkillName(namespace, bare string) string
	ActiveMemoryProvider() (string, error)
	PruneInactiveMemoryProviderSkills(active string) error
	LoadMemoryProvider(name string) error
	SkillOwners(qualified string) []string
	DisabledPlugins() map[string]bool
}

Plugin manager surface skill listing and plugin skill serving consult

type PublishedScopeRow

type PublishedScopeRow struct {
	Home, Project, Signature string
	// Set when the signature could not be computed because a root failed to stat
	NoSignature bool
}

One watched skill scope and its directory change signature

type ScanResult

type ScanResult struct {
	SkillName      string
	Source         string
	TrustLevel     string
	Verdict        string
	Findings       []Finding
	ScannedAt      string
	Summary        string
	ScanProvenance map[string]any
}

ScanResult is the verdict of one skill scan with its findings

func ScanSkill

func ScanSkill(skillPath string, source string) ScanResult

Structural checks plus pattern scan of every text file in a skill dir or a single file

func ScanSkillCached

func ScanSkillCached(skillPath string, source string, sourceURL string, cacheDir string) (ScanResult, map[string]any, error)

Scan plus attestation, the cache serving only identical content under the current scanner version

type Scope

type Scope struct {
	Home     string
	Config   config.Tree
	Secrets  *config.Secrets
	Platform string
	Cwd      string
	Log      *slog.Logger
	// Session env the scope came from, nil for a process scope
	Env *tools.Env
	// Overrides the home skills directory when set
	SkillsDirOverride string
	// contains filtered or unexported fields
}

Scope binds one home, config, platform, and working directory for every skills operation

func NewScope

func NewScope(h string, cfg config.Tree) *Scope

Scope over a home and its config with the process environment supplying platform and cwd

func ScopeFromEnv

func ScopeFromEnv(env *tools.Env) *Scope

Scope derived from a tool environment

func (*Scope) AdoptSkill

func (s *Scope) AdoptSkill(ctx context.Context, name string) (bool, string, error)

Hands a local skill to curator management, refusing hub, external, bundled and protected skills

func (*Scope) AllSkillsDirs

func (s *Scope) AllSkillsDirs() []string

Skill dirs in precedence order without trusted project dirs

func (*Scope) ArchiveSkill

func (s *Scope) ArchiveSkill(ctx context.Context, name string) (bool, string, error)

Moves a curation eligible skill into the flat archive under its name, timestamped on collision

func (*Scope) BlueprintSpecForInstalled

func (s *Scope) BlueprintSpecForInstalled(skillName string) (*BlueprintSpec, error)

Blueprint spec of the first <name>/SKILL.md anywhere under the skills tree, nil when none is a blueprint

func (*Scope) BuildAutoLoadPrompt

func (s *Scope) BuildAutoLoadPrompt(ctx context.Context, taskID string, userConfig map[string]any) (string, []string, []string)

skills.auto_load rendered as loaded skill blocks with loaded and missing names, never failing session start

func (*Scope) BuildBundleInvocationMessage

func (s *Scope) BuildBundleInvocationMessage(ctx context.Context, cmdKey, userInstruction, taskID, platform string) (string, []string, []string, bool, error)

Bundle invocation message with loaded and missing members, false when the bundle is unknown or loads nothing

func (*Scope) BuildPreloadedSkillsPrompt

func (s *Scope) BuildPreloadedSkillsPrompt(ctx context.Context, identifiers []string, taskID string, excludedLoadedNames map[string]bool) (string, []string, []string)

Session preload prompt, loaded names and missing identifiers, disabled skills counted as missing

func (*Scope) BuildSkillInvocationMessage

func (s *Scope) BuildSkillInvocationMessage(ctx context.Context, cmdKey, userInstruction, taskID, runtimeNote string) (string, bool, error)

User message for one skill slash command, false when the command or its skill is missing

func (*Scope) BuildSkillMessage

func (s *Scope) BuildSkillMessage(ctx context.Context, loaded map[string]any, skillDir, activationNote, userInstruction, runtimeNote, sessionID string) string

Skill payload message for a loaded skill, the agent lane's slash invoked skill path calls it

func (*Scope) BuildSkillsSystemPrompt

func (s *Scope) BuildSkillsSystemPrompt(ctx context.Context, opts SkillsPromptOptions) (string, error)

Compact skill index for the system prompt, empty under a safe worker or with no skill roots

func (*Scope) BuildStackedSkillInvocationMessage

func (s *Scope) BuildStackedSkillInvocationMessage(ctx context.Context, cmdKeys []string, userInstruction, taskID string) (string, []string, []string, bool, error)

Message, loaded names and missing names of a stacked invocation, false when no skill loaded

func (*Scope) BumpPatch

func (s *Scope) BumpPatch(ctx context.Context, name, action, taskID, sessionID string)

Counts a skill_manage patch or edit and advances the patch generation

func (*Scope) BumpUse

func (s *Scope) BumpUse(ctx context.Context, name, taskID, sessionID string)

Counts a skill use and derives reuse and post patch reuse facts atomically

func (*Scope) BumpView

func (s *Scope) BumpView(ctx context.Context, name string)

Counts a skill view

func (*Scope) BundlePathFor

func (s *Scope) BundlePathFor(name string) (string, error)

Canonical file path of a bundle name, a ValueError when the name slugs to nothing

func (*Scope) BundledSkillForInstall

func (s *Scope) BundledSkillForInstall(identifier string) (string, error)

Bundled skill name an install identifier means, empty when it names none

func (*Scope) BundlesDir

func (s *Scope) BundlesDir() string

Bundles dir, the ICEBATH_BUNDLES_DIR override or the profile skill-bundles dir

func (*Scope) Command

func (s *Scope) Command(ctx context.Context, line, taskID string) (string, bool, error)

Message for a typed skill slash line, stacked skills included, false when the line names no skill

func (*Scope) CuratedReport

func (s *Scope) CuratedReport() ([]*jsonutil.Object, error)

Rows for every curator managed skill plus pinned eligible local skills, with provenance and _persisted

func (*Scope) DeleteBundle

func (s *Scope) DeleteBundle(name string) (string, error)

Deletes a bundle by name and refreshes the cache, a FileNotFoundError when absent

func (*Scope) DetectKanban

func (s *Scope) DetectKanban() bool

Whether the kanban playbook is relevant for this scope, for callers outside the package

func (*Scope) DiffBundledSkill

func (s *Scope) DiffBundledSkill(name string) (map[string]any, error)

Diffs the user copy of a bundled skill against stock per file

func (*Scope) DisabledSkillNames

func (s *Scope) DisabledSkillNames(platform string) map[string]bool

Disabled skill names from config, the global list joined with the platform list minus essentials

func (*Scope) DiscoverAllSkillConfigVars

func (s *Scope) DiscoverAllSkillConfigVars() []SkillConfigVar

Config variable declarations across every enabled platform compatible skill, deduplicated by key

func (*Scope) DisplaySkillCreateDir

func (s *Scope) DisplaySkillCreateDir() string

User facing path where new skills are created

func (*Scope) EnsureBundledSkill

func (s *Scope) EnsureBundledSkill(ctx context.Context, name string) (map[string]any, error)

Makes a bundled skill active, leaving any present copy or hub shadow alone and restoring otherwise

func (*Scope) ExpandInlineShell

func (s *Scope) ExpandInlineShell(ctx context.Context, content, skillDir string, timeout int) string

Replaces every inline shell snippet with its output, run with the skill dir as working dir

func (*Scope) ExternalSkillNames

func (s *Scope) ExternalSkillNames() map[string]bool

Frontmatter names of every skill under the configured external dirs

func (*Scope) ExternalSkillsDirs

func (s *Scope) ExternalSkillsDirs() []string

Validated deduplicated external skill dirs from config, existing dirs only and never the local dir

func (*Scope) FindAllSkills

func (s *Scope) FindAllSkills(skipDisabled bool) []map[string]any

Loadable skills as name, description and category, the name being what skill_view accepts

func (*Scope) FindAllSkillsKanbanScoped

func (s *Scope) FindAllSkillsKanbanScoped() []map[string]any

Loadable skills with kanban skills relevant, the shared filtered catalog entry restored afterwards

func (*Scope) FindProjectRoot

func (s *Scope) FindProjectRoot() string

Project root of the effective working directory, empty when none

func (*Scope) FindSkill

func (s *Scope) FindSkill(name string) (string, bool)

Skill directory by directory name, category path or unique frontmatter name

func (*Scope) Forget

func (s *Scope) Forget(ctx context.Context, name string)

Drops a skill's usage record

func (*Scope) GetBundle

func (s *Scope) GetBundle(name string) (map[string]any, bool, error)

Bundle info by slug normalized name, false when absent

func (*Scope) GetInteractiveSkillCommands

func (s *Scope) GetInteractiveSkillCommands(ctx context.Context) (SkillCommands, error)

Filesystem skills plus profile scoped plugin skills for interactive surfaces only

func (*Scope) GetPluginSkillCommands

func (s *Scope) GetPluginSkillCommands(ctx context.Context) (SkillCommands, error)

Enabled plugin skills projected into the interactive slash namespace with disable lists applied each call

func (*Scope) GetRecord

func (s *Scope) GetRecord(name string) (*jsonutil.Object, error)

Backfilled record for a skill, fresh defaults when missing

func (*Scope) GetSkillBundles

func (s *Scope) GetSkillBundles() (SkillCommands, error)

Current bundle mapping, rescanned only when the bundle files or their content changed

func (*Scope) GetSkillCommands

func (s *Scope) GetSkillCommands() SkillCommands

Command map of the scope, rescanned when the scope is new or its skill dirs changed

func (*Scope) InjectSkillConfig

func (s *Scope) InjectSkillConfig(loaded map[string]any, parts *[]string)

Appends the skill's resolved config values block the way the cron prompt builder reads it

func (*Scope) IsAgentCreated

func (s *Scope) IsAgentCreated(name string) (bool, error)

Neither bundled nor hub installed and not only present in an external dir

func (*Scope) IsBundled

func (s *Scope) IsBundled(name string) (bool, error)

Reports whether a name is a bundled built-in or a pruned one

func (*Scope) IsCurationEligible

func (s *Scope) IsCurationEligible(name, skillPath string) (bool, error)

Agent created yes, bundled only with prune_builtins, hub external and protected never

func (*Scope) IsCuratorManaged

func (s *Scope) IsCuratorManaged(name string) (bool, error)

func (*Scope) IsExternalOnly

func (s *Scope) IsExternalOnly(name string) bool

Reports whether a skill lives only under the external dirs

func (*Scope) IsExternalSkillPath

func (s *Scope) IsExternalSkillPath(path string) bool

Reports whether lifecycle maintenance must treat the path as an externally owned read only skill

func (*Scope) IsHubInstalled

func (s *Scope) IsHubInstalled(name string) bool

func (*Scope) IsLocked

func (s *Scope) IsLocked(name string) (bool, error)

Locked flag of a skill, an error on a corrupt sidecar so the write guard fails closed

func (*Scope) IsProjectRootTrusted

func (s *Scope) IsProjectRootTrusted(root string) bool

Reports whether a project root is listed in skills.trusted_project_dirs

func (*Scope) LedgerAppendEntry

func (s *Scope) LedgerAppendEntry(ctx context.Context, action, skill string, before, after []*jsonutil.Object, actor string, evidence *jsonutil.Object) (string, bool)

Appends one entry over typed manifests, false when the ledger is off or the write failed

func (*Scope) LedgerBlobsDir

func (s *Scope) LedgerBlobsDir() string

Content addressed blob store the ledger manifests point into

func (*Scope) LedgerCaptureBefore

func (s *Scope) LedgerCaptureBefore(ctx context.Context, root string, completePackage bool, skill string) []map[string]string

Pre mutation capture of root, nil when the ledger is off or the capture failed

func (*Scope) LedgerCompact

func (s *Scope) LedgerCompact(ctx context.Context) (int, int, int, error)

Rewrites the ledger with unchanged paths dropped from every entry, returning entries and sizes before and after

func (*Scope) LedgerDeriveActor

func (s *Scope) LedgerDeriveActor(ctx context.Context) string

Explicit actor override, else curator for background review provenance, else agent

func (*Scope) LedgerEnabled

func (s *Scope) LedgerEnabled() bool

Truthiness of skills.ledger, on by default

func (*Scope) LedgerFillSnapshotFromCuratorBackup

func (s *Scope) LedgerFillSnapshotFromCuratorBackup(root string, existing []*jsonutil.Object, skill string) ([]*jsonutil.Object, error)

Manifest unioned with absent package files from the newest curator tarball, root and skill empty for none

func (*Scope) LedgerGCBlobs

func (s *Scope) LedgerGCBlobs(ctx context.Context) (int, int64, error)

Deletes blobs no entry references and older than the grace window, returning count and bytes freed

func (*Scope) LedgerGetEntry

func (s *Scope) LedgerGetEntry(entryID string) (*jsonutil.Object, error)

Ledger row with the given id, nil when absent or the id is empty

func (*Scope) LedgerListEntries

func (s *Scope) LedgerListEntries(skill string, limit int) ([]*jsonutil.Object, error)

Ledger rows newest first filtered by skill when set, limit below zero for all

func (*Scope) LedgerPackagePrefixes

func (s *Scope) LedgerPackagePrefixes(root, skill string, before []*jsonutil.Object) ([]string, error)

Tarball member prefixes of a skill package, root and skill empty for none

func (*Scope) LedgerPath

func (s *Scope) LedgerPath() string

Path of the JSONL skill mutation ledger

func (*Scope) LedgerReadBlob

func (s *Scope) LedgerReadBlob(sha string) ([]byte, bool)

Blob content, false when the hash is malformed or the blob is missing or unreadable

func (*Scope) LedgerRecordMutation

func (s *Scope) LedgerRecordMutation(ctx context.Context, action, skill string, m LedgerMutation) (string, bool)

Records a mutation with its after state from AfterRoot, never failing the mutation itself

func (*Scope) LedgerRollbackEntry

func (s *Scope) LedgerRollbackEntry(ctx context.Context, entryID string) (bool, string, error)

Restores the before state of an entry after appending an undoable pre-rollback safety entry

func (*Scope) LedgerSnapshotPaths

func (s *Scope) LedgerSnapshotPaths(root string, completePackage bool) ([]*jsonutil.Object, error)

Snapshot of root, unioned with the newest curator tarball's package files when completePackage is set

func (*Scope) ListAgentCreatedSkillNames

func (s *Scope) ListAgentCreatedSkillNames() ([]string, error)

Curator manageable skills, agent records plus bundled built-ins when pruning is enabled, never hub

func (*Scope) ListArchivedSkillNames

func (s *Scope) ListArchivedSkillNames() ([]string, error)

Directory names under the archive

func (*Scope) ListBundles

func (s *Scope) ListBundles() ([]map[string]any, error)

Bundle infos sorted by slug

func (*Scope) ListUnmanagedSkillNames

func (s *Scope) ListUnmanagedSkillNames() ([]string, error)

Curation eligible skills without the curator management marker

func (*Scope) ListUserModifiedBundledSkills

func (s *Scope) ListUserModifiedBundledSkills() ([]map[string]any, error)

Bundled skills the user edited, sorted by name with dest and bundled source

func (*Scope) LoadSkillPayload

func (s *Scope) LoadSkillPayload(ctx context.Context, identifier, taskID string) (map[string]any, string, string, bool)

Loaded skill payload, its directory and resolved name, false when the skill cannot be served

func (*Scope) LoadUsage

func (s *Scope) LoadUsage() (*jsonutil.Object, error)

Whole usage map with non object values dropped, empty on a missing or corrupt file

func (*Scope) LockedSkillNames

func (s *Scope) LockedSkillNames() ([]string, error)

Names carrying a truthy locked flag, empty on a corrupt sidecar

func (*Scope) MarkAgentCreated

func (s *Scope) MarkAgentCreated(ctx context.Context, name string)

Opts a skill into curator management

func (*Scope) NormalizeSkillLookupName

func (s *Scope) NormalizeSkillLookupName(identifier string) string

NormalizeSkillLookupName turns a trusted absolute skill path into the relative name skill_view accepts

func (*Scope) PreprocessSkillContent

func (s *Scope) PreprocessSkillContent(ctx context.Context, content, skillDir, sessionID string, skillsCfg map[string]any) string

Applies configured template and inline shell preprocessing, the raw content when preprocessing fails

func (*Scope) ProjectSkillsDirs

func (s *Scope) ProjectSkillsDirs() []string

Trusted project local skill dirs for the current cwd

func (*Scope) Provenance

func (s *Scope) Provenance(name string) (string, error)

Origin label hub, bundled, external or agent

func (*Scope) PublishedScopesSignature

func (s *Scope) PublishedScopesSignature(ctx context.Context) []PublishedScopeRow

Directory signature of the ambient scope plus every published home and project scope

func (*Scope) ReadBundledNames

func (s *Scope) ReadBundledNames() (map[string]bool, error)

Bundled manifest names plus the curator suppression list, for callers ranking the skill catalog

func (*Scope) ReadHubInstalledNames

func (s *Scope) ReadHubInstalledNames() map[string]bool

Hub lock names plus the frontmatter name of each in tree install path, for callers ranking the skill catalog

func (*Scope) ReadSuppressedNames

func (s *Scope) ReadSuppressedNames() (map[string]bool, error)

Built-ins the curator pruned, which the re-seeder leaves archived

func (*Scope) ReanchorClock

func (s *Scope) ReanchorClock(ctx context.Context, name string)

Starts the inactivity clock now once and reactivates a record wrongly marked stale

func (*Scope) RecordCreated

func (s *Scope) RecordCreated(ctx context.Context, name string, agentCreated bool, taskID, sessionID string)

Resets the record for a new logical skill stamped agent or learn and emits created

func (*Scope) RecordInstalled

func (s *Scope) RecordInstalled(ctx context.Context, name string)

Records a successful hub install as an active installed skill

func (*Scope) ReloadBundles

func (s *Scope) ReloadBundles() (map[string]any, error)

Rescans bundles and returns the added, removed, unchanged and total diff

func (*Scope) ReloadSkills

func (s *Scope) ReloadSkills(ctx context.Context) (map[string]any, error)

Rescans every skill scope and the plugin projection and diffs the visible command map

func (*Scope) RemovePristineBundledSkills

func (s *Scope) RemovePristineBundledSkills(ctx context.Context, dryRun bool) (map[string]any, error)

Deletes manifest tracked bundled skills still byte identical to their origin hash

func (*Scope) ResetBundledSkill

func (s *Scope) ResetBundledSkill(ctx context.Context, name string, restore bool) (map[string]any, error)

Clears a bundled skill's manifest entry, deleting the user copy first when restoring, then syncs

func (*Scope) ResolveAutoLoadSkills

func (s *Scope) ResolveAutoLoadSkills(userConfig map[string]any) []string

Deduplicated skills.auto_load names of userConfig, the scope config when nil

func (*Scope) ResolveBundleCommandKey

func (s *Scope) ResolveBundleCommandKey(command string) (string, bool, error)

Slash key of a typed bundle command with underscores matching hyphens

func (*Scope) ResolveSkillCommandKey

func (s *Scope) ResolveSkillCommandKey(ctx context.Context, command string, interactive bool) (string, bool, error)

Command key a typed slash command resolves to, plugin skills included on interactive surfaces

func (*Scope) ResolveSkillConfigValues

func (s *Scope) ResolveSkillConfigValues(vars []SkillConfigVar) map[string]any

Current values of declared config variables, declared defaults filling gaps and paths expanded

func (*Scope) ResolveSkillDir

func (s *Scope) ResolveSkillDir(name, category string) string

Directory a new skill lands in, honoring skills.create_dir

func (*Scope) RestoreOfficialOptionalSkill

func (s *Scope) RestoreOfficialOptionalSkill(ctx context.Context, name string, restore bool) (map[string]any, error)

Restores one or all official optional skills from source, backing up conflicting active copies when restoring

func (*Scope) RestoreSkill

func (s *Scope) RestoreSkill(ctx context.Context, name string) (bool, string, error)

Moves an archived skill back to the flat layout, refusing hub and bundled collisions

func (*Scope) RunInlineShell

func (s *Scope) RunInlineShell(ctx context.Context, command, cwd string, timeout int) string

Runs one inline shell snippet returning trimmed stdout, stderr when stdout is empty, or a failure marker

func (*Scope) SaveBundle

func (s *Scope) SaveBundle(ctx context.Context, name string, skills []string, description, instruction string, overwrite bool) (string, error)

Writes a bundle atomically keeping an existing file's mode and owner, then refreshes the cache

func (*Scope) SaveUsage

func (s *Scope) SaveUsage(ctx context.Context, data *jsonutil.Object) bool

Writes the usage map atomically with sorted keys, true when it committed

func (*Scope) ScanBundles

func (s *Scope) ScanBundles() (SkillCommands, error)

Rebuilds the slash key to bundle cache, a duplicate slug keeping the alphabetically first file

func (*Scope) ScanSkillCommands

func (s *Scope) ScanSkillCommands() SkillCommands

Scans the resolved catalog into a fresh command map and publishes it for the scope

func (*Scope) SeedRecordIfMissing

func (s *Scope) SeedRecordIfMissing(ctx context.Context, name string) error

Seeds a baseline record for a curation eligible skill so its inactivity clock starts at first sight

func (*Scope) SetBundledSkillsOptOut

func (s *Scope) SetBundledSkillsOptOut(enabled bool) map[string]any

Writes or removes the bundled skills opt out marker of the scope home

func (*Scope) SetLocked

func (s *Scope) SetLocked(ctx context.Context, name string, locked bool) bool

Records the user content lock on any skill, true when the write landed

func (*Scope) SetPinned

func (s *Scope) SetPinned(ctx context.Context, name string, pinned bool) bool

Pins or unpins a manageable skill, false when the write did not land

func (*Scope) SetState

func (s *Scope) SetState(ctx context.Context, name, state string)

Sets a lifecycle state on a manageable skill and emits archived, stale or restored on a real change

func (*Scope) SkillCreateDir

func (s *Scope) SkillCreateDir() string

Configured skills.create_dir, empty when unset or equal to the local skills dir

func (*Scope) SkillManage

func (s *Scope) SkillManage(ctx context.Context, payload map[string]any, taskID, sessionID string) string

Runs skill_manage over a payload in the flat or operations shape and returns the JSON result

func (*Scope) SkillView

func (s *Scope) SkillView(ctx context.Context, name, filePath, taskID string, preprocess bool) string

Skill markdown or one of its linked files as the skill_view JSON result

func (*Scope) SkillsDir

func (s *Scope) SkillsDir() string

Active skills directory of the scope

func (*Scope) SkillsList

func (s *Scope) SkillsList(ctx context.Context, category string) string

Tier one listing of loadable and plugin skills with categories

func (*Scope) SplitStackedSkillCommands

func (s *Scope) SplitStackedSkillCommands(ctx context.Context, rest string, interactive bool) ([]string, string, error)

Further leading skill tokens of rest up to the stack cap, and the instruction that follows them

func (*Scope) SyncSkills

func (s *Scope) SyncSkills(ctx context.Context, quiet bool) (map[string]any, error)

Syncs bundled skills into the scope skills tree through the manifest, essentials only when opted out

func (*Scope) TelemetryProvenance

func (s *Scope) TelemetryProvenance(ctx context.Context, name string, record map[string]any) (string, error)

Bounded provenance label for shared skill metrics

func (*Scope) Tier1AdvisoryEnabled

func (s *Scope) Tier1AdvisoryEnabled() (enabled bool)

skills.tier1_advisory with Python truthiness and false words, true when unset or unreadable

func (*Scope) UnmanagedReport

func (s *Scope) UnmanagedReport() ([]*jsonutil.Object, error)

Report rows for unmanaged skills with has_provenance_key and has_record

func (*Scope) UntrustedProjectSkillsRoot

func (s *Scope) UntrustedProjectSkillsRoot() (string, int)

Untrusted project root of the cwd and its skill count when it holds skills

func (*Scope) UsageReport

func (s *Scope) UsageReport() ([]*jsonutil.Object, error)

Usage rows for every skill on disk, built-ins and hub included

type SecretCaptureFunc

type SecretCaptureFunc func(name, prompt string, metadata map[string]any) (map[string]any, error)

Secret capture callback that prompts for one env var and reports success, skipped and stored_as

type SkillBundle

type SkillBundle struct {
	Name                           string
	Files                          []BundleFile
	Source, Identifier, TrustLevel string
	Metadata                       *jsonutil.Object
}

Downloaded skill awaiting quarantine, scan and install, files in registry order

func (*SkillBundle) File

func (b *SkillBundle) File(path string) ([]byte, bool)

Content of a bundle member by its exact path

type SkillCommands

type SkillCommands = map[string]map[string]any

Skill slash command table keyed by "/slug" with name, description, skill_md_path and skill_dir

type SkillConfigVar

type SkillConfigVar struct {
	Key         string `json:"key"`
	Description string `json:"description"`
	Default     any    `json:"default,omitempty"`
	Prompt      string `json:"prompt"`
	Skill       string `json:"skill,omitempty"`
}

One declared skill config variable

func DiscoverAllSkillConfigVars

func DiscoverAllSkillConfigVars() ([]SkillConfigVar, error)

Config variables declared by every enabled platform compatible skill of the process home

type SkillMeta

type SkillMeta struct {
	Name, Description, Source, Identifier, TrustLevel string
	Repo, Path                                        *string
	Tags                                              []string
	Extra                                             *jsonutil.Object
}

Search result metadata of one registry skill

type SkillSource

type SkillSource interface {
	Search(ctx context.Context, query string, limit int) ([]SkillMeta, error)
	Fetch(ctx context.Context, identifier string) (*SkillBundle, error)
	Inspect(ctx context.Context, identifier string) (*SkillMeta, error)
	SourceID() string
	TrustLevelFor(identifier string) string
	CurrentRevision(ctx context.Context, identifier string) (string, error)
}

Registry adapter contract every hub source implements

type SkillUpdateCheck

type SkillUpdateCheck struct {
	Name, Identifier, Source, Status string
	CurrentHash, LatestHash          string
	HasHashes                        bool
	Bundle                           *SkillBundle
}

Update check row of one installed hub skill, hashes and bundle set only for the statuses that carry them

type SkillsArgs

type SkillsArgs struct {
	Action                                                  string
	Page, Size, Limit                                       int
	Source, Query, Identifier, Category, Name               string
	Force, Yes, JSON, EnabledOnly, Deep, Restore, Remove    bool
	Sync                                                    bool
	SkillPath, To, Repo, SnapshotAction, Output, Input, Tap string
}

Parsed icebath skills command line, the argparse namespace skills_command reads

type SkillsIndexNotes

type SkillsIndexNotes struct {
	// contains filtered or unexported fields
}

Per agent record of the skills index difference already delivered and the note staged for the next turn

func (*SkillsIndexNotes) Consume

func (n *SkillsIndexNotes) Consume() string

Pops the staged skills index note, empty when none is pending

func (*SkillsIndexNotes) Stage

func (n *SkillsIndexNotes) Stage(provider, apiMode, sessionID string, current func() (string, error), prompt any, history []map[string]any) bool

Stages a one shot note when the loadable skills differ from the prompt index by something the model was not told

type SkillsPromptOptions

type SkillsPromptOptions struct {
	AvailableTools    map[string]bool
	AvailableToolsets map[string]bool
	CompactCategories map[string]bool
	SkillsDirOverride string
}

Options of one skills index build, nil tool sets meaning no filtering information

type SkillsShSource

type SkillsShSource struct {
	SourceBase

	Auth   *GitHubAuth
	GitHub *GitHubSource
	// contains filtered or unexported fields
}

Skills discovered through skills.sh and fetched from their GitHub repos

func NewSkillsShSource

func NewSkillsShSource(h *Hub, auth *GitHubAuth) *SkillsShSource

skills.sh source over its own GitHub source sharing the credentials

func (*SkillsShSource) Fetch

func (s *SkillsShSource) Fetch(ctx context.Context, identifier string) (b *SkillBundle, err error)

GitHub bundle of the first resolvable candidate relabelled as a skills.sh install

func (*SkillsShSource) Inspect

func (s *SkillsShSource) Inspect(ctx context.Context, identifier string) (m *SkillMeta, err error)

GitHub metadata of the resolved skill finalized with the skills.sh detail page

func (*SkillsShSource) Search

func (s *SkillsShSource) Search(ctx context.Context, query string, limit int) (out []SkillMeta, err error)

Search API matches, the full sitemap catalog for an empty query

func (*SkillsShSource) TrustLevelFor

func (s *SkillsShSource) TrustLevelFor(identifier string) string

Trust of the underlying GitHub identifier

type SourceBase

type SourceBase struct{ ID, Trust string }

Defaults of a source, community trust for every identifier and no cheap revision probe

func (SourceBase) CurrentRevision

func (b SourceBase) CurrentRevision(context.Context, string) (string, error)

Empty revision so update checks take the full fetch path

func (SourceBase) SourceID

func (b SourceBase) SourceID() string

Source id of the adapter

func (SourceBase) TrustLevelFor

func (b SourceBase) TrustLevelFor(string) string

Trust level given to every identifier, community when unset

type TapsManager

type TapsManager struct {
	// contains filtered or unexported fields
}

Tap list of custom GitHub repo sources

func (*TapsManager) Add

func (m *TapsManager) Add(ctx context.Context, repo, path string) (bool, error)

Appends a tap, false when the repo is already tapped

func (*TapsManager) ListTaps

func (m *TapsManager) ListTaps() ([]any, error)

Taps in file order

func (*TapsManager) Load

func (m *TapsManager) Load() ([]any, error)

Taps in file order

func (*TapsManager) Remove

func (m *TapsManager) Remove(ctx context.Context, repo string) (bool, error)

Removes a tap by repo, false when it was not tapped

func (*TapsManager) Save

func (m *TapsManager) Save(ctx context.Context, taps []any) error

Rewrites the tap list

type Tier1Finding

type Tier1Finding struct {
	Check, Validator, Severity, Message, File string
	Line                                      int64
	Suggestion                                string
}

Tier1Finding is one SkillEvaluator finding reduced to what install time shows

func (Tier1Finding) IsSecretsClass

func (f Tier1Finding) IsSecretsClass() bool

Reports whether the finding names a possibly real credential

func (Tier1Finding) Location

func (f Tier1Finding) Location() string

File and line of the finding, the file alone without a line, a question mark without either

type Tier1Report

type Tier1Report struct {
	Available        bool
	Passed           bool
	Findings         []Tier1Finding
	IncompleteChecks []string
	Error            string
}

Tier1Report is the install relevant reduction of one SkillEvaluator run

func RunTier1Scan

func RunTier1Scan(ctx context.Context, skillDir string, timeout int) (Tier1Report, error)

SkillEvaluator Tier 1 over one skill dir, unavailable on every scanner failure, errors only for undecodable reports

func (Tier1Report) AdvisoryFindings

func (r Tier1Report) AdvisoryFindings() []Tier1Finding

Findings that are hygiene advice rather than possible credentials

func (Tier1Report) SecretsFindings

func (r Tier1Report) SecretsFindings() []Tier1Finding

Findings that name a possibly real credential

type UrlSource

type UrlSource struct {
	SourceBase
	// contains filtered or unexported fields
}

Direct SKILL.md URL with its explicitly referenced allowlisted support files

func NewUrlSource

func NewUrlSource(h *Hub) *UrlSource

Direct URL adapter over the hub

func (*UrlSource) Fetch

func (u *UrlSource) Fetch(ctx context.Context, identifier string) (b *SkillBundle, err error)

SKILL.md plus same host referenced support files, a missing support file skipped with a warning

func (*UrlSource) Inspect

func (u *UrlSource) Inspect(ctx context.Context, identifier string) (m *SkillMeta, err error)

Metadata of a claimed URL, awaiting_name set when no usable name resolves

func (*UrlSource) Search

func (u *UrlSource) Search(context.Context, string, int) ([]SkillMeta, error)

Search is meaningless for a direct URL

type WellKnownSkillSource

type WellKnownSkillSource struct {
	SourceBase
	// contains filtered or unexported fields
}

Skills from a domain exposing /.well-known/skills/index.json

func NewWellKnownSkillSource

func NewWellKnownSkillSource(h *Hub) *WellKnownSkillSource

Well known endpoint adapter over the hub

func (*WellKnownSkillSource) Fetch

func (w *WellKnownSkillSource) Fetch(ctx context.Context, identifier string) (b *SkillBundle, err error)

Every advertised file of one skill, nil when any is unsafe or missing

func (*WellKnownSkillSource) Inspect

func (w *WellKnownSkillSource) Inspect(ctx context.Context, identifier string) (m *SkillMeta, err error)

Metadata of one advertised skill read from its SKILL.md frontmatter

func (*WellKnownSkillSource) Search

func (w *WellKnownSkillSource) Search(ctx context.Context, query string, limit int) (out []SkillMeta, err error)

Index entries named in an http index URL, at most limit

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL