Documentation
¶
Index ¶
- Constants
- func BuildPrompt(manifest *SkillManifest, skillContent string) string
- func DeleteManagedSourceSkill(ctx context.Context, storage ManagedSkillStorage, workspaceExternalID string, ...) error
- func ExtractInstructions(data []byte) string
- func FindSkillMD(dir string) (string, error)
- func KeyToName(key string) string
- func ManagedSourceSkillName(integration string) string
- func ManagedSourceSkillSource(integration string) string
- func ManifestKey(name string) string
- func NameToPath(name string) string
- func PathToName(path string) string
- func SkillNameFromPath(path string) string
- func UpsertManagedSourceSkill(ctx context.Context, storage ManagedSkillStorage, workspaceExternalID string, ...) error
- func WriteInstalledMeta(skillDir string, meta *InstalledSkill) error
- type AirstoreSkillMeta
- type InstalledSkill
- type ManagedSkillStorage
- type SkillManifest
Constants ¶
const ( Dir = types.DirNameSkills // S3 prefix (no leading slash) ManifestFile = "SKILL.md" // manifest filename InstalledMetaFile = ".installed.json" // install state file )
Variables ¶
This section is empty.
Functions ¶
func BuildPrompt ¶
func BuildPrompt(manifest *SkillManifest, skillContent string) string
BuildPrompt constructs the task prompt from a SKILL.md file's instructions. The prompt includes the skill name and the full instruction body so the agent has complete context when the hook triggers.
func DeleteManagedSourceSkill ¶ added in v0.1.71
func ExtractInstructions ¶
ExtractInstructions returns everything after the frontmatter block.
func FindSkillMD ¶
FindSkillMD looks for a SKILL.md file in a directory.
func ManagedSourceSkillName ¶ added in v0.1.71
func ManagedSourceSkillSource ¶ added in v0.1.71
func ManifestKey ¶
ManifestKey returns the S3 key for a skill's manifest: "skills/{name}/SKILL.md"
func NameToPath ¶
NameToPath converts a skill name to airstore path: "/skills/{name}"
func PathToName ¶
PathToName extracts skill name from an airstore path like "/skills/email-triage".
func SkillNameFromPath ¶
SkillNameFromPath derives a skill name from a directory path. e.g., "./email-triage/" → "email-triage"
func UpsertManagedSourceSkill ¶ added in v0.1.71
func WriteInstalledMeta ¶
func WriteInstalledMeta(skillDir string, meta *InstalledSkill) error
WriteInstalledMeta saves installed skill metadata to a directory.
Types ¶
type AirstoreSkillMeta ¶
type AirstoreSkillMeta struct {
Needs []string // integration names (gmail, slack, github, etc.)
Writes []string // output paths (created on install)
}
AirstoreSkillMeta holds Airstore-specific metadata extensions.
type InstalledSkill ¶
type InstalledSkill struct {
Name string `json:"name"`
Description string `json:"description"`
Needs []string `json:"needs"`
Source string `json:"source"` // where the skill was installed from (airstore://, github.com/, or local path)
}
InstalledSkill holds runtime info about an installed skill.
func ReadInstalledMeta ¶
func ReadInstalledMeta(skillDir string) (*InstalledSkill, error)
ReadInstalledMeta loads the installed skill metadata from a directory.
type ManagedSkillStorage ¶ added in v0.1.71
type ManagedSkillStorage interface {
WorkspaceBucketName(workspaceExternalId string) string
Upload(ctx context.Context, bucket, key string, data []byte) error
ListObjects(ctx context.Context, bucket, prefix string, maxKeys int32) (*s3.ListObjectsV2Output, error)
Delete(ctx context.Context, bucket, key string) error
}
type SkillManifest ¶
type SkillManifest struct {
Name string `yaml:"name"`
Description string `yaml:"description"`
License string `yaml:"license,omitempty"`
Compatibility string `yaml:"compatibility,omitempty"`
Metadata map[string]any `yaml:"metadata,omitempty"`
AllowedTools string `yaml:"allowed-tools,omitempty"`
}
SkillManifest represents the parsed frontmatter of a SKILL.md file, aligned with the Agent Skills specification (https://agentskills.io/specification).
func Parse ¶
func Parse(data []byte) (*SkillManifest, error)
Parse extracts a SkillManifest from the YAML frontmatter of a SKILL.md file.
The format follows the Agent Skills specification (https://agentskills.io/specification):
---
name: email-triage
description: Categorizes emails by urgency. Use when processing Gmail inbox.
license: MIT
metadata:
author: beam-cloud
version: "1.0"
airstore:
needs:
- gmail
writes:
- /reports/email-triage/
---
# Instructions
...
func ParseFile ¶
func ParseFile(path string) (*SkillManifest, string, error)
ParseFile reads a SKILL.md file and returns its manifest and full content.
func (*SkillManifest) AirstoreMetadata ¶
func (m *SkillManifest) AirstoreMetadata() *AirstoreSkillMeta
AirstoreMetadata returns Airstore-specific extensions from metadata.airstore.