document-sync
БесплатноБез исполняемых скриптовНе проверен文档同步系统,持续检查学习项目文档,保持知识最新
от WenJunDuan★ 187 звёзд на GitHubОб этом скилле
Document Sync Skill
核心问题: 如何保持对项目文档的持续学习? 解决方案: 周期性检查 + 变更检测 + 知识提取
🎯 核心功能
- 周期性检查 — 每个阶段检查文档变化
- 变更检测 — 识别文档更新
- 知识提取 — 从文档中提取规则和约定
- 同步更新 — 保持 AI 知识与文档同步
📁 监控文档列表
项目级文档
| 文档 | 内容 | 检查频率 |
|---|---|---|
README.md |
项目说明 | 每阶段 |
CONTRIBUTING.md |
贡献指南 | 每阶段 |
CHANGELOG.md |
变更记录 | 每阶段 |
package.json |
依赖配置 | 每阶段 |
tsconfig.json |
TS配置 | 每阶段 |
.eslintrc |
Lint规则 | 每阶段 |
AI 状态文档
| 文档 | 内容 | 检查频率 |
|---|---|---|
active_context.md |
当前任务 | 每操作 |
kanban.md |
进度看板 | 每任务 |
conventions.md |
项目约定 | 每阶段 |
decisions.md |
技术决策 | 每阶段 |
session.yaml |
会话状态 | 每操作 |
🔄 检查流程
┌─────────────────────────────────────────────────────────────┐
│ 文档检查流程 │
├─────────────────────────────────────────────────────────────┤
│ │
│ 阶段开始 / 阶段结束 │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ Step 1: 扫描文档列表 │ │
│ │ - 检查文件是否存在 │ │
│ │ - 获取文件修改时间 │ │
│ └─────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ Step 2: 检测变更 │ │
│ │ - 对比上次检查时间 │ │
│ │ - 标记变更的文档 │ │
│ └─────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ Step 3: 读取变更内容 │ │
│ │ - 读取变更的文档 │ │
│ │ - 提取关键信息 │ │
│ └─────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ Step 4: 更新知识 │ │
│ │ - 更新项目约定 │ │
│ │ - 更新禁止规则 │ │
│ │ - 记录到 Memory │ │
│ └─────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ Step 5: 记录检查时间 │ │
│ │ - 更新 last_check 时间戳 │ │
│ └─────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘
📋 检查记录文件
project_document/.ai_state/doc_check.yaml:
# 文档检查记录
last_check: "2025-01-12T10:30:00Z"
# 文档状态
documents:
README.md:
last_modified: "2025-01-10T15:00:00Z"
last_checked: "2025-01-12T10:30:00Z"
hash: "abc123..."
conventions.md:
last_modified: "2025-01-12T09:00:00Z"
last_checked: "2025-01-12T10:30:00Z"
hash: "def456..."
extracted_rules: 5
# 提取的知识
extracted:
- source: "conventions.md"
type: "rule"
content: "所有API响应使用统一格式"
added_at: "2025-01-12T10:30:00Z"
🧠 知识提取规则
从 conventions.md 提取
async function extractFromConventions(content) {
const rules = [];
// 提取命名规范
const namingSection = extractSection(content, '命名规范');
if (namingSection) {
rules.push({
type: 'naming',
content: namingSection
});
}
// 提取代码规范
const codeSection = extractSection(content, '代码规范');
if (codeSection) {
rules.push({
type: 'code_style',
content: codeSection
});
}
// 提取禁止规则
const forbiddenSection = extractSection(content, '禁止');
if (forbiddenSection) {
for (const rule of parseForbiddenRules(forbiddenSection)) {
await memory.add({
category: 'forbidden_action',
content: rule,
source: 'conventions.md'
});
}
}
return rules;
}
从 decisions.md 提取
async function extractFromDecisions(content) {
const decisions = parseADR(content); // ADR格式
for (const decision of decisions) {
// 记录技术决策
await memory.add({
category: 'project_decision',
content: `${decision.title}: ${decision.decision}`,
context: decision.context,
source: 'decisions.md'
});
Установить document-sync в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл document-sync?
文档同步系统,持续检查学习项目文档,保持知识最新
Как установить скилл document-sync?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл document-sync запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic