name: tech-writing-linter description: 对技术文档进行风格、一致性和可读性检查 allowed-tools:
- Bash
- Read
- Write
- Glob
技术文档风格检查技能
概述
使用 Vale、write-good 和自定义风格指南,对技术文档的风格、一致性、术语和可读性进行检查。
功能
- Vale 和 write-good 集成
- 技术写作规则强制执行
- 术语一致性检查
- 可读性评分(Flesch-Kincaid 等)
- 自定义风格指南强制执行
- 行话和被动语态检测
- 包容性语言检查
目标流程
- 所有文档流程
输入模式
{
"type": "object",
"required": ["paths"],
"properties": {
"paths": {
"type": "array",
"items": { "type": "string" },
"description": "技术文档文件的路径"
},
"engine": {
"type": "string",
"enum": ["vale", "write-good", "both"],
"default": "vale"
},
"styleGuide": {
"type": "string",
"enum": ["google", "microsoft", "redhat", "custom"],
"default": "google"
},
"options": {
"type": "object",
"properties": {
"minReadability": {
"type": "number",
"default": 60,
"description": "最低 Flesch 阅读易读性分数"
},
"checkTerminology": {
"type": "boolean",
"default": true
},
"customTerms": {
"type": "object",
"description": "自定义术语映射"
}
}
}
}
}
输出模式
{
"type": "object",
"properties": {
"files": {
"type": "array",
"items": {
"type": "object",
"properties": {
"path": { "type": "string" },
"issues": { "type": "array" },
"readabilityScore": { "type": "number" }
}
}
},
"summary": {
"type": "object",
"properties": {
"totalIssues": { "type": "number" },
"byCategory": { "type": "object" },
"averageReadability": { "type": "number" }
}
}
}
}
使用示例
{
kind: 'skill',
skill: {
name: 'tech-writing-linter',
context: {
paths: ['docs/**/*.md'],
engine: 'vale',
styleGuide: 'google',
options: {
minReadability: 60,
checkTerminology: true
}
}
}
}