Skip to content

fix(plugin): isolate Claude Code package#350

Merged
lizhengfeng101 merged 2 commits into
alibaba:mainfrom
makoMakoGo:selfhost/admin-ui-redesign
Jul 12, 2026
Merged

fix(plugin): isolate Claude Code package#350
lizhengfeng101 merged 2 commits into
alibaba:mainfrom
makoMakoGo:selfhost/admin-ui-redesign

Conversation

@makoMakoGo

@makoMakoGo makoMakoGo commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Description

Problem

The Claude Code marketplace entry currently uses plugins/open-code-review as the plugin root:

"source": "./plugins/open-code-review"

That directory is a shared bundle for several agent integrations. Alongside the Claude manifest and command, it contains the Codex manifest, Cursor manifest, shared skills, and Codex documentation:

plugins/open-code-review/
├── .claude-plugin/
├── commands/
├── .codex-plugin/
├── .cursor-plugin/
├── skills/
└── CODEX.ko-KR.md

Claude Code copies the complete marketplace source directory into its versioned plugin cache. As a result, installing the Claude plugin also caches files that belong only to the Codex and Cursor integrations. The command still works, but the installed package boundary is broader than the Claude plugin itself.

Design

Move the unchanged Claude manifest and command into a dedicated plugin root:

plugins/open-code-review/claude-code/
├── .claude-plugin/
│   └── plugin.json
└── commands/
    └── review.md

Then point the marketplace entry at that narrower directory:

"source": "./plugins/open-code-review/claude-code"

The manifest and command are pure renames, and the canonical /open-code-review:review command remains unchanged. Narrowing the root also intentionally stops Claude Code from auto-discovering skills/open-code-review/SKILL.md, which identifies itself as a Codex plugin skill and remains available to the Codex and Cursor integrations. Direct-command links in the READMEs and documentation site are updated to the canonical new path.

Why this layout

Claude Code documents plugins as self-contained directories. The individual plugin root contains .claude-plugin/plugin.json, while functional components such as commands/, skills/, agents/, and hooks/ live alongside .claude-plugin/ at that root. See Plugin structure overview.

Marketplace-installed plugins are copied into a versioned cache as a directory, and files outside that directory are not available after installation. See Plugin caching and file resolution. Therefore, the marketplace source path is also the package boundary: it should identify the Claude-only self-contained directory rather than the surrounding cross-agent integration bundle.

Keeping the manifest and command together under claude-code/ preserves the normal self-contained plugin model while leaving Codex and Cursor assets outside the Claude cache. It also avoids using strict: false, which would move the plugin definition into the marketplace catalog instead of keeping the plugin self-describing.

Scope and non-goals

This PR intentionally changes only the installed Claude plugin boundary:

  • no OCR runtime or review-command behavior changes;
  • no Codex or Cursor integration changes;
  • no plugin or marketplace version changes;
  • no change to how the marketplace repository itself is acquired;
  • no switch to git-subdir, because the existing relative source already resolves from the local marketplace checkout and the problem here is the copied plugin root, not marketplace transport.

Installed cache contents

Before this change, the Claude cache includes the entire shared integration directory. After this change, an isolated installation contains exactly:

.claude-plugin/plugin.json
commands/review.md

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactoring (no functional changes)
  • Documentation update
  • CI / Build / Tooling

How Has This Been Tested?

  • make test passes locally
  • Manual testing (describe below)

Tested with Claude Code 2.1.198:

  • claude plugin validate plugins/open-code-review/claude-code — validation passed, with only the existing missing-author metadata warning;
  • claude plugin validate .claude-plugin/marketplace.json — validation passed with the same warning;
  • added the local marketplace and installed open-code-review@open-code-review using an isolated HOME;
  • verified the installed versioned cache contains only .claude-plugin/plugin.json and commands/review.md;
  • verified no documentation references remain for the previous command path.

make test was not run because this change does not modify Go or runtime code.

