Agent Skills
› langchain-ai/openwiki
› migrate-wiki-to-okf
migrate-wiki-to-okf
GitHub将现有OpenWiki迁移为符合OKF标准,通过递归分配子代理批量修复或添加YAML前置元数据,严格保留文档正文及自定义字段,确保合规且不影响文件结构。
触发场景
用户请求OKF迁移
Wiki Markdown文件缺少有效的OKF YAML front matter
安装
npx skills add langchain-ai/openwiki --skill migrate-wiki-to-okf -g -y
SKILL.md
Frontmatter
{
"name": "migrate-wiki-to-okf",
"description": "Make an existing OpenWiki fully OKF-compliant. Use when any current wiki Markdown files lack valid OKF YAML front matter or when the user requests an OKF migration."
}
Migrate Wiki to OKF
Add or correct OKF front matter across the existing wiki without changing accurate document bodies.
Workflow
- Before editing, recursively inventory every directory under the wiki root. Include the root directory itself.
- Write a plan listing every discovered directory and its assigned subagent.
- Spawn exactly one subagent for each directory. If concurrency is limited, run them in batches; never combine multiple directories into one assignment.
- Give each subagent write access only to Markdown files directly inside its assigned directory. It must not recurse into or modify another directory.
- Wait for every subagent, then verify that every planned directory was processed. Send missed corrections back to a subagent scoped to that same directory.
Subagent Task
Each subagent must:
- Inspect every non-reserved Markdown concept file directly in its assigned directory.
- Leave already compliant files unchanged.
- Add or correct only the leading YAML front matter when needed. Preserve the existing Markdown body.
- Preserve all valid existing front matter fields, including
timestampand producer-defined extension fields. Never delete an unknown field merely because OpenWiki did not create it. - Require only a non-empty, descriptive
type. Infer recommendedtitleand one to two sentencedescriptionvalues when useful. Addresource,tags, ortimestamponly when supported by the document and available evidence. - Use this standard-field formatter while retaining any existing producer extensions:
---
type: <Type name>
title: <Optional display name>
description: <Optional one to two sentence summary (optimized for search & retrieval)>
resource: <Optional canonical URI for the underlying asset>
tags: [<tag>, <tag>]
timestamp: <Optional ISO 8601 datetime>
---
index.mdandlog.mdare reserved OKF documents. Do not add concept front matter to them or process them as concepts; OpenWiki regenerates directory indexes deterministically after the run.- Report the files checked, the files changed, and any file whose metadata could not be inferred confidently.
- The description field is important for retrieval tools. When present, make it clear, detailed, and optimized for search.
Do not create, delete, move, or reorganize wiki pages during this migration.
版本历史
- 0.2.0 当前 2026-07-19 09:15


