registry

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package registry provides access to the skills.sh skill directory.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatCount

func FormatCount(n int) string

FormatCount returns a human-readable count (e.g., "85.7K", "1.2M").

Types

type Skill

type Skill struct {
	Source   string // e.g., "anthropics/skills"
	SkillID  string // e.g., "frontend-design"
	Name     string // e.g., "frontend-design"
	Installs int    // e.g., 123897
}

Skill represents a skill from the skills.sh directory.

func FetchTopSkills

func FetchTopSkills(ctx context.Context, limit int) ([]Skill, error)

FetchTopSkills fetches the most popular skills from skills.sh via the search API.

func ParseSearchResponse

func ParseSearchResponse(body []byte) ([]Skill, error)

ParseSearchResponse parses the JSON response from the skills.sh search API.

func Search(skills []Skill, query string) []Skill

Search filters skills locally by a query string, matching against name and source. Prefer SearchSkills for server-side search across the full directory.

func SearchSkills

func SearchSkills(ctx context.Context, query string, limit int) ([]Skill, error)

SearchSkills searches the skills.sh directory via the API. The API requires a minimum 2-character query and supports a configurable limit.

func (Skill) FormatInstalls

func (s Skill) FormatInstalls() string

FormatInstalls returns a human-readable install count (e.g., "123.9K", "1.2M").

func (Skill) TreeURL

func (s Skill) TreeURL(branch string) string

TreeURL returns the GitHub tree URL for this skill.

Jump to

Keyboard shortcuts

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