Agent Skills › langchain-ai/openwiki

langchain-ai/openwiki

GitHub

将现有OpenWiki迁移为符合OKF标准,通过递归分配子代理批量修复或添加YAML前置元数据,严格保留文档正文及自定义字段,确保合规且不影响文件结构。

2 个 Skill 12,358

安装全部 Skills

npx skills add langchain-ai/openwiki --all -g -y
更多选项

预览集合内 Skills

npx skills add langchain-ai/openwiki --list

集合内 Skills (2)

将现有OpenWiki迁移为符合OKF标准,通过递归分配子代理批量修复或添加YAML前置元数据,严格保留文档正文及自定义字段,确保合规且不影响文件结构。
用户请求OKF迁移 Wiki Markdown文件缺少有效的OKF YAML front matter
skills/migrate-wiki-to-okf/SKILL.md
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

  1. Before editing, recursively inventory every directory under the wiki root. Include the root directory itself.
  2. Write a plan listing every discovered directory and its assigned subagent.
  3. Spawn exactly one subagent for each directory. If concurrency is limited, run them in batches; never combine multiple directories into one assignment.
  4. Give each subagent write access only to Markdown files directly inside its assigned directory. It must not recurse into or modify another directory.
  5. 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 timestamp and producer-defined extension fields. Never delete an unknown field merely because OpenWiki did not create it.
  • Require only a non-empty, descriptive type. Infer recommended title and one to two sentence description values when useful. Add resource, tags, or timestamp only 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.md and log.md are 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.

指导在OpenWiki仓库中开发内置TypeScript连接器,涵盖文件结构、安全规范及数据摄取规则。需确保密钥安全、路径校验及状态持久化,并在完成后告知用户配置变更与运行步骤。
创建新的OpenWiki连接器 实现OpenWiki数据源连接
skills/write-connector/SKILL.md
npx skills add langchain-ai/openwiki --skill write-connector -g -y
SKILL.md
Frontmatter
{
    "name": "write-connector",
    "description": "Add a new built-in OpenWiki source connector. Use when a user asks to create or implement an OpenWiki connector."
}

Write An OpenWiki Connector

OpenWiki connectors are built-in TypeScript modules in the OSS repository. Do not create a plugin marketplace, dynamic connector package, or runtime-loaded untrusted connector. Add normal source files and tests.

Required Shape

  • Add the connector to src/connectors/types.ts and src/connectors/registry.ts.
  • Implement the connector under src/connectors/sources/.ts.
  • The connector must expose a ConnectorRuntime with id, displayName, description, backend, requiredEnv, supportsAgenticDiscovery, and ingest().
  • Ingestion writes raw JSON/manifests under ~/.openwiki/connectors//raw//.
  • State lives in ~/.openwiki/connectors//state.json.
  • Config lives in ~/.openwiki/connectors//config.json.
  • Secrets live in ~/.openwiki/.env and are referenced only by env var name.

Security Rules

  • Never read, print, log, return, or hardcode secret values.
  • Do not store credentials in connector config, raw files, state, logs, or tests.
  • Validate connector IDs and raw file paths so reads and writes stay inside ~/.openwiki/connectors//.
  • Use deterministic ingestion code for credentialed external fetching.
  • If wrapping MCP, treat the MCP server as read-only and call only allowlisted read/dump operations from connector config.
  • Do not let untrusted connector manifests instantiate arbitrary commands or arbitrary network endpoints without explicit built-in code review.

Ingestion Rules

  • Git/local repos should write compact manifests and let the agent inspect the local repo as the source of truth.
  • Sources with timestamps should store per-stream cursors.
  • Sources with object metadata should store IDs, last edited timestamps, and content hashes.
  • Sources with pagination should store enough state to continue without refetching everything.
  • Raw dumps should preserve source IDs, timestamps, URLs, authors, and enough provenance for citations.

User-Facing Finish

When done, tell the user:

  • which connector files changed,
  • which env vars to set in ~/.openwiki/.env,
  • what config file to create or edit,
  • how to run openwiki personal --update to trigger ingestion,
  • which scopes/permissions the source provider requires.

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-22 04:08
浙ICP备14020137号-1 $访客地图$