tpl

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package tpl provides embedded assets for ctx: .context/ templates stamped by "ctx init" and the Claude Code plugin (skills, hooks, manifest) served directly from claude/.

The name "tpl" is historical — a rename to "assets" is tracked as cleanup work but deferred to avoid churn across 15+ import sites.

Index

Constants

This section is empty.

Variables

Functions

func Entry

func Entry(name string) ([]byte, error)

Entry reads an entry template by name.

Parameters:

  • name: Template filename (e.g., "decision.md")

Returns:

  • []byte: Template content from entry-templates/
  • error: Non-nil if the file is not found or read fails

func List

func List() ([]string, error)

List returns all available template file names.

Returns:

  • []string: List of template filenames in the root templates directory
  • error: Non-nil if directory read fails

func ListEntry

func ListEntry() ([]string, error)

ListEntry returns available entry template file names.

Returns:

  • []string: List of template filenames in entry-templates/
  • error: Non-nil if directory read fails

func ListSkills added in v0.3.0

func ListSkills() ([]string, error)

ListSkills returns available skill directory names.

Each skill is a directory containing a SKILL.md file following the Agent Skills specification (https://agentskills.io/specification).

Returns:

  • []string: List of skill directory names in claude/skills/
  • error: Non-nil if directory read fails

func ListTools added in v0.3.0

func ListTools() ([]string, error)

ListTools returns available tool script filenames.

Returns:

  • []string: List of tool filenames in tools/
  • error: Non-nil if directory read fails

func MakefileCtx added in v0.3.0

func MakefileCtx() ([]byte, error)

MakefileCtx reads the ctx-owned Makefile include template.

Returns:

  • []byte: Makefile.ctx content
  • error: Non-nil if the file is not found or read fails

func RalphTemplate added in v0.3.0

func RalphTemplate(name string) ([]byte, error)

RalphTemplate reads a Ralph-mode template file by name.

Ralph mode templates are designed for autonomous loop operation, with instructions for one-task-per-iteration, completion signals, and no clarifying questions.

Parameters:

  • name: Template filename (e.g., "PROMPT.md")

Returns:

  • []byte: Template content from ralph/
  • error: Non-nil if the file is not found or read fails

func SkillContent added in v0.3.0

func SkillContent(name string) ([]byte, error)

SkillContent reads a skill's SKILL.md file by skill name.

Parameters:

  • name: Skill directory name (e.g., "ctx-status")

Returns:

  • []byte: SKILL.md content from claude/skills/<name>/
  • error: Non-nil if the file not found or read fails

func Template

func Template(name string) ([]byte, error)

Template reads a template file by name from the embedded filesystem.

Parameters:

  • name: Template filename (e.g., "TASKS.md")

Returns:

  • []byte: Template content
  • error: Non-nil if the file is not found or read fails

func Tool added in v0.3.0

func Tool(name string) ([]byte, error)

Tool reads a tool script by filename.

Parameters:

  • name: Tool filename (e.g., "context-watch.sh")

Returns:

  • []byte: Tool script content from tools/
  • error: Non-nil if the file is not found or read fails

Types

This section is empty.

Jump to

Keyboard shortcuts

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