outputstyles

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package outputstyles loads user/project output style definitions from markdown files in .claude/output-styles/ directories.

Mirrors src/outputStyles/loadOutputStylesDir.ts.

Style files live at:

  • ~/.claude/output-styles/*.md (user-level)
  • <cwd>/.claude/output-styles/*.md (project-level, overrides user)

Each .md file becomes one OutputStyle. Frontmatter fields:

name: Human-readable name (defaults to filename stem)
description: One-line description
keep-coding-instructions: true/false

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Style

type Style struct {
	Name                   string
	Description            string
	Prompt                 string
	Source                 string // "user" or "project"
	KeepCodingInstructions bool
}

Style is one loaded output style definition.

func LoadAll

func LoadAll(cwd string) ([]Style, error)

LoadAll returns all available output styles. Priority (lowest → highest): built-in, user dir, project dir. Same name in a higher tier overrides.

Built-in "default", "Explanatory", "Learning" are always present so /output-style with no args is never empty out of the box.

func LoadFromPluginDirs

func LoadFromPluginDirs(pluginDirs []string) []Style

LoadFromPluginDirs scans each pluginDir for an "output-styles" subdirectory and loads any styles found there. Plugin styles are lowest priority — they are overridden by user/project styles of the same name. pluginDirs should be the InstallPath of each loaded plugin.

Jump to

Keyboard shortcuts

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