Documentation
¶
Overview ¶
Package skill provides the holodeck agentic-skill catalog: parsing, rendering for each agent target, and installation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Install ¶
func Install(r Renderer, s Skill, opts InstallOptions) (string, error)
Install renders the skill via r and writes it to the renderer's install path. Returns the path written to.
For per-file renderers (Claude, Cursor), the rendered bytes become the entire file. If the destination exists and Force is false:
- TTY → prompt y/N
- Non-TTY → error out with a message mentioning --force
For single-file renderers (Codex, Gemini), the rendered bytes are a section block, and the existing file's other content is preserved. Re-installing the same skill is idempotent.
Types ¶
type InstallOptions ¶
type InstallOptions struct {
Global bool
Force bool
DryRun bool
Stdin io.Reader // for overwrite prompt; defaults to os.Stdin
Stdout io.Writer // for prompts and dry-run output; defaults to os.Stdout
Stderr io.Writer // for warnings; defaults to os.Stderr
IsTTY func() bool // override TTY check; defaults to isatty on Stdin
}
InstallOptions controls how a skill is written to disk.
type Renderer ¶
type Renderer interface {
// AgentName returns the short identifier for the agent ("claude",
// "cursor", "codex", "gemini").
AgentName() string
// Render produces the bytes to install for this skill.
Render(Skill) ([]byte, error)
// InstallPath returns the destination path. global=true selects
// the user-wide install location; global=false selects project-
// local (relative to CWD).
InstallPath(skill Skill, global bool) (string, error)
// SingleFile reports whether this agent writes into a shared file
// (true) or a dedicated per-skill file (false).
SingleFile() bool
}
Renderer translates a Skill into an agent-specific representation and reports where it should be installed.
For per-file agents (claude, cursor), Render returns the full file contents and InstallPath returns the per-skill file path. For single-file agents (codex, gemini), Render returns a section block delimited by holodeck-skill markers and InstallPath returns the shared file path (independent of the skill name).
func NewClaudeRenderer ¶
func NewClaudeRenderer() Renderer
NewClaudeRenderer returns a Renderer for Claude Code.
func NewCodexRenderer ¶
func NewCodexRenderer() Renderer
NewCodexRenderer returns a Renderer for the Codex CLI.
func NewCursorRenderer ¶
func NewCursorRenderer() Renderer
NewCursorRenderer returns a Renderer for Cursor IDE.
func NewGeminiRenderer ¶
func NewGeminiRenderer() Renderer
NewGeminiRenderer returns a Renderer for the Gemini CLI.