openclaw - 💡(How to fix) Fix Add selective installation for plugins, skills, and channels — reduce install size and startup overhead [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#68782Fetched 2026-04-19 15:07:35
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Author
Participants

Code Example

# Interactive selection
openclaw setup
> Select channels to install (space to select, enter to confirm):
>   [ ] WhatsApp
>   [x] Feishu
>   [ ] Telegram
>   [x] QQ
>   [ ] Discord
>   [x] Terminal (required)

# Or declarative
openclaw setup --channels feishu,qq,terminal

---

{
  "plugins": {
    "enabled": true,
    "allow": ["openclaw-feishu", "openclaw-qq"],
    "strictMode": true
  }
}
RAW_BUFFERClick to expand / collapse

User Pain Point

OpenClaw currently uses an all-or-nothing installation strategy: every channel plugin (WhatsApp, Telegram, Discord, WeChat, Feishu, etc.), skill module, and API interface is installed regardless of whether the user needs them.

Specific Impacts

  1. Bloated install size: Unneeded plugins and their dependencies (e.g., WhatsApp @whiskeysockets/baileys and transitive deps) consume significant disk space
  2. Slower startup: Plugin discovery scans all extensions directories, and loading performs jiti compilation for every discovered plugin — even unused ones
  3. Dependency conflicts: More plugins = more dependency trees = higher risk of namespace collisions or version incompatibilities
  4. Log noise: Discovered but unconfigured plugins trigger "loaded without provenance" warnings, making it harder to diagnose real issues
  5. Security surface area: Unneeded plugin code loaded into process memory increases the potential attack surface

Typical Scenario

"I only use QQ and Feishu. Why does the installer put every messaging platform on my machine? And why are all API interfaces pre-configured? It wastes disk space and slows down startup."

Current State in Codebase

  1. Plugin discovery (src/plugins/discovery.ts):

    • Scans extensions/ (bundled), ~/.openclaw/extensions/ (global), ./.openclaw/extensions/ (workspace)
    • No filtering: anything in these directories is discovered and loaded
  2. Optional bundled clusters (scripts/lib/optional-bundled-clusters.mjs):

    • Has a basic optional cluster concept via OPENCLAW_INCLUDE_OPTIONAL_BUNDLED env var
    • But this is a build-time switch, not an install-time or runtime user choice
  3. plugins.deny list (src/plugins/loader.ts):

    • Can deny specific plugins in config, but plugins are still installed and discovered
    • This is "exclude after the fact" rather than "select beforehand"
  4. Postinstall script (scripts/postinstall-bundled-plugins.mjs):

    • Installs dependencies for ALL bundled plugins
    • Has no logic to skip specific plugins based on user preference

Proposed Approach

Phase 1: Install-time Selection

# Interactive selection
openclaw setup
> Select channels to install (space to select, enter to confirm):
>   [ ] WhatsApp
>   [x] Feishu
>   [ ] Telegram
>   [x] QQ
>   [ ] Discord
>   [x] Terminal (required)

# Or declarative
openclaw setup --channels feishu,qq,terminal

Phase 2: Config-driven On-demand Loading

{
  "plugins": {
    "enabled": true,
    "allow": ["openclaw-feishu", "openclaw-qq"],
    "strictMode": true
  }
}

When strictMode: true:

  • Only load plugins declared in plugins.allow
  • Skip auto-scanning of ~/.openclaw/extensions/
  • Skip dependency installation for undeclared plugins

Phase 3: Lazy Registration of Skills and APIs

  • Skills (skills/) become lazy-loaded: registered on first use only
  • APIs registered per-channel: only register APIs for enabled channels
  • Add openclaw plugins status to show installed / enabled / loaded state

Expected Benefits

MetricFull InstallSelective (Feishu + QQ)
Install size~100MB+~30MB (estimated)
Plugins loaded10+3
jiti compilations at startup5+1-2
Dependency tree complexityHighLow
Log warningsMany (unused plugins)Few

Related Files

  • scripts/postinstall-bundled-plugins.mjs
  • scripts/lib/optional-bundled-clusters.mjs
  • src/plugins/discovery.ts
  • src/plugins/loader.ts
  • src/plugins/roots.ts
  • src/config/types.plugins.ts

extent analysis

TL;DR

Implement install-time selection and config-driven on-demand loading to reduce the installation size and improve startup performance.

Guidance

  • Introduce an interactive or declarative selection process during setup to allow users to choose which channels to install, reducing unnecessary dependencies and plugins.
  • Modify the postinstall-bundled-plugins.mjs script to install dependencies only for selected plugins.
  • Update the discovery.ts file to load plugins based on the user's configuration, rather than loading all discovered plugins.
  • Implement a strictMode in the configuration to skip auto-scanning of unused plugins and reduce log noise.

Example

{
  "plugins": {
    "enabled": true,
    "allow": ["openclaw-feishu", "openclaw-qq"],
    "strictMode": true
  }
}

This configuration example demonstrates how to enable only specific plugins (Feishu and QQ) and activate strict mode to prevent loading unused plugins.

Notes

The proposed approach involves significant changes to the installation and loading process. It is essential to thoroughly test these changes to ensure they do not introduce new issues or regressions.

Recommendation

Apply the proposed approach in phases, starting with install-time selection and config-driven on-demand loading, to reduce the installation size and improve startup performance. This approach allows users to choose which channels to install, reducing unnecessary dependencies and plugins, and improves the overall efficiency of the system.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Add selective installation for plugins, skills, and channels — reduce install size and startup overhead [1 participants]