skill

package
v0.6.0 Latest Latest
Warning

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

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

Documentation

Overview

Package skill embeds the north agent skill and installs it into the skill directories of AI coding agents (Claude Code, opencode).

Index

Constants

View Source
const Name = "north"

Name is the skill's directory name and identifier.

Variables

View Source
var Version = version.Version

Version is the embedded skill's version, stamped into installed SKILL.md files so `north skill` can detect outdated installs.

Functions

func Content

func Content() string

Content returns the SKILL.md text with the version comment injected after the frontmatter block.

func InstalledVersion

func InstalledVersion(content string) string

InstalledVersion extracts the version stamp from an installed SKILL.md's content ("" when no stamp is present).

Types

type Agent

type Agent struct {
	Name        string // identifier
	DisplayName string // human-readable
	ProjectDir  string // skill base dir relative to the repo root
	GlobalDir   string // skill base dir relative to the user's home dir
}

Agent describes an AI coding agent and where its skills live.

func Agents

func Agents() []Agent

Agents returns the supported agents.

type Target

type Target struct {
	Agent string // agent display name
	Dir   string // absolute path to the skill dir (…/north)
	Path  string // absolute path to the SKILL.md file
}

Target is a resolved install location for one agent.

func Install

func Install(projectRoot string, global bool, names ...string) ([]Target, error)

Install writes the embedded SKILL.md into the named agents' skill dirs (all agents when names is empty), under projectRoot or the home dir when global. Returns the written targets.

func Targets

func Targets(projectRoot string, global bool, names ...string) ([]Target, error)

Targets resolves install locations for the named agents (all when names is empty). When global is true they resolve under the user's home dir, otherwise under projectRoot. Unknown names are an error.

Jump to

Keyboard shortcuts

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