dify/cli/src/help/skill.ts
L1nSn0w f0fd7ddb60
feat(cli): unified help system (#36896)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-04 07:27:28 +00:00

15 lines
627 B
TypeScript

import { SKILL_TEMPLATE } from './skill-template'
export type RenderSkillOptions = {
readonly version: string
}
// Renders the difyctl SKILL.md by substituting only the version stamp into the
// hand-authored, pure-delegation template. There is no command-tree walk: the
// skill points agents at `difyctl help -o json` for the live command surface
// rather than enumerating it, so there is nothing to derive and nothing to
// drift. The single file is what `skills install` writes / prints.
export function renderSkill(opts: RenderSkillOptions): string {
return SKILL_TEMPLATE.replaceAll('{{VERSION}}', opts.version)
}