Help us shape the future of Go! Take the 2026 Go Developer Survey

skilldiscovery

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package skilldiscovery holds the per-agent registries (curated built-ins, install hints) and the keyword match helper that the `trace review` picker uses to discover review-adjacent skills.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsEligible

func IsEligible(agentName string) bool

IsEligible reports whether the given agent has any registry entry — either a curated built-in or an install hint. The picker uses this (intersected with "hooks installed") to decide whether to show a section for the agent.

func Matches

func Matches(name, description string) bool

Matches reports whether the given skill invocation contains any review-adjacent keyword (case-insensitive) in its name.

We deliberately match on name only. Descriptions often contain words like "review" or "inspect" in non-review contexts — "review the plan", "inspect recent sessions", "review checkpoints" — which would pull in unrelated skills. Legitimate review skills either have the keyword in their name directly (e.g. /test-auditor, /superpowers:receiving-code-review) or live under a plugin whose prefix contains it (e.g. /pr-review-toolkit:silent-failure-hunter matches via "review" in "pr-review-toolkit").

The description parameter is retained for signature stability — callers still supply it so the picker can show descriptions — but it does not affect match decisions.

Types

type CuratedSkill

type CuratedSkill struct {
	Name string
	Desc string
}

CuratedSkill is an entry in the curated per-agent built-in list. Name is the skill's invocation form (slash-prefixed); Desc is the picker-visible description.

func CuratedBuiltinsFor

func CuratedBuiltinsFor(agentName string) []CuratedSkill

CuratedBuiltinsFor returns the curated built-in list for agentName, or an empty slice if the agent is unknown. Callers must treat the return value as read-only.

type InstallHint

type InstallHint struct {
	Message     string
	ProvidesAny []string
}

InstallHint is a per-agent message shown in the "Install more" section of the picker. ProvidesAny lists the discovered skill names whose presence means "this plugin is already installed" — if any of those appear in the discovered set, the hint is suppressed.

When ProvidesAny is nil, the hint is always shown — use this for ecosystems where we can't predict plugin skill names (e.g. Gemini).

func ActiveInstallHintsFor

func ActiveInstallHintsFor(agentName string, discovered map[string]struct{}) []InstallHint

ActiveInstallHintsFor returns the subset of installHints[agentName] whose ProvidesAny does NOT intersect the discovered set. When ProvidesAny is nil, the hint is always active.

discovered is a set of skill names (map for O(1) membership); pass nil or an empty map when no skills have been discovered.

Jump to

Keyboard shortcuts

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