Documentation
¶
Overview ¶
Package skillkit discovers and gates portable SKILL.md packages.
It does not execute skill scripts, install dependencies, or grant tools.
Index ¶
- Variables
- func ValidateManifest(directory string, manifest Manifest) error
- type ActivatedSkill
- type Activation
- type ActivationRequest
- type Availability
- type AvailabilityReport
- type Catalog
- type Entry
- type EntryState
- type GateContext
- type Manifest
- type Reason
- type Ref
- type Requirements
- type Root
- type Scope
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidSkillManifest = errors.New("invalid skill manifest") ErrInvalidSkillResource = errors.New("invalid skill resource") ErrSkillNotFound = errors.New("skill not found") ErrSkillAmbiguous = errors.New("skill name is ambiguous") ErrSkillDigestMismatch = errors.New("skill content changed") )
Functions ¶
func ValidateManifest ¶
ValidateManifest checks the subset of the Agent Skills format needed for a safe local catalog. It does not inspect the filesystem.
Types ¶
type ActivatedSkill ¶
type ActivatedSkill struct {
Ref Ref
Name string
Description string
Content string
RequiredToolIDs []string
OptionalToolIDs []string
}
ActivatedSkill is the safe, path-free view of one activated skill.
type Activation ¶
type Activation struct {
// contains filtered or unexported fields
}
Activation is an immutable run-start selection. It retains private catalog records only so it can revalidate content before returning a resource.
func (*Activation) GoString ¶
func (a *Activation) GoString() string
GoString keeps %#v diagnostics path-free for the same reason as String.
func (*Activation) ReadResource ¶
func (a *Activation) ReadResource(uri string) ([]byte, error)
ReadResource returns a copy of one current, allowlisted resource. It checks the full package digest again so source mutations fail closed.
func (*Activation) ResourceURI ¶
func (a *Activation) ResourceURI(ref Ref, resource string) (string, error)
ResourceURI returns the only supported resource reference form. The target must belong to the current activation and be explicitly allowlisted.
func (*Activation) Skills ¶
func (a *Activation) Skills() []ActivatedSkill
Skills returns a copy of the activated model-facing instructions.
func (*Activation) String ¶
func (a *Activation) String() string
String avoids exposing private catalog roots through host diagnostics.
type ActivationRequest ¶
type ActivationRequest struct {
Skills []Ref
GateContext GateContext
}
ActivationRequest is the host-controlled selection and capability context for one run. Declared requirements never add to GateContext permissions.
type Availability ¶
type Availability string
Availability is the host-relative result of checking one catalog entry.
const ( AvailabilityEligible Availability = "eligible" AvailabilityInvalid Availability = "invalid" AvailabilityAmbiguous Availability = "ambiguous" )
type AvailabilityReport ¶
type AvailabilityReport struct {
State Availability
Reasons []Reason
}
AvailabilityReport is deterministic and safe to expose to an operator.
func Evaluate ¶
func Evaluate(entry Entry, context GateContext) AvailabilityReport
Evaluate applies fail-closed entry and capability checks without performing I/O. Declared capabilities are requirements, never authorization grants.
type Catalog ¶
type Catalog struct {
// contains filtered or unexported fields
}
Catalog is an immutable snapshot produced by Discover.
func Discover ¶
Discover reads enabled roots and returns a deterministic catalog snapshot. It performs no process execution, dependency installation, network I/O, or environment mutation.
func (*Catalog) Activate ¶
func (c *Catalog) Activate(request ActivationRequest) (*Activation, error)
Activate resolves, gates, and rechecks each requested skill before exposing its instruction body. It never executes files or grants tools.
type Entry ¶
type Entry struct {
Ref Ref
Manifest Manifest
RootID string
SourceRootIDs []string
Scope Scope
Trusted bool
State EntryState
Reasons []Reason
}
Entry is a catalog-safe skill description. It intentionally omits local filesystem paths and source contents.
type EntryState ¶
type EntryState string
EntryState describes whether an entry can be considered by a gate.
const ( EntryReady EntryState = "ready" EntryInvalid EntryState = "invalid" EntryAmbiguous EntryState = "ambiguous" )
type GateContext ¶
GateContext contains only host-owned capability facts for one run.
type Manifest ¶
type Manifest struct {
Name string
Description string
License string
Requirements Requirements
Resources []string
Metadata map[string]any
}
Manifest is the portable SKILL.md metadata interpreted by skillkit. Metadata preserves unrecognized fields so the package remains portable.
type Requirements ¶
type Requirements struct {
OS []string
HostFeatures []string
RequiredToolIDs []string
OptionalToolIDs []string
}
Requirements describes capabilities a skill needs from its host. These are declarations only; they never grant a tool or permission.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package agentadapter adapts host-approved skillkit activations to the goagent SkillProvider contract.
|
Package agentadapter adapts host-approved skillkit activations to the goagent SkillProvider contract. |