Skip to content

feat: Claude Code plugin marketplace entry — /plugin install billion-context@billion-context - #2312

Merged
ranxianglei merged 2 commits into
masterfrom
2026-10-07_claude-plugin-marketplace
Oct 7, 2026
Merged

ranxianglei merged 2 commits into
masterfrom
2026-10-07_claude-plugin-marketplace

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

What

This repo now doubles as a Claude Code plugin marketplace, so claude users get the one-command install path every other host family already has:

/plugin marketplace add ranxianglei/billion-context
/plugin install billion-context@billion-context
/billion-context:bili-setup        ← runs once, then restart claude

Files

  • .claude-plugin/marketplace.json + .claude-plugin/plugin.json — repo-root marketplace listing itself as a plugin (source: "./").
  • commands/bili-setup.md — the single slash command: checks bili --version, npm install -g billion-context if missing, runs bili plugin install claude, reports the installer output verbatim, tells the user to restart. Frontmatter allowed-tools restricts it to those three commands.
  • README (EN + zh) — marketplace path added to the Option 1 "client's own plugin channel" list.

Design decision: installer-first, no self-hosted hooks

The plugin deliberately ships no hooks/ and no .mcp.json. The real lane install (bili plugin install claude) writes the managed settings block + SessionStart hook + MCP registration — it stays the single source of truth. If the plugin carried its own SessionStart hook we'd get two hooks racing to spawn two proxies, and a plugin-scope MCP entry would collide with the user-scope one the installer registers. The plugin is just the installer + onboarding; always-on cost measured by claude plugin details: ~25 tok.

Verification (real claude 2.1.247, sandbox config dir)

Step Result
claude plugin marketplace add <repo> ✔ marketplace added
claude plugin install billion-context@billion-context ✔ user scope, v0.1.186, enabled
claude plugin details billion-context ✔ component inventory: 1 skill, 0 hooks/MCP, ~25 tok always-on
headless /billion-context:bili-setup with a live model endpoint ✔ claude ran bili --version → bili plugin install claude → reported verbatim → exit 0; sandbox settings.json got the full managed block (ANTHROPIC_BASE_URL pinned, DISABLE_AUTO_COMPACT=1, SessionStart hook, /acp-cache, MCP pin)

