skill-files.ts
基本信息
- 类型: 工具库
- 路径:
src/lib/skill-files.ts
功能描述
Utilities for parsing and serializing multi-file skill content. Files are stored in a single text field with a special separator format using ASCII control characters:
file 1 content \x1FFILE:filename.ext\x1E file 2 content \x1FFILE:another-file.md\x1E file 3 content
\x1F (ASCII 31, Unit Separator) and \x1E (ASCII 30, Record Separator) are control characters designed for data delimiting that cannot appear in normal text content, making them injection-proof.
导出内容
- <code>SkillFile</code> - 接口
- <code>DEFAULTSKILLFILE</code> - 常量
- <code>DEFAULTSKILLCONTENT</code> - 常量
- <code>parseSkillFiles</code> - 函数
- <code>serializeSkillFiles</code> - 函数
- <code>getLanguageFromFilename</code> - 函数
- <code>FilenameValidationError</code> - 类型
- <code>validateFilename</code> - 函数
- <code>isValidKebabCase</code> - 函数
- <code>generateSkillContentWithFrontmatter</code> - 函数
- <code>parseSkillFrontmatter</code> - 函数
- <code>updateSkillFrontmatter</code> - 函数
- <code>SkillFrontmatterValidationError</code> - 类型
- <code>validateSkillFrontmatter</code> - 函数
- <code>suggestFilename</code> - 函数
依赖导入
- 无外部依赖
详细说明
详见代码实现