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 ¶
Types ¶
This section is empty.