Notes

  • version in the manifests is informational (Claude marketplaces don't enforce sync) — matches package.json 0.1.186 today.
  • The plugin name is billion-context (unified name across all platforms — same decision as the opencode ecosystem entry #53678).
  • Complements the opencode directory PR; marketplace has no central review — once this lands, users can /plugin marketplace add ranxianglei/billion-context immediately.

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-07_claude-plugin-marketplace (6a6b974)

Option A — Install this exact build (recommended)

npm install -g billion-context@0.0.2456-pr.2312.d6ab279

This exact version is immutable and reproducible. The rolling pr tag tracks the newest test build across all PRs.

Option B — Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr2312.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 Review in progress — preliminary status:

PR diff itself: clean. 5 files, +53/-0, all related to the marketplace entry. Verified the installer-behavior claims in commands/bili-setup.md against src/plugin-install.ts (foreign ANTHROPIC_BASE_URL never overwritten — reported at :552; DISABLE_AUTO_COMPACT set/skipped at :554-561; /acp-cache + MCP registration) — accurate.

CI is red, but NOT because of this PR: the only failed check (unused-exports) flags src/launcher.ts: codexRewriteInsertionIndex — code this PR never touches. Root cause traced: #2282 added that export while the gate didn't exist on master; #1443 landed the unused-export gate the same night (its own merge commit shows unused-exports | failure and still merged). Master has been red on this gate since — every PR based on current master fails it. I'll file a separate issue for that with the trace.

Two small flaws found in the PR diff itself, fixing directly on the branch (labeled commits):

  1. Both manifests say "license": "Apache-2.0" — the repo is MIT (LICENSE + package.json).
  2. README EN+ZH now list claude in the "client's own plugin channel" list AND in the very next sentence ("For pi / omp / kimi / claude there is no client-side channel") — direct contradiction; dropping claude from the latter.

Full structured conclusion follows shortly.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 Review complete. Two small flaws fixed directly on the branch (labeled commits); the red CI check is a pre-existing master problem, now tracked as #2314.

Pushed to this branch (on top of e6f4436):

  • 6b6a947 fix: correct plugin license field — repo is MIT, not Apache-2.0 (both .claude-plugin/*.json)
  • 7d3a0e2 docs: drop claude from the "no client-side channel" sentence (EN+ZH) — the new bullet adds claude to the "own plugin channel" list while the very next sentence still said "For pi / omp / kimi / claude there is no client-side channel"; the managed-settings-block detail survives in the Notes bullet about claude's native posture ([native] claude: three-mode alignment (proxy / launcher / native plugin) + runtime-info #964)

Structured review (七问):

  1. 是什么问题:feature — give claude users the one-command install path every other host family has (repo doubles as a Claude Code plugin marketplace). The diff itself carried two small defects: license field claiming Apache-2.0 on an MIT repo, and a self-contradicting README sentence.
  2. 什么原因导致的:drafting artifacts — license copied from a template default instead of checked against LICENSE; the new bullet landed without updating the adjacent pre-existing enumeration. The red CI check is unrelated: a cross-PR collision on master — fix(launcher): exec-resume 尾部 -c 吞掉用户 -c model + 真codex persona e2e×2通道(URL/launcher) #2282 added orphaned export function codexRewriteInsertionIndex (src/launcher.ts:1020) while the unused-export gate didn't exist yet; refactor: drop dead declarations + demote internal-only exports + unused-export gate (#1440) #1443 landed that same night (its own merge commit shows unused-exports | failure and merged anyway). Full trace in CI: unused-exports gate red on master since #1443 — blocks every PR (orphaned export from #2282) #2314.
  3. 怎么修复的:license corrected to MIT in both manifests; claude removed from the "no channel" sentence in both READMEs so the docs state one consistent fact. Master-gate fix (drop the leading export at src/launcher.ts:1020 — verified zero importers) stays in CI: unused-exports gate red on master since #1443 — blocks every PR (orphaned export from #2282) #2314, deliberately out of this PR's scope.
  4. 是否有回归问题:none — no code touched, manifests+READMEs only. Before endorsing, I verified the installer-behavior claims in commands/bili-setup.md against src/plugin-install.ts: foreign ANTHROPIC_BASE_URL never overwritten (reported, :552), DISABLE_AUTO_COMPACT set/skipped (:554-561), /acp-cache command file (:476), MCP registration (~/.claude.json, :446) — all accurate. Design (installer-first, plugin ships no hooks/.mcp.json) aligns with the Install-Lane & Update-Ownership Contract (dsh plugin-market installs never auto-update: the refresh chain's only trigger is a global bili self-update #1196/native模式下自动更新问题需要解决 #991 single-writer) and avoids exactly the double-hook/double-MCP race described in the PR body.
  5. 是否破坏缓存:不涉及 — no code path touched; prefix-cache/session-state behavior unchanged.
  6. 是否改了设计方向:no — extends the existing direction (every host family gets its own-channel install) to claude; the installer remains single source of truth.
  7. 是否引入了新的配置:no new bili config/env/CLI surface. Manifest fields are informational; version: 0.1.186 will drift after v0.1.187 ships (release v0.1.187 #2305 pending) — acknowledged as non-enforced in the PR body, fine, but worth a release-checklist line someday.

CI on new head (7d3a0e2): 22/23 green — all test matrix (ubuntu+windows × node 22/24), all real-client e2e lanes, registry e2e, guards. Sole failure = unused-exports, the pre-existing master-red gate from #2314; it provably does not involve this diff (docs-only).

判定:PR 实质就绪。建议先落 #2314 的一行 master 修复再合并(或你选择覆盖这个已知红 check —— 失败与本 diff 无关,证据在 #2314)。I can't merge PRs — please merge yourself: #2312

@ranxianglei
ranxianglei force-pushed the 2026-10-07_claude-plugin-marketplace branch 4 times, most recently from 22c19e0 to 3468d5a Compare October 7, 2026 07:43
…context@billion-context

- .claude-plugin/marketplace.json + plugin.json: this repo doubles as a
  Claude Code marketplace (add ranxianglei/billion-context)
- commands/bili-setup.md: one slash command drives 'bili plugin install
  claude' (checks the CLI, installs bili if missing, reports, tells the
  user to restart); the plugin itself ships no hooks/MCP entries — the
  native installer stays the single source of truth, so nothing
  double-registers
- README (EN/zh): marketplace install path under Option 1 native channels

Verified locally with the real claude binary (2.1.247): marketplace add
(repo path) -> install (user scope, v0.1.186) -> /billion-context:bili-setup
headless run with a live model endpoint — claude executed the installer,
the managed settings block + /acp-cache + MCP pin landed in the sandbox
config, always-on cost ~25 tok.
@ranxianglei
ranxianglei force-pushed the 2026-10-07_claude-plugin-marketplace branch from 3468d5a to 95b1c71 Compare October 7, 2026 07:43
@ranxianglei
ranxianglei merged commit 86191d6 into master Oct 7, 2026
23 checks passed
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.97-master.86191d6 (rolling master tag).

npm install -g billion-context@0.0.97-master.86191d6  # this exact build
npm install -g billion-context@master  # always the newest merged build

npm view billion-context@master prints the current version at any time.

@ranxianglei
ranxianglei deleted the 2026-10-07_claude-plugin-marketplace branch October 15, 2026 05:32
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.

1 participant