Documentation
¶
Overview ¶
Package skills ports the skills system, bundled skills, slash commands, hub, guard, and skill tools
Index ¶
- Constants
- Variables
- func ActivityCount(rec *jsonutil.Object) (int64, error)
- func AmbiguousSkillLabel(identifier string, payload map[string]any) (string, bool)
- func AppendUserInstruction(parts *[]string, instruction string) string
- func ApplySkillPending(ctx context.Context, env *tools.Env, payload map[string]any) string
- func BlueprintToJobSpec(spec *BlueprintSpec, name string) *jsonutil.Object
- func BundledFS() fs.FS
- func CheckPackageForMalware(command string, args []string) (string, error)
- func ClearSkillsCache()
- func ClearSkillsSystemPromptCache(home string, disk bool)
- func ClipSkillDescription(desc string) string
- func CommandSnapshot(cmds SkillCommands) map[string]any
- func ContentHash(skillPath string) string
- func CurrentWriteOrigin(env *tools.Env) string
- func DescribeSkillInvocation(content, separator string) (string, bool)
- func DetermineVerdict(findings []Finding) string
- func DiffCommandSnapshots(before, after map[string]any) map[string]any
- func DirHash(directory string) string
- func EditSkill(ctx context.Context, env *tools.Env, name, content string) map[string]any
- func ExtractUserInstructionFromSkillMessage(content string) (string, bool)
- func FormatASTReport(findings []ASTFinding, skillName string) string
- func FormatMissingSkills(missing []string) string
- func FormatScanReport(result ScanResult) string
- func FormatTier1Report(report Tier1Report, limit int) string
- func GetDisabledSkills(cfg map[string]any, platform string) map[string]bool
- func IndexEntries(prompt any) map[string]string
- func InvalidatePluginSkillCommands()
- func IsBackgroundReview(env *tools.Env) bool
- func IsExcludedSkillPath(path, root string) bool
- func IsProtectedBuiltin(name string) bool
- func IsSuspiciousBinaryExtension(ext string) bool
- func IsValidNamespace(candidate string) bool
- func IterSkillIndexFiles(skillsDir, filename string) []string
- func LatestActivityAt(rec *jsonutil.Object) any
- func OptionalFS() fs.FS
- func ParseFrontmatter(content string) (map[string]any, string)
- func ReadSkillName(skillMD string, fallback string) string
- func RegisterBlueprintSuggestion(ctx context.Context, spec *BlueprintSpec) (map[string]any, error)
- func RegisterCoreCommandResolver(fn func(name string) bool)
- func RegisterCronBlueprintHooks(...)
- func RegisterLifecycleDispatch(d LifecycleDispatch)
- func RegisterPluginSkillHost(fn func(ctx context.Context, home string) PluginSkillHost)
- func RegisterSecretResolver(fn func(ctx context.Context, name string) (string, bool, error))
- func RegisterStablePrefixSink(fn func(prefix string))
- func ResetBackgroundReviewReadMarks(env *tools.Env)
- func ResetSkillViewDedup(taskID string)
- func ResolveSlashKey[V any](command string, table map[string]V) (string, bool)
- func SaveDisabledSkills(ctx context.Context, h string, cfg map[string]any, disabled map[string]bool, ...) error
- func SetContextSecretCaptureCallback(cb ContextSecretCaptureFunc)
- func SetCurrentWriteOrigin(env *tools.Env, origin string)
- func SetReviewAttended(env *tools.Env, attended bool)
- func ShouldAllowInstall(result ScanResult, force bool) (*bool, string)
- func SkillCommandCollisionNote(name string) (string, bool)
- func SkillFileLock(ctx context.Context, lockPath string) (context.Context, func(), error)
- func SkillManageSchema() *jsonutil.Object
- func SkillSettingsForShow() ([]config.SkillConfigVar, map[string]any, error)
- func SkillViewSchema() *jsonutil.Object
- func SkillsCommand(ctx context.Context, c *cliui.Console, h string) error
- func SkillsConfigPlatformLabel(key string) (string, bool)
- func SkillsListSchema() *jsonutil.Object
- func SkillsLoadedByScaffold(content string) []string
- func SkillsTrustCommand(ctx context.Context, h, action, rawPath string, out io.Writer) error
- func SlugifySkillName(name string) string
- func SortSkills(skills []map[string]any) []map[string]any
- func SubstituteTemplateVars(content, skillDir, sessionID string) string
- func SwapCoreCommandResolverForTests(fn func(name string) bool) (restore func())
- func SwapWalkReadDir(f func(dir string) ([]os.DirEntry, error)) (restore func())
- func SyncSkills(ctx context.Context, quiet bool) (map[string]any, error)
- func SyncSkillsMain(ctx context.Context) error
- func ThreatPatternByID(id string) *regexp2.Regexp
- func WithLedgerActor(ctx context.Context, actor string) context.Context
- func WithTurnSecretCapture(ctx context.Context, cb SecretCaptureFunc) context.Context
- type ASTFinding
- type BlueprintError
- type BlueprintSpec
- type BrowseItem
- type BrowsePage
- type BrowseShSource
- func (b *BrowseShSource) Fetch(ctx context.Context, identifier string) (bundle *SkillBundle, err error)
- func (b *BrowseShSource) Inspect(ctx context.Context, identifier string) (m *SkillMeta, err error)
- func (b *BrowseShSource) Search(ctx context.Context, query string, limit int) (out []SkillMeta, err error)
- type BundleError
- type BundleFile
- type BundlesArgs
- type BundlesCLI
- type ClawHubSource
- func (c *ClawHubSource) EnrichOwners(ctx context.Context, skills []SkillMeta, maxWorkers int, ...) int
- func (c *ClawHubSource) Fetch(ctx context.Context, identifier string) (b *SkillBundle, err error)
- func (c *ClawHubSource) Inspect(ctx context.Context, identifier string) (m *SkillMeta, err error)
- func (c *ClawHubSource) Search(ctx context.Context, query string, limit int) (out []SkillMeta, err error)
- type ContextSecretCaptureFunc
- type Finding
- type GitHubAuth
- type GitHubSource
- func (g *GitHubSource) CurrentRevision(ctx context.Context, identifier string) (rev string, err error)
- func (g *GitHubSource) Fetch(ctx context.Context, identifier string) (b *SkillBundle, err error)
- func (g *GitHubSource) Inspect(ctx context.Context, identifier string) (m *SkillMeta, err error)
- func (g *GitHubSource) IsRateLimited() bool
- func (g *GitHubSource) Search(ctx context.Context, query string, limit int) ([]SkillMeta, error)
- func (g *GitHubSource) SearchProvider(ctx context.Context, query string, limit int, providerFilter string) ([]SkillMeta, error)
- func (g *GitHubSource) TrustLevelFor(identifier string) string
- type GitHubTap
- type Hub
- func (h *Hub) AppendAuditLog(action, skillName, source, trustLevel, verdict, extra string) error
- func (h *Hub) AuditLogPath() string
- func (h *Hub) CheckForSkillUpdates(ctx context.Context, name string, lock *HubLockFile, sources []SkillSource, ...) ([]SkillUpdateCheck, error)
- func (h *Hub) EnsureHubDirs() error
- func (h *Hub) HTTPSession(ctx context.Context) (context.Context, func())
- func (h *Hub) HubDir() string
- func (h *Hub) IndexCacheDir() string
- func (h *Hub) InstallFromQuarantine(ctx context.Context, quarantinePath, skillName, category string, ...) (string, error)
- func (h *Hub) LockFile(path string) *HubLockFile
- func (h *Hub) LockFilePath() string
- func (h *Hub) ParallelSearchSources(ctx context.Context, sources []SkillSource, query string, ...) ([]SkillMeta, *jsonutil.Object, []string)
- func (h *Hub) QuarantineBundle(b *SkillBundle) (string, error)
- func (h *Hub) QuarantineDir() string
- func (h *Hub) Taps(path string) *TapsManager
- func (h *Hub) TapsFilePath() string
- func (h *Hub) UnifiedSearch(ctx context.Context, query string, sources []SkillSource, sourceFilter string, ...) []SkillMeta
- func (h *Hub) UninstallSkill(ctx context.Context, skillName string) (bool, string, error)
- type HubCLI
- func (x *HubCLI) BrowseSkills(ctx context.Context, page, pageSize int, source string) BrowsePage
- func (x *HubCLI) DoAudit(ctx context.Context, name string, c *consoleutil.Console, deep bool) error
- func (x *HubCLI) DoBrowse(ctx context.Context, page, pageSize int, source string, c *consoleutil.Console)
- func (x *HubCLI) DoCheck(ctx context.Context, name string, c *consoleutil.Console) error
- func (x *HubCLI) DoDiff(ctx context.Context, name string, c *consoleutil.Console) error
- func (x *HubCLI) DoInspect(ctx context.Context, identifier string, c *consoleutil.Console)
- func (x *HubCLI) DoInstall(ctx context.Context, identifier string, o HubInstallOptions) (HubOutcome, error)
- func (x *HubCLI) DoList(ctx context.Context, sourceFilter string, enabledOnly bool, ...) error
- func (x *HubCLI) DoListModified(ctx context.Context, c *consoleutil.Console, asJSON bool) error
- func (x *HubCLI) DoOptIn(ctx context.Context, sync bool, c *consoleutil.Console, deferCache bool) error
- func (x *HubCLI) DoOptOut(ctx context.Context, remove bool, c *consoleutil.Console, ...) error
- func (x *HubCLI) DoPublish(ctx context.Context, skillPath, target, repo string, c *consoleutil.Console) error
- func (x *HubCLI) DoRepairOfficial(ctx context.Context, name string, restore bool, c *consoleutil.Console, ...) error
- func (x *HubCLI) DoReset(ctx context.Context, name string, restore bool, c *consoleutil.Console, ...) error
- func (x *HubCLI) DoSearch(ctx context.Context, query, source string, limit int, c *consoleutil.Console, ...) error
- func (x *HubCLI) DoSnapshotExport(ctx context.Context, outputPath string, c *consoleutil.Console) error
- func (x *HubCLI) DoSnapshotImport(ctx context.Context, inputPath string, force bool, c *consoleutil.Console) (HubOutcome, error)
- func (x *HubCLI) DoTap(ctx context.Context, action, repo string, c *consoleutil.Console) error
- func (x *HubCLI) DoUninstall(ctx context.Context, name string, c *consoleutil.Console, ...) (HubOutcome, error)
- func (x *HubCLI) DoUpdate(ctx context.Context, name string, c *consoleutil.Console, force bool) (HubOutcome, error)
- func (x *HubCLI) InspectSkill(ctx context.Context, identifier string) *InspectResult
- func (x *HubCLI) ResolvedSources() []SkillSource
- func (x *HubCLI) SkillsCommand(ctx context.Context, a SkillsArgs) (int, error)
- type HubInstallOptions
- type HubLockFile
- func (l *HubLockFile) ByIdentifier() (map[string]*jsonutil.Object, error)
- func (l *HubLockFile) ByIdentifierObject() (*jsonutil.Object, error)
- func (l *HubLockFile) GetInstalled(name string) (any, error)
- func (l *HubLockFile) ListInstalled() ([]*jsonutil.Object, error)
- func (l *HubLockFile) Load() (*jsonutil.Object, error)
- func (l *HubLockFile) RecordInstall(ctx context.Context, ...) error
- func (l *HubLockFile) RecordUninstall(ctx context.Context, name string) error
- func (l *HubLockFile) Save(ctx context.Context, data *jsonutil.Object) error
- type HubOutcome
- type IndexSource
- func (x *IndexSource) Fetch(ctx context.Context, identifier string) (b *SkillBundle, err error)
- func (x *IndexSource) Inspect(ctx context.Context, identifier string) (m *SkillMeta, err error)
- func (x *IndexSource) IsAvailable() bool
- func (x *IndexSource) Search(ctx context.Context, query string, limit int) ([]SkillMeta, error)
- func (x *IndexSource) SearchProvider(ctx context.Context, query string, limit int, providerFilter string) (out []SkillMeta, err error)
- func (x *IndexSource) TrustLevelFor(identifier string) string
- type InspectResult
- type LedgerMutation
- type LifecycleDispatch
- type LintFinding
- type LobeHubSource
- func (l *LobeHubSource) Fetch(ctx context.Context, identifier string) (b *SkillBundle, err error)
- func (l *LobeHubSource) Inspect(ctx context.Context, identifier string) (m *SkillMeta, err error)
- func (l *LobeHubSource) Search(ctx context.Context, query string, limit int) (out []SkillMeta, err error)
- type OptionalSkillSource
- func (o *OptionalSkillSource) Fetch(ctx context.Context, identifier string) (b *SkillBundle, err error)
- func (o *OptionalSkillSource) Inspect(ctx context.Context, identifier string) (m *SkillMeta, err error)
- func (o *OptionalSkillSource) ListLocal() (out []SkillMeta, err error)
- func (o *OptionalSkillSource) Search(ctx context.Context, query string, limit int) (out []SkillMeta, err error)
- type PluginSkillHost
- type PublishedScopeRow
- type ScanResult
- type Scope
- func (s *Scope) AdoptSkill(ctx context.Context, name string) (bool, string, error)
- func (s *Scope) AllSkillsDirs() []string
- func (s *Scope) ArchiveSkill(ctx context.Context, name string) (bool, string, error)
- func (s *Scope) BlueprintSpecForInstalled(skillName string) (*BlueprintSpec, error)
- func (s *Scope) BuildAutoLoadPrompt(ctx context.Context, taskID string, userConfig map[string]any) (string, []string, []string)
- func (s *Scope) BuildBundleInvocationMessage(ctx context.Context, cmdKey, userInstruction, taskID, platform string) (string, []string, []string, bool, error)
- func (s *Scope) BuildPreloadedSkillsPrompt(ctx context.Context, identifiers []string, taskID string, ...) (string, []string, []string)
- func (s *Scope) BuildSkillInvocationMessage(ctx context.Context, cmdKey, userInstruction, taskID, runtimeNote string) (string, bool, error)
- func (s *Scope) BuildSkillMessage(ctx context.Context, loaded map[string]any, ...) string
- func (s *Scope) BuildSkillsSystemPrompt(ctx context.Context, opts SkillsPromptOptions) (string, error)
- func (s *Scope) BuildStackedSkillInvocationMessage(ctx context.Context, cmdKeys []string, userInstruction, taskID string) (string, []string, []string, bool, error)
- func (s *Scope) BumpPatch(ctx context.Context, name, action, taskID, sessionID string)
- func (s *Scope) BumpUse(ctx context.Context, name, taskID, sessionID string)
- func (s *Scope) BumpView(ctx context.Context, name string)
- func (s *Scope) BundlePathFor(name string) (string, error)
- func (s *Scope) BundledSkillForInstall(identifier string) (string, error)
- func (s *Scope) BundlesDir() string
- func (s *Scope) Command(ctx context.Context, line, taskID string) (string, bool, error)
- func (s *Scope) CuratedReport() ([]*jsonutil.Object, error)
- func (s *Scope) DeleteBundle(name string) (string, error)
- func (s *Scope) DetectKanban() bool
- func (s *Scope) DiffBundledSkill(name string) (map[string]any, error)
- func (s *Scope) DisabledSkillNames(platform string) map[string]bool
- func (s *Scope) DiscoverAllSkillConfigVars() []SkillConfigVar
- func (s *Scope) DisplaySkillCreateDir() string
- func (s *Scope) EnsureBundledSkill(ctx context.Context, name string) (map[string]any, error)
- func (s *Scope) ExpandInlineShell(ctx context.Context, content, skillDir string, timeout int) string
- func (s *Scope) ExternalSkillNames() map[string]bool
- func (s *Scope) ExternalSkillsDirs() []string
- func (s *Scope) FindAllSkills(skipDisabled bool) []map[string]any
- func (s *Scope) FindAllSkillsKanbanScoped() []map[string]any
- func (s *Scope) FindProjectRoot() string
- func (s *Scope) FindSkill(name string) (string, bool)
- func (s *Scope) Forget(ctx context.Context, name string)
- func (s *Scope) GetBundle(name string) (map[string]any, bool, error)
- func (s *Scope) GetInteractiveSkillCommands(ctx context.Context) (SkillCommands, error)
- func (s *Scope) GetPluginSkillCommands(ctx context.Context) (SkillCommands, error)
- func (s *Scope) GetRecord(name string) (*jsonutil.Object, error)
- func (s *Scope) GetSkillBundles() (SkillCommands, error)
- func (s *Scope) GetSkillCommands() SkillCommands
- func (s *Scope) InjectSkillConfig(loaded map[string]any, parts *[]string)
- func (s *Scope) IsAgentCreated(name string) (bool, error)
- func (s *Scope) IsBundled(name string) (bool, error)
- func (s *Scope) IsCurationEligible(name, skillPath string) (bool, error)
- func (s *Scope) IsCuratorManaged(name string) (bool, error)
- func (s *Scope) IsExternalOnly(name string) bool
- func (s *Scope) IsExternalSkillPath(path string) bool
- func (s *Scope) IsHubInstalled(name string) bool
- func (s *Scope) IsLocked(name string) (bool, error)
- func (s *Scope) IsProjectRootTrusted(root string) bool
- func (s *Scope) LedgerAppendEntry(ctx context.Context, action, skill string, before, after []*jsonutil.Object, ...) (string, bool)
- func (s *Scope) LedgerBlobsDir() string
- func (s *Scope) LedgerCaptureBefore(ctx context.Context, root string, completePackage bool, skill string) []map[string]string
- func (s *Scope) LedgerCompact(ctx context.Context) (int, int, int, error)
- func (s *Scope) LedgerDeriveActor(ctx context.Context) string
- func (s *Scope) LedgerEnabled() bool
- func (s *Scope) LedgerFillSnapshotFromCuratorBackup(root string, existing []*jsonutil.Object, skill string) ([]*jsonutil.Object, error)
- func (s *Scope) LedgerGCBlobs(ctx context.Context) (int, int64, error)
- func (s *Scope) LedgerGetEntry(entryID string) (*jsonutil.Object, error)
- func (s *Scope) LedgerListEntries(skill string, limit int) ([]*jsonutil.Object, error)
- func (s *Scope) LedgerPackagePrefixes(root, skill string, before []*jsonutil.Object) ([]string, error)
- func (s *Scope) LedgerPath() string
- func (s *Scope) LedgerReadBlob(sha string) ([]byte, bool)
- func (s *Scope) LedgerRecordMutation(ctx context.Context, action, skill string, m LedgerMutation) (string, bool)
- func (s *Scope) LedgerRollbackEntry(ctx context.Context, entryID string) (bool, string, error)
- func (s *Scope) LedgerSnapshotPaths(root string, completePackage bool) ([]*jsonutil.Object, error)
- func (s *Scope) ListAgentCreatedSkillNames() ([]string, error)
- func (s *Scope) ListArchivedSkillNames() ([]string, error)
- func (s *Scope) ListBundles() ([]map[string]any, error)
- func (s *Scope) ListUnmanagedSkillNames() ([]string, error)
- func (s *Scope) ListUserModifiedBundledSkills() ([]map[string]any, error)
- func (s *Scope) LoadSkillPayload(ctx context.Context, identifier, taskID string) (map[string]any, string, string, bool)
- func (s *Scope) LoadUsage() (*jsonutil.Object, error)
- func (s *Scope) LockedSkillNames() ([]string, error)
- func (s *Scope) MarkAgentCreated(ctx context.Context, name string)
- func (s *Scope) NormalizeSkillLookupName(identifier string) string
- func (s *Scope) PreprocessSkillContent(ctx context.Context, content, skillDir, sessionID string, ...) string
- func (s *Scope) ProjectSkillsDirs() []string
- func (s *Scope) Provenance(name string) (string, error)
- func (s *Scope) PublishedScopesSignature(ctx context.Context) []PublishedScopeRow
- func (s *Scope) ReadBundledNames() (map[string]bool, error)
- func (s *Scope) ReadHubInstalledNames() map[string]bool
- func (s *Scope) ReadSuppressedNames() (map[string]bool, error)
- func (s *Scope) ReanchorClock(ctx context.Context, name string)
- func (s *Scope) RecordCreated(ctx context.Context, name string, agentCreated bool, taskID, sessionID string)
- func (s *Scope) RecordInstalled(ctx context.Context, name string)
- func (s *Scope) ReloadBundles() (map[string]any, error)
- func (s *Scope) ReloadSkills(ctx context.Context) (map[string]any, error)
- func (s *Scope) RemovePristineBundledSkills(ctx context.Context, dryRun bool) (map[string]any, error)
- func (s *Scope) ResetBundledSkill(ctx context.Context, name string, restore bool) (map[string]any, error)
- func (s *Scope) ResolveAutoLoadSkills(userConfig map[string]any) []string
- func (s *Scope) ResolveBundleCommandKey(command string) (string, bool, error)
- func (s *Scope) ResolveSkillCommandKey(ctx context.Context, command string, interactive bool) (string, bool, error)
- func (s *Scope) ResolveSkillConfigValues(vars []SkillConfigVar) map[string]any
- func (s *Scope) ResolveSkillDir(name, category string) string
- func (s *Scope) RestoreOfficialOptionalSkill(ctx context.Context, name string, restore bool) (map[string]any, error)
- func (s *Scope) RestoreSkill(ctx context.Context, name string) (bool, string, error)
- func (s *Scope) RunInlineShell(ctx context.Context, command, cwd string, timeout int) string
- func (s *Scope) SaveBundle(ctx context.Context, name string, skills []string, ...) (string, error)
- func (s *Scope) SaveUsage(ctx context.Context, data *jsonutil.Object) bool
- func (s *Scope) ScanBundles() (SkillCommands, error)
- func (s *Scope) ScanSkillCommands() SkillCommands
- func (s *Scope) SeedRecordIfMissing(ctx context.Context, name string) error
- func (s *Scope) SetBundledSkillsOptOut(enabled bool) map[string]any
- func (s *Scope) SetLocked(ctx context.Context, name string, locked bool) bool
- func (s *Scope) SetPinned(ctx context.Context, name string, pinned bool) bool
- func (s *Scope) SetState(ctx context.Context, name, state string)
- func (s *Scope) SkillCreateDir() string
- func (s *Scope) SkillManage(ctx context.Context, payload map[string]any, taskID, sessionID string) string
- func (s *Scope) SkillView(ctx context.Context, name, filePath, taskID string, preprocess bool) string
- func (s *Scope) SkillsDir() string
- func (s *Scope) SkillsList(ctx context.Context, category string) string
- func (s *Scope) SplitStackedSkillCommands(ctx context.Context, rest string, interactive bool) ([]string, string, error)
- func (s *Scope) SyncSkills(ctx context.Context, quiet bool) (map[string]any, error)
- func (s *Scope) TelemetryProvenance(ctx context.Context, name string, record map[string]any) (string, error)
- func (s *Scope) Tier1AdvisoryEnabled() (enabled bool)
- func (s *Scope) UnmanagedReport() ([]*jsonutil.Object, error)
- func (s *Scope) UntrustedProjectSkillsRoot() (string, int)
- func (s *Scope) UsageReport() ([]*jsonutil.Object, error)
- type SecretCaptureFunc
- type SkillBundle
- type SkillCommands
- type SkillConfigVar
- type SkillMeta
- type SkillSource
- type SkillUpdateCheck
- type SkillsArgs
- type SkillsIndexNotes
- type SkillsPromptOptions
- type SkillsShSource
- func (s *SkillsShSource) Fetch(ctx context.Context, identifier string) (b *SkillBundle, err error)
- func (s *SkillsShSource) Inspect(ctx context.Context, identifier string) (m *SkillMeta, err error)
- func (s *SkillsShSource) Search(ctx context.Context, query string, limit int) (out []SkillMeta, err error)
- func (s *SkillsShSource) TrustLevelFor(identifier string) string
- type SourceBase
- type TapsManager
- func (m *TapsManager) Add(ctx context.Context, repo, path string) (bool, error)
- func (m *TapsManager) ListTaps() ([]any, error)
- func (m *TapsManager) Load() ([]any, error)
- func (m *TapsManager) Remove(ctx context.Context, repo string) (bool, error)
- func (m *TapsManager) Save(ctx context.Context, taps []any) error
- type Tier1Finding
- type Tier1Report
- type UrlSource
- type WellKnownSkillSource
- func (w *WellKnownSkillSource) Fetch(ctx context.Context, identifier string) (b *SkillBundle, err error)
- func (w *WellKnownSkillSource) Inspect(ctx context.Context, identifier string) (m *SkillMeta, err error)
- func (w *WellKnownSkillSource) Search(ctx context.Context, query string, limit int) (out []SkillMeta, err error)
Constants ¶
const ( MaxNameLength = 64 MaxDescriptionLength = 1024 )
Progressive disclosure limits on a listed skill name and description
const ( IndexURL = "https://icebath.app/api/skills-index.json" IndexTTL = 6 * 3600.0 )
const ( LintError = "error" LintWarning = "warning" )
Lint severities attached to findings
const ( MaxSkillContentChars = 100_000 MaxSkillFileBytes = 1_048_576 )
Content and file budgets of skill_manage writes
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 )
const ( TierProject = iota TierLocal TierCreateDir TierExternal )
Precedence tiers, lowest wins
const ( StateActive = "active" StateStale = "stale" StateArchived = "archived" )
const ( ReadinessAvailable = "available" ReadinessSetupNeeded = "setup_needed" ReadinessUnsupported = "unsupported" )
Readiness states a skill_view result reports
const AmbiguousSkillPrefix = "Ambiguous skill name "
Leading words of every same tier ambiguity refusal
const BackgroundReview = "background_review"
Write origin the self improvement review fork binds before its tool loop
const CatalogPageRetries = 5
Consecutive failed catalog page fetches before a walk gives up as partial
const DistSwapDir = ".icebath-dist"
Directory profile distribution installs stage into before an atomic swap
const IndexCacheTTL = 3600.0
Seconds a shared index cache entry stays fresh
const NoBundledSkillsMarker = ".no-bundled-skills"
Marker file that limits sync to the essential skills on an opted out profile
const ScannerVersion = "skills-guard-v10"
Version stamped into scan provenance so cached verdicts expire with the rules
const SkillConfigPrefix = "skills.config"
Config prefix under which skill config values live
const SkillPromptDescLimit = 60
Description width the system prompt index shows per row
Variables ¶
var AppAvailability func(name string) (declared bool, offerable bool)
AppAvailability answers whether a declared app has a registered declaration this host can offer
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
var EssentialSkills = map[string]bool{"icebath-agent": true}
Skills that can never be disabled because the system prompt points at them
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
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
var MetadataKeys = []string{"icebath", "hermes"}
Frontmatter metadata keys read in order, icebath first then the spelling skills written before the rename carry
var ProtectedBuiltinSkills = map[string]bool{}
Load bearing built-in names the curator never archives or consolidates
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
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
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
var TrustRank = map[string]int{"builtin": 2, "trusted": 1, "community": 0}
Ordering of trust levels, unknown levels rank as community
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 ¶
Total use, view and patch events of a record
func AmbiguousSkillLabel ¶
Ambiguity label naming the exact load names of a same tier collision, false otherwise
func AppendUserInstruction ¶
Appends the volatile user instruction and returns the stable scaffold prefix ending at its marker
func ApplySkillPending ¶
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 CheckPackageForMalware ¶
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 ¶
Drops the in process skills prompt cache and with disk also the home snapshot file
func ClipSkillDescription ¶
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 ¶
Short integrity hash of a skill directory symmetric with the bundle hash
func CurrentWriteOrigin ¶
Write origin bound on the env, foreground for every regular agent
func DescribeSkillInvocation ¶
Short description of a skill invocation or auto load turn, false for any other text
func DetermineVerdict ¶
DetermineVerdict maps findings to safe, caution, or dangerous by their worst severity
func DiffCommandSnapshots ¶
Added, removed, unchanged and total between two name to description snapshots
func ExtractUserInstructionFromSkillMessage ¶
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 ¶
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 ¶
Disabled skill names, the global list unioned with the platform list when a platform is given
func IndexEntries ¶
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 ¶
Reports whether the env runs inside the background review fork
func IsExcludedSkillPath ¶
Reports whether a path has an excluded directory component or sits in a skill support package
func IsProtectedBuiltin ¶
Reports whether a skill name is a protected built-in
func IsSuspiciousBinaryExtension ¶
IsSuspiciousBinaryExtension reports whether a bundled file extension cannot be scanned
func IsValidNamespace ¶
Reports whether a plugin namespace is well formed, the check a plugin data namespace has to pass
func IterSkillIndexFiles ¶
Sorted SKILL.md style index paths under a skills dir, skipping excluded trees and skill support dirs
func LatestActivityAt ¶
Newest use, view or patch timestamp text of a record, nil when none parses
func ParseFrontmatter ¶
Splits YAML frontmatter from a markdown body, falling back to key value line splitting on bad YAML
func ReadSkillName ¶
Exported form for pkg/memory, same answer as the package reader
func RegisterBlueprintSuggestion ¶
Registers an installed blueprint as a suggested cron job, nil when skipped
func RegisterCoreCommandResolver ¶
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 ¶
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 ¶
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 ¶
"/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 ¶
Binds the skill write origin on a session env, foreground when origin is empty
func SetReviewAttended ¶
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 ¶
Note shown when the slug of a skill name is a core command or alias, false otherwise
func SkillFileLock ¶
Exclusive cross process lock on a path, reentrant for callers holding the returned context
func SkillManageSchema ¶
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 SkillsCommand ¶
Interactive enable and disable of installed skills globally or per platform
func SkillsConfigPlatformLabel ¶
SkillsConfigPlatformLabel is the label of a platform the skills configurator offers, false when it offers none
func SkillsLoadedByScaffold ¶
Skill names a complete invocation, bundle or auto load scaffold activated, empty for other text
func SkillsTrustCommand ¶
Adds or removes a project root in skills.trusted_project_dirs, the cwd checkout when no path is given
func SlugifySkillName ¶
Slash command form of a skill name with spaces and underscores hyphenated and invalid characters stripped
func SortSkills ¶
Orders listings by category then name
func SubstituteTemplateVars ¶
Replaces skill dir and session id template tokens, tokens without a value stay in place
func SwapCoreCommandResolverForTests ¶
Installs fn as the core command lookup and returns the restore of the lookup installed before it
func SwapWalkReadDir ¶
Replaces the directory listing of the skill tree walk until the returned restore runs
func SyncSkills ¶
Syncs bundled skills into the home of ctx and returns the per category result
func SyncSkillsMain ¶
Script entry that syncs the home of ctx loudly and prints the new, updated and unchanged summary line
func ThreatPatternByID ¶
ThreatPatternByID returns the compiled regex behind one finding id so install scanners can locate its token
func WithLedgerActor ¶
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 ¶
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
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 ¶
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 ¶
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
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
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) IsRateLimited ¶
func (g *GitHubSource) IsRateLimited() bool
Whether a terminal rate limit exhaustion happened during this flow
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 (*Hub) AppendAuditLog ¶
Appends one space separated line to the audit log, a failed write only logged
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 ¶
Creates the hub dir, quarantine, index cache and empty state files when missing
func (*Hub) HTTPSession ¶
Context reusing one SSRF safe client for a single hub resolution, release closes it
func (*Hub) IndexCacheDir ¶
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 ¶
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 ¶
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) 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
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 (*HubCLI) BrowseSkills ¶
Paginated hub browse for programmatic callers such as the TUI gateway
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) 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 ¶
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) 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 ¶
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
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) IsAvailable ¶
func (x *IndexSource) IsAvailable() bool
Whether the index loaded with at least one skill
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 ¶
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 (*LobeHubSource) Fetch ¶
func (l *LobeHubSource) Fetch(ctx context.Context, identifier string) (b *SkillBundle, err error)
One agent converted to a SKILL.md bundle
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
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 ¶
Scope over a home and its config with the process environment supplying platform and cwd
func (*Scope) AdoptSkill ¶
Hands a local skill to curator management, refusing hub, external, bundled and protected skills
func (*Scope) AllSkillsDirs ¶
Skill dirs in precedence order without trusted project dirs
func (*Scope) ArchiveSkill ¶
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) BundlePathFor ¶
Canonical file path of a bundle name, a ValueError when the name slugs to nothing
func (*Scope) BundledSkillForInstall ¶
Bundled skill name an install identifier means, empty when it names none
func (*Scope) BundlesDir ¶
Bundles dir, the ICEBATH_BUNDLES_DIR override or the profile skill-bundles dir
func (*Scope) Command ¶
Message for a typed skill slash line, stacked skills included, false when the line names no skill
func (*Scope) CuratedReport ¶
Rows for every curator managed skill plus pinned eligible local skills, with provenance and _persisted
func (*Scope) DeleteBundle ¶
Deletes a bundle by name and refreshes the cache, a FileNotFoundError when absent
func (*Scope) DetectKanban ¶
Whether the kanban playbook is relevant for this scope, for callers outside the package
func (*Scope) DiffBundledSkill ¶
Diffs the user copy of a bundled skill against stock per file
func (*Scope) DisabledSkillNames ¶
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 ¶
User facing path where new skills are created
func (*Scope) EnsureBundledSkill ¶
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 ¶
Frontmatter names of every skill under the configured external dirs
func (*Scope) ExternalSkillsDirs ¶
Validated deduplicated external skill dirs from config, existing dirs only and never the local dir
func (*Scope) FindAllSkills ¶
Loadable skills as name, description and category, the name being what skill_view accepts
func (*Scope) FindAllSkillsKanbanScoped ¶
Loadable skills with kanban skills relevant, the shared filtered catalog entry restored afterwards
func (*Scope) FindProjectRoot ¶
Project root of the effective working directory, empty when none
func (*Scope) FindSkill ¶
Skill directory by directory name, category path or unique frontmatter name
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) 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 ¶
Appends the skill's resolved config values block the way the cron prompt builder reads it
func (*Scope) IsAgentCreated ¶
Neither bundled nor hub installed and not only present in an external dir
func (*Scope) IsCurationEligible ¶
Agent created yes, bundled only with prune_builtins, hub external and protected never
func (*Scope) IsExternalOnly ¶
Reports whether a skill lives only under the external dirs
func (*Scope) IsExternalSkillPath ¶
Reports whether lifecycle maintenance must treat the path as an externally owned read only skill
func (*Scope) IsHubInstalled ¶
func (*Scope) IsLocked ¶
Locked flag of a skill, an error on a corrupt sidecar so the write guard fails closed
func (*Scope) IsProjectRootTrusted ¶
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 ¶
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 ¶
Rewrites the ledger with unchanged paths dropped from every entry, returning entries and sizes before and after
func (*Scope) LedgerDeriveActor ¶
Explicit actor override, else curator for background review provenance, else agent
func (*Scope) LedgerEnabled ¶
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 ¶
Deletes blobs no entry references and older than the grace window, returning count and bytes freed
func (*Scope) LedgerGetEntry ¶
Ledger row with the given id, nil when absent or the id is empty
func (*Scope) LedgerListEntries ¶
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 ¶
Path of the JSONL skill mutation ledger
func (*Scope) LedgerReadBlob ¶
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 ¶
Restores the before state of an entry after appending an undoable pre-rollback safety entry
func (*Scope) LedgerSnapshotPaths ¶
Snapshot of root, unioned with the newest curator tarball's package files when completePackage is set
func (*Scope) ListAgentCreatedSkillNames ¶
Curator manageable skills, agent records plus bundled built-ins when pruning is enabled, never hub
func (*Scope) ListArchivedSkillNames ¶
Directory names under the archive
func (*Scope) ListBundles ¶
Bundle infos sorted by slug
func (*Scope) ListUnmanagedSkillNames ¶
Curation eligible skills without the curator management marker
func (*Scope) ListUserModifiedBundledSkills ¶
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 ¶
Whole usage map with non object values dropped, empty on a missing or corrupt file
func (*Scope) LockedSkillNames ¶
Names carrying a truthy locked flag, empty on a corrupt sidecar
func (*Scope) MarkAgentCreated ¶
Opts a skill into curator management
func (*Scope) NormalizeSkillLookupName ¶
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 ¶
Trusted project local skill dirs for the current cwd
func (*Scope) Provenance ¶
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 ¶
Bundled manifest names plus the curator suppression list, for callers ranking the skill catalog
func (*Scope) ReadHubInstalledNames ¶
Hub lock names plus the frontmatter name of each in tree install path, for callers ranking the skill catalog
func (*Scope) ReadSuppressedNames ¶
Built-ins the curator pruned, which the re-seeder leaves archived
func (*Scope) ReanchorClock ¶
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 ¶
Records a successful hub install as an active installed skill
func (*Scope) ReloadBundles ¶
Rescans bundles and returns the added, removed, unchanged and total diff
func (*Scope) ReloadSkills ¶
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 ¶
Deduplicated skills.auto_load names of userConfig, the scope config when nil
func (*Scope) ResolveBundleCommandKey ¶
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 ¶
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 ¶
Moves an archived skill back to the flat layout, refusing hub and bundled collisions
func (*Scope) RunInlineShell ¶
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) 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 ¶
Seeds a baseline record for a curation eligible skill so its inactivity clock starts at first sight
func (*Scope) SetBundledSkillsOptOut ¶
Writes or removes the bundled skills opt out marker of the scope home
func (*Scope) SetState ¶
Sets a lifecycle state on a manageable skill and emits archived, stale or restored on a real change
func (*Scope) SkillCreateDir ¶
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) SkillsList ¶
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 ¶
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 ¶
skills.tier1_advisory with Python truthiness and false words, true when unset or unreadable
func (*Scope) UnmanagedReport ¶
Report rows for unmanaged skills with has_provenance_key and has_record
func (*Scope) UntrustedProjectSkillsRoot ¶
Untrusted project root of the cwd and its skill count when it holds skills
type SecretCaptureFunc ¶
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
type SkillCommands ¶
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
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 ¶
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 ¶
Empty revision so update checks take the full fetch path
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
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 ¶
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 (*UrlSource) Fetch ¶
SKILL.md plus same host referenced support files, a missing support file skipped with a warning
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
Source Files
¶
- blueprints.go
- bundles.go
- bundles_cli.go
- catalog.go
- catalog_kanban_scoped.go
- commands.go
- commands_message.go
- commands_message_export.go
- commands_payload_export.go
- commands_scan.go
- core_command_resolver_export.go
- detect_kanban_export.go
- embed.go
- embed_modes.go
- excluded_path.go
- filelock_unix.go
- guard.go
- guard_export.go
- hub.go
- hub_clawhub.go
- hub_cli.go
- hub_cli_install.go
- hub_cli_manage.go
- hub_github.go
- hub_install.go
- hub_lock_export.go
- hub_models.go
- hub_official.go
- hub_search.go
- hub_skillssh.go
- hub_sources.go
- index.go
- index_delta.go
- index_files.go
- inject_skill_config_export.go
- ledger.go
- linter.go
- log.go
- manage.go
- manage_batch.go
- manage_guards.go
- osv.go
- preprocess.go
- preprocess_unix.go
- provenance.go
- rawconfig.go
- scope.go
- secret_capture_context.go
- skillevaluator_scan.go
- skills_ast_audit.go
- skills_trust_cli.go
- skillsconfig.go
- skillutil.go
- sync.go
- tools.go
- usage.go
- usage_names_export.go
- view.go
- yamlfm.go