Formatter
Defined in: compiler/src/types.ts:79
Interface for formatters that convert AST to target format.
Extended by
Properties
defaultConvention
readonlydefaultConvention:string
Defined in: compiler/src/types.ts:87
Default convention for this formatter
description
readonlydescription:string
Defined in: compiler/src/types.ts:85
Human-readable description
name
readonlyname:string
Defined in: compiler/src/types.ts:81
Formatter name (e.g., “github”, “claude”, “cursor”)
outputPath
readonlyoutputPath:string
Defined in: compiler/src/types.ts:83
Output path pattern
Methods
format()
format(
ast,options?):FormatterOutput
Defined in: compiler/src/types.ts:89
Format the AST to target format
Parameters
ast
options?
Returns
formatCanonical()?
optionalformatCanonical(ast,options?):FormatterOutput
Defined in: compiler/src/types.ts:91
Optional canonical entry point for migrated formatters.
Parameters
ast
options?
Returns
getSkillBasePath()
getSkillBasePath():
string|null
Defined in: compiler/src/types.ts:93
Base path for skills (e.g., ‘.claude/skills’), or null if no skill support
Returns
string | null
getSkillFileName()
getSkillFileName():
string|null
Defined in: compiler/src/types.ts:95
Skill file name (e.g., ‘SKILL.md’ or ‘skill.md’), or null if no skill support
Returns
string | null
referencesMode()
referencesMode():
"none"|"directory"|"inline"
Defined in: compiler/src/types.ts:97
How this formatter handles skill references: ‘directory’, ‘inline’, or ‘none’
Returns
"none" | "directory" | "inline"
transformInjectedSkillContent()?
optionaltransformInjectedSkillContent(content):string
Defined in: compiler/src/types.ts:104
Optional hook to transform the raw content of a pass-through skill file (e.g. the bundled PromptScript SKILL.md) before it is written. Formatters whose target tools enforce frontmatter schemas can override this to strip unsupported fields.
Parameters
content
string
Returns
string