skill

package
v1.16.1 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package skill implements `dash0 skill install` and `dash0 skill show`, which distribute an Agent Skill (per the open agentskills.io specification) teaching AI coding agents how to use the dash0 CLI.

Index

Constants

This section is empty.

Variables

View Source
var Manifest = []ManifestEntry{
	{"apply", "references/apply.md"},
	{"api", "references/api.md"},
	{"check-rules", "references/check-rules.md"},
	{"config", "references/config.md"},
	{"dashboards", "references/dashboards.md"},
	{"failed-checks", "references/failed-checks.md"},
	{"login", "references/login.md"},
	{"logs", "references/logs.md"},
	{"members", "references/members.md"},
	{"metrics", "references/metrics.md"},
	{"notification-channels", "references/notification-channels.md"},
	{"otlp", "references/otlp.md"},
	{"recording-rules", "references/recording-rules.md"},
	{"spam-filters", "references/spam-filters.md"},
	{"spans", "references/spans.md"},
	{"synthetic-checks", "references/synthetic-checks.md"},
	{"teams", "references/teams.md"},
	{"traces", "references/traces.md"},
	{"views", "references/views.md"},
}

Manifest lists every reference topic bundled with the skill, one per top-level dash0 command (excluding `version`, which is trivial enough to live only in SKILL.md's own prose).

Functions

func HostSupported

func HostSupported(slug string) bool

HostSupported reports whether slug is a supported `skill install` target. Callers use this to decide whether nudging the user toward `dash0 skill install` would actually help.

func IsInstalled

func IsInstalled(dir string) bool

IsInstalled reports whether the skill bundle appears to already be installed under dir, checking every supported host's directory. This is a broader "has this project been set up at all" check, independent of which single host `skill install` would target on any given run.

A host is considered installed only when BOTH SKILL.md and the first reference topic exist, so a partially written install (e.g., interrupted by ENOSPC after SKILL.md landed but before the references directory did) does not silently suppress the agent-mode install hint.

func NewSkillCmd

func NewSkillCmd() *cobra.Command

NewSkillCmd creates the parent `skill` command, which manages the dash0-cli Agent Skill for AI coding agents.

func SkillMD

func SkillMD() (string, error)

SkillMD returns the embedded SKILL.md content.

func TopicContent

func TopicContent(topic string) (string, error)

TopicContent returns the embedded reference content for the given topic.

func TopicNames

func TopicNames() []string

TopicNames returns every valid topic name, in Manifest order.

Types

type ManifestEntry

type ManifestEntry struct {
	// Topic is the slug an agent passes to `dash0 skill show <topic>`. It
	// matches the actual top-level `dash0 <command>` name, not an internal
	// taxonomy category.
	Topic string
	// RelPath is the file's path relative to content/, e.g. "references/dashboards.md".
	RelPath string
}

ManifestEntry describes one reference topic bundled with the skill.

Directories

Path Synopsis
Command gen generates internal/skill/content/references/*.md from docs/commands.md.
Command gen generates internal/skill/content/references/*.md from docs/commands.md.

Jump to

Keyboard shortcuts

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