instill

package module
v0.0.0-...-4e2280b Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: MIT Imports: 10 Imported by: 0

README

instill

A Go library for installing Agent Skills into AI coding agents.

An agent skill is just a directory with a SKILL.md file — markdown instructions with YAML frontmatter. Agents like Claude Code, Cursor, and Windsurf each expect these files in different locations. instill puts them there.

your-tool/
└── skills/
    └── your-skill/
        ├── SKILL.md              # instructions + frontmatter
        └── references/           # optional detailed docs
            └── commands.md

That's it. No SDK, no runtime, no protocol. Markdown files in the right directories.

Looking for a standalone tool to manage skills? Use vercel-labs/skills instead. instill is a Go library for CLI tools that want to bundle and install their own agent skills as part of their distribution.

Usage

import (
    "embed"
    "fmt"
    "log"

    "github.com/tiulpin/instill"
)

//go:embed skills
var skills embed.FS

func main() {
    // Detect which agents are present
    agents, _ := instill.Detect(".", false)
    names := make([]string, len(agents))
    for i, a := range agents {
        names[i] = a.Name
    }

    // Install skill files to each agent's expected location
    results, err := instill.Install(skills, instill.Options{
        Agents:     names,
        ProjectDir: ".",
    })
    if err != nil {
        log.Fatal(err)
    }
    for _, r := range results {
        fmt.Printf("%s: %s (existed=%v)\n", r.Agent, r.Path, r.Existed)
    }
}

API

Function Description
Detect(projectDir, global) Find which agents have config dirs present
Install(fsys, opts) Copy skill files to each agent's skills directory
Remove(name, opts) Delete an installed skill by name
InstalledVersion(name, opts) Read version from an installed skill's frontmatter; returns (string, error)
SkillVersion(fsys) Read version from a skill FS (e.g. embedded)
AgentNames() List all 39 supported agent names

What it does

  1. Reads your SKILL.md frontmatter for the skill name
  2. Resolves each agent's skills directory (project-local or global)
  3. Cleans the target directory (removes stale files from prior installs)
  4. Copies all skill files (SKILL.md, references/, etc.)
  5. Reports what was created vs updated, with prior version from frontmatter

Supported agents

39 agents supported. Paths sourced from vercel-labs/skills.

Run instill.AgentNames() for the full list, or see agents.go.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AgentNames

func AgentNames() []string

AgentNames returns all known agent names in sorted order.

func InstalledVersion

func InstalledVersion(skillName string, opts Options) (string, error)

InstalledVersion returns the version from an installed skill's SKILL.md frontmatter. Returns "" if the skill is not installed or has no version field.

func SkillVersion

func SkillVersion(fsys fs.FS) string

SkillVersion returns the version from the first SKILL.md found in fsys. Returns "" if no version field is present.

Types

type Agent

type Agent struct {
	Name        string
	DisplayName string
	ProjectDir  string // project-level skills dir (relative)
	GlobalDir   string // global skills dir (absolute)
}

Agent represents a detected AI coding agent

func Detect

func Detect(projectDir string, global bool) ([]Agent, error)

Detect returns agents whose config directories exist in projectDir (or globally)

type Options

type Options struct {
	Agents     []string // required: agent names to target
	ProjectDir string   // project root (for project-level operations)
	Global     bool     // operate on global dirs instead of project-level
}

Options configure Install and Remove

type Result

type Result struct {
	Agent        string
	Path         string
	Existed      bool   // true if the skill was already present before this operation
	PriorVersion string // version from previously installed SKILL.md ("" if new)
}

Result reports what happened for each agent

func Install

func Install(fsys fs.FS, opts Options) ([]Result, error)

Install writes skill files from fsys to each target agent's skills directory.

func Remove

func Remove(skillName string, opts Options) ([]Result, error)

Remove deletes installed skill files by name.

Jump to

Keyboard shortcuts

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