Checklist

  • My code follows the project's coding style (go fmt, go vet)
  • I have performed a self-review of my code
  • I have added tests that prove my fix is effective or my feature works
  • New and existing unit tests pass locally with my changes
  • I have updated the documentation accordingly (if applicable)
  • I have signed the CLA

Related Issues

None.

@CLAassistant

CLAassistant commented Jul 10, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

🔍 OpenCodeReview found 14 issue(s) in this PR.

  • ✅ Successfully posted inline: 14 comment(s)

⚠️ 8 warning(s) occurred during review.


⚠️ Warnings:

  • github-app-bot/src/admin/runtime.js (subtask_error): LLM completion error: context deadline exceeded
  • github-app-bot/src/admin/security.js (subtask_error): LLM completion error: context deadline exceeded
  • github-app-bot/src/admin/templates.js (subtask_error): LLM completion error: context deadline exceeded
  • github-app-bot/src/config.js (subtask_error): LLM completion error: context deadline exceeded
  • github-app-bot/src/jobs/event-store.js (subtask_error): LLM completion error: context deadline exceeded
  • github-app-bot/src/jobs/index.js (subtask_error): LLM completion error: context deadline exceeded
  • github-app-bot/src/jobs/logger.js (subtask_error): LLM completion error: context deadline exceeded
  • github-app-bot/src/jobs/model.js (subtask_error): LLM completion error: context deadline exceeded

Comment thread .github/workflows/github-app-bot-tests.yml Outdated
Comment thread .github/workflows/github-app-bot-tests.yml Outdated
Comment thread github-app-bot/Dockerfile Outdated
Comment thread github-app-bot/Dockerfile Outdated
Comment thread .github/workflows/github-app-bot-image.yml Outdated
Comment thread github-app-bot/src/admin/auth.js Outdated
Comment thread github-app-bot/src/admin/session.js Outdated
Comment thread github-app-bot/src/admin/session.js Outdated
Comment thread github-app-bot/src/admin/session.js Outdated
Comment thread github-app-bot/src/admin/hostguard.js Outdated
@makoMakoGo makoMakoGo marked this pull request as ready for review July 10, 2026 05:22
@makoMakoGo makoMakoGo closed this Jul 10, 2026
@makoMakoGo

makoMakoGo commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

sorry, grok-4.5 是个傻逼,在我给 自己的 fork 开好 pr 的时候 还能开到这里,太变态了。

我把这个pr 改成了一个真正有效的 小 pr

@makoMakoGo makoMakoGo changed the title feat(bot): redesign admin console toward GitHub Primer fix(plugin): isolate Claude Code package Jul 10, 2026
@makoMakoGo makoMakoGo reopened this Jul 10, 2026
@makoMakoGo makoMakoGo force-pushed the selfhost/admin-ui-redesign branch from 8fb6a60 to 33f3be8 Compare July 10, 2026 07:24
@lizhengfeng101

Copy link
Copy Markdown
Collaborator

Thanks for the contribution! The PR is clean and well-scoped — great job on the detailed description and thorough testing.

One minor suggestion: in the integration docs (pages/src/content/docs/{en,ja,zh}/integrations/claude-code.md), the descriptive text still references the old directory. For example, in the English version (lines 14–15):

The repo ships a Claude Code plugin under plugins/open-code-review/

Now that the Claude Code plugin lives at plugins/open-code-review/claude-code/, it would be worth updating these lines (and the corresponding ja/zh versions) to point to the new path, so readers are directed to the precise plugin root rather than the broader integration bundle.

@makoMakoGo

makoMakoGo commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

Oh ... I forget them . I have updated the en/ja/zh integration guides to link the precise plugins/open-code-review/claude-code/ plugin root in 9baf572. The command links were already on the new path; the surrounding descriptive links now match it as well.

@lizhengfeng101 lizhengfeng101 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@lizhengfeng101 lizhengfeng101 merged commit 22782aa into alibaba:main Jul 12, 2026
2 checks passed
@makoMakoGo makoMakoGo deleted the selfhost/admin-ui-redesign branch July 12, 2026 08:40
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.

3 participants