Skip to content

[Feature]: Support using OpenWiki without an API key by exporting it as Claude Code skills #349

Description

Summary

Problem

Today, running OpenWiki on a repository requires configuring an OpenWiki model
provider and API key — OpenWiki's CLI is the LLM host and runs its own agent
loop. That's a barrier for a large group of users who already have a capable
coding agent (Claude Code) in their editor and simply want repository docs
generated and maintained, without setting up and paying for a separate
inference provider.

Proposal

Add a first-class, spec-kit-style subcommand:

openwiki integration claude [path]

It scaffolds two Claude Code skills — openwiki-init and openwiki-update
into .claude/skills/ in the target repository (defaulting to the current
directory). The user then runs /openwiki-init / /openwiki-update inside
Claude Code, and Claude Code itself generates and maintains the openwiki/
docs. No OpenWiki model provider or API key is required — Claude Code is the
engine.

Scope

  • In scope: code mode only (repository docs under openwiki/).
  • Out of scope: personal mode and connectors (Gmail/Slack/Notion/X), which
    depend on OpenWiki's credentialed runtime.

Approach

  • The skill bodies are bundled, maintained templates derived from the
    repository-mode instructions in src/agent/prompt.ts, with the tool
    vocabulary remapped to Claude Code natives (Read/Write/Edit/Glob/Grep/Bash),
    connector/CLI/local-wiki text removed, and virtual-root /openwiki/... paths
    converted to real relative openwiki/... paths.
  • This never touches the live agent's prompt path, keeping regression risk off
    the running agent.
  • The subcommand sits alongside auth/cron/ingest/ngrok and is built on a
    small integration registry so other host agents can be added later.

Acceptance criteria

  • openwiki integration claude writes
    .claude/skills/openwiki-init/SKILL.md and .../openwiki-update/SKILL.md
    with valid Claude Code skill frontmatter.
  • openwiki integration claude <path> targets that repository.
  • The command requires no model provider or API key.
  • Skill bodies use Claude-native tools and real relative openwiki/ paths;
    no connector-only text or virtual-root paths.
  • Unknown/missing agent prints a clean error and exits 1.
  • Existing OpenWiki commands are unaffected.
  • Unit tests cover parsing, scaffolding, idempotency, and template content.

Notes / trade-off

The skill templates are a hand-maintained copy of the repository-mode prompt, so
they can drift when prompt.ts changes. A guard test pins the core discipline
sections to make an incomplete re-port fail loudly, but semantic sync remains a
manual, periodic responsibility.

Motivation

Running OpenWiki on a repository today requires configuring an OpenWiki model
provider and API key — OpenWiki's CLI is the LLM host and runs its own agent
loop. That's real friction for a large group of users who already pay for
inference through a capable coding agent (Claude Code Pro/Max/Team) sitting
right in their editor. They don't want a second key or a second bill; they just
want openwiki/ docs generated and kept fresh.

This is the same motivation raised in #156, and the same one #151 addresses
from the OpenAI/ChatGPT-subscription side. OpenWiki's real value is its
methodology and on-disk format (openwiki/quickstart.md, section pages,
.last-update.json, the AGENTS.md/CLAUDE.md pointer block) — not the
specific runtime that produces it. That format can be produced directly by a
host coding agent, keylessly, without going through OpenWiki's LangChain engine
at all.

Proposed Solution

Add a first-class subcommand:

openwiki integration claude [path]

This scaffolds two Claude Code skills — openwiki-init and openwiki-update
— into .claude/skills/ in the target repository (defaulting to the current
directory). The user then runs /openwiki-init / /openwiki-update inside
Claude Code, and Claude Code itself generates and maintains the openwiki/
docs. No OpenWiki model provider or API key is required.

Key design points:

  • Bundled, maintained templates — the skill bodies are derived from the
    repository-mode instructions in src/agent/prompt.ts, with the tool
    vocabulary remapped to Claude Code natives (Read/Write/Edit/Glob/Grep/Bash),
    connector/CLI/local-wiki-only text removed, and virtual-root /openwiki/...
    paths converted to real relative openwiki/... paths.
  • Zero regression risk on the live agent — this never touches prompt.ts
    or the running agent loop; it's a pure export step, gated behind its own
    subcommand.
  • Extensible by construction — it sits alongside auth/cron/ingest/
    ngrok and is built on a small integration registry, so other host agents
    (Cursor, Copilot, etc.) can be added the same way later.
  • Scoped to code mode — repository docs under openwiki/ only; personal
    mode and connectors stay on the credentialed runtime.

Alternatives Considered

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions