Skip to content

feat: add openwiki integration claude to scaffold Claude Code skills for keyless docs#350

Open
Kowshik Padala (Kowshik4593) wants to merge 5 commits into
langchain-ai:mainfrom
Kowshik4593:main
Open

feat: add openwiki integration claude to scaffold Claude Code skills for keyless docs#350
Kowshik Padala (Kowshik4593) wants to merge 5 commits into
langchain-ai:mainfrom
Kowshik4593:main

Conversation

@Kowshik4593

Copy link
Copy Markdown

Summary

Adds openwiki integration claude [path] — a CLI subcommand that scaffolds two
Claude Code skills (openwiki-init, openwiki-update) into a target repository,
so Claude Code itself generates and maintains the openwiki/ documentation
without requiring a model provider or API key.

The skill bodies are bundled templates ported from the repository-mode
instructions in src/agent/prompt.ts, with tool vocabulary remapped to Claude
Code natives (Read/Write/Edit/Glob/Grep/Bash) and connector/CLI text removed.

Test plan

  • Unit tests: test/integrations-claude.test.ts (6 tests: scaffolding,
    frontmatter validity, tool names, path checks, idempotency, error handling)
  • Command parsing: extended test/commands.test.ts (5 new tests for
    integration parsing, paths, unknown agents, flags)
  • Full suite: 272 tests pass; format:check, lint:check, typecheck clean
  • Manual E2E: scaffolds both skills to default cwd and explicit path;
    exits 0 on success, 1 on error; no API key needed
  • Drift guard: added assertions that both skill bodies retain all core
    discipline sections, so an incomplete future re-port from prompt.ts fails loudly

Design notes

  • Zero regression risk: new code is gated behind kind === "integration" in
    dispatch; src/agent/prompt.ts and the running agent are untouched.
  • Extensible: integration registry in src/integrations/index.ts allows
    adding other host agents (Cursor, Copilot, etc.) later.
  • Scope: code mode only (openwiki/ repository docs); personal mode and
    connectors remain on the credentialed runtime.
  • Template drift: skill templates are a hand-maintained copy of
    prompt.ts's repository-mode instructions. The drift guard test pins core
    sections to catch incomplete re-ports; periodic sync remains a manual responsibility.

Closes #349

- Introduced `openwiki integration claude` command to scaffold Claude Code skills into target repositories.
- Implemented `writeClaudeIntegration` function to create `openwiki-init` and `openwiki-update` skills with appropriate templates.
- Updated CLI command parsing to handle integration commands and validate agent support.
- Added tests for integration command parsing and skill file generation.
- Created templates for `openwiki-init` and `openwiki-update` skills with detailed instructions for usage.
- Enhanced README with integration usage instructions and examples.

@corridor-security corridor-security Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The integration scaffolder (openwiki integration claude [path]) follows symlinks when writing SKILL.md files into a user-supplied target directory, enabling a symlink-based arbitrary file overwrite if a malicious repository has pre-placed a symlink at the expected destination path.

Comment thread src/integrations/claude.ts
@Kowshik4593

Kowshik Padala (Kowshik4593) commented Jul 15, 2026

Copy link
Copy Markdown
Author

Colin Francis (@colifran) — could you review this PR? It implements a native openwiki integration claude [path] subcommand that scaffolds two Claude Code skills, so users can generate and maintain openwiki/ docs directly from Claude Code without an OpenWiki API key.

Key points:

The skill bodies are bundled templates derived from src/agent/prompt.ts's repository-mode instructions, with tool vocabulary remapped to Claude Code natives (Read/Write/Edit/Glob/Grep/Bash).
Zero regression risk: the live agent and prompt are untouched; this is a pure CLI export step gated behind its own subcommand.
The skills write the exact same openwiki/quickstart.md, section pages, and .last-update.json format as the CLI, so the two are interchangeable on one repo.
Scope: code mode only (repository docs). Personal mode and connectors stay on the credentialed runtime.

@Kowshik4593

Copy link
Copy Markdown
Author

Colin Francis (Colin Francis (@colifran)) — could you review this PR? It implements a native openwiki integration claude [path] subcommand that scaffolds two Claude Code skills, so users can generate and maintain openwiki/ docs directly from Claude Code without an OpenWiki API key.

Key points:

The skill bodies are bundled templates derived from src/agent/prompt.ts's repository-mode instructions, with tool vocabulary remapped to Claude Code natives (Read/Write/Edit/Glob/Grep/Bash). Zero regression risk: the live agent and prompt are untouched; this is a pure CLI export step gated behind its own subcommand. The skills write the exact same openwiki/quickstart.md, section pages, and .last-update.json format as the CLI, so the two are interchangeable on one repo. Scope: code mode only (repository docs). Personal mode and connectors stay on the credentialed runtime.

just for understanding, this is in the same lines of speckit skills.

@Kowshik4593

Copy link
Copy Markdown
Author

Colin Francis (@colifran) any comments?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

3 participants