Implementation:Openclaw Openclaw PluginsConfig SkillsConfig Types
PluginsConfig and SkillsConfig Types
PluginsConfig and SkillsConfig are the top-level TypeScript configuration types that govern the two extension systems in OpenClaw. PluginsConfig controls plugin loading, allowlisting, denylisting, per-plugin entries, install tracking, slot assignments, and additional load paths. SkillsConfig controls bundled skill allowlisting, extra scan directories, watcher behavior, install preferences, and per-skill entries.
Principle:Openclaw_Openclaw_Extension_Type_Identification
Source Location
| Type | File | Lines |
|---|---|---|
PluginsConfig |
src/config/types.plugins.ts |
1-37 |
SkillsConfig |
src/config/types.skills.ts |
1-32 |
Repository: github.com/openclaw/openclaw
PluginsConfig
Type Definition
export type PluginEntryConfig = {
enabled?: boolean;
config?: Record<string, unknown>;
};
export type PluginSlotsConfig = {
/** Select which plugin owns the memory slot ("none" disables memory plugins). */
memory?: string;
};
export type PluginsLoadConfig = {
/** Additional plugin/extension paths to load. */
paths?: string[];
};
export type PluginInstallRecord = {
source: "npm" | "archive" | "path";
spec?: string;
sourcePath?: string;
installPath?: string;
version?: string;
installedAt?: string;
};
export type PluginsConfig = {
/** Enable or disable plugin loading. */
enabled?: boolean;
/** Optional plugin allowlist (plugin ids). */
allow?: string[];
/** Optional plugin denylist (plugin ids). */
deny?: string[];
load?: PluginsLoadConfig;
slots?: PluginSlotsConfig;
entries?: Record<string, PluginEntryConfig>;
installs?: Record<string, PluginInstallRecord>;
};
Field Reference
| Field | Type | Description |
|---|---|---|
enabled |
boolean? |
Master switch. When false, no plugins are loaded at all.
|
allow |
string[]? |
If present, only plugins whose id appears in this list are eligible for loading. |
deny |
string[]? |
Plugins whose id appears in this list are unconditionally blocked. |
load.paths |
string[]? |
Additional filesystem paths to scan for plugin directories or files. |
slots.memory |
string? |
Id of the plugin that owns the memory slot. Set to "none" to disable all memory plugins.
|
entries |
Record<string, PluginEntryConfig>? |
Per-plugin configuration keyed by plugin id. Each entry can enable/disable the plugin and provide arbitrary config values. |
installs |
Record<string, PluginInstallRecord>? |
Tracks how each plugin was installed (source type, spec, path, version, timestamp). |
PluginInstallRecord
The PluginInstallRecord type captures provenance for installed plugins:
| Field | Type | Description |
|---|---|---|
source |
"archive" | "path" | How the plugin was installed. |
spec |
string? |
The npm spec or archive path used during install. |
sourcePath |
string? |
Original source path for path-based installs. |
installPath |
string? |
Resolved installation directory. |
version |
string? |
Plugin version at install time. |
installedAt |
string? |
ISO timestamp of when the install occurred. |
SkillsConfig
Type Definition
export type SkillConfig = {
enabled?: boolean;
apiKey?: string;
env?: Record<string, string>;
config?: Record<string, unknown>;
};
export type SkillsLoadConfig = {
/**
* Additional skill folders to scan (lowest precedence).
* Each directory should contain skill subfolders with SKILL.md.
*/
extraDirs?: string[];
/** Watch skill folders for changes and refresh the skills snapshot. */
watch?: boolean;
/** Debounce for the skills watcher (ms). */
watchDebounceMs?: number;
};
export type SkillsInstallConfig = {
preferBrew?: boolean;
nodeManager?: "npm" | "pnpm" | "yarn" | "bun";
};
export type SkillsConfig = {
/** Optional bundled-skill allowlist (only affects bundled skills). */
allowBundled?: string[];
load?: SkillsLoadConfig;
install?: SkillsInstallConfig;
entries?: Record<string, SkillConfig>;
};
Field Reference
| Field | Type | Description |
|---|---|---|
allowBundled |
string[]? |
When set, only bundled skills whose name or key appears in this list are loaded. Non-bundled skills are unaffected. |
load.extraDirs |
string[]? |
Additional directories to scan for skill folders. These have the lowest precedence in the merge order. |
load.watch |
boolean? |
When true, the system watches skill directories for changes and refreshes the snapshot.
|
load.watchDebounceMs |
number? |
Debounce interval in milliseconds for the watcher. |
install.preferBrew |
boolean? |
Prefer Homebrew for installing skill dependencies on macOS. |
install.nodeManager |
"pnpm" | "yarn" | "bun" | Preferred Node.js package manager for skill dependency installation. |
entries |
Record<string, SkillConfig>? |
Per-skill configuration keyed by skill name or skill key. |
SkillConfig (per-skill entry)
| Field | Type | Description |
|---|---|---|
enabled |
boolean? |
Explicitly enable or disable this skill. |
apiKey |
string? |
API key for skills that require authentication. Satisfies the primaryEnv requirement.
|
env |
Record<string, string>? |
Environment variable overrides for eligibility checks. |
config |
Record<string, unknown>? |
Arbitrary configuration values passed to the skill. |
Design Rationale
The configuration types are deliberately kept as flat, optional-field records:
- All fields are optional. Unconfigured extensions use sensible defaults (enabled, no filtering).
- Allow and deny lists are complementary. The deny list takes priority: a plugin on the deny list is blocked even if it appears on the allow list.
- Per-entry config is generic. Both
PluginEntryConfig.configandSkillConfig.configuseRecord<string, unknown>so that individual extensions can define their own schema without changing the core types. - Install records are separate from enable state. The
installsmap tracks provenance; theentriesmap tracks runtime configuration. A plugin can be installed but disabled.
Usage Context
These types flow into the rest of the extension system:
PluginsConfigis consumed bynormalizePluginsConfig()insrc/plugins/config-state.tsand drives the plugin discovery, loading, and enable/disable logic insrc/plugins/loader.ts.SkillsConfigis consumed byloadSkillEntries()insrc/agents/skills/workspace.tsand drives skill directory scanning, frontmatter parsing, and eligibility filtering.