skills

package
v0.4.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2026 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package skills is experimental: its API and documented formats may change in a minor release; see https://nsgo.games/docs/stability/.

It embeds the nsgo-game agent skill, so the editor's MCP server and the go tool game mcp proxy serve the skill in the version they were built with. It sits beside skills/nsgo-game rather than under pkg/ because go:embed cannot reach a parent directory.

Example

The embedded skill lists SKILL.md, whose front matter names the skill an agent loads.

package main

import (
	"bytes"
	"fmt"
	"slices"

	"github.com/nsgo-dev/game/skills"
)

func main() {
	fmt.Println(slices.Contains(skills.Files(), "SKILL.md"))
	data, err := skills.ReadFile("SKILL.md")
	if err != nil {
		fmt.Println(err)
		return
	}
	fmt.Println(bytes.Contains(data, []byte("name: nsgo-game")))

	_, err = skills.ReadFile("../go.mod")
	fmt.Println(err)
}
Output:
true
true
read ../go.mod: invalid argument

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Files

func Files() []string

Files returns the paths of the skill's files relative to skills/nsgo-game, such as SKILL.md and references/mcp-tools.md, in lexical order.

func ReadFile

func ReadFile(rel string) ([]byte, error)

ReadFile returns the bytes of the skill file at rel, a path that Files returns.

Types

This section is empty.

Jump to

Keyboard shortcuts

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