Summary
Remove the entire OpenClaw skills system and ClawHub integration. RemoteClaw uses a Bring Your Own Agent model — users provide skills via their chosen CLI agent's native skill system (e.g., ~/.claude/, Gemini skills, etc.). The bundled skills system, skill installation pipeline, ClawHub registry, and all supporting infrastructure are dead code.
Context
The skills system is deeply integrated across the codebase: ~73 bundled skill files, ~16 skill engine files, ~30+ skill-related implementation files outside the main directories, and ~25 KEEP/MODIFY files with skill imports that need cleanup. This is one of the largest gutting operations in M3.
Why now: All M2 dispatch wiring is complete. The 4 dispatch sites (auto-reply, cron, CLI command, voice-call) now route through ChannelBridge → CLI runtime. The old pi-embedded execution path that consumed skills is bypassed. Skills are never loaded, never executed, never served — they're dead weight.
What to Remove
Phase 1: Delete skill directories (bulk removal)
Delete skills/ directory (~73 files, ~54 subdirectories):
All bundled skill implementations (1password, apple-notes, bear-notes, canvas, clawhub, discord, gemini, github, himalaya, imsg, model-usage, notion, obsidian, openai-image-gen, openai-whisper, etc.).
Delete src/agents/skills/ directory (~16 files):
The skill engine — workspace loading, bundled-dir resolution, config, env-overrides, filtering, frontmatter parsing, plugin-skills, refresh/watch, serialization, tools-dir, types.
rm -rf src/agents/skills/
Phase 2: Delete skill implementation files outside core directories
These files exist under src/ but are entirely skill-specific:
Root-level skill files in src/agents/ (delete entirely):
src/agents/skills.ts — re-export hub for skills API
src/agents/skills-install.ts — skill installation orchestration
src/agents/skills-install-download.ts — downloads skills from registries
src/agents/skills-install-output.ts — formats install output
src/agents/skills-install-download-test-utils.ts
src/agents/skills-install-fallback.test.ts
src/agents/skills-install.test.ts
src/agents/skills-install.test-mocks.ts
src/agents/skills-status.ts — skill workspace status reporting
src/agents/skills-status.test.ts
src/agents/skills.test-helpers.ts
src/agents/skills.e2e-test-helpers.ts
- All
src/agents/skills.*.test.ts files
CLI skills commands (delete entirely):
src/cli/skills-cli.ts — skill status CLI command handler
src/cli/skills-cli.format.ts — output formatting + ClawHub hints
src/cli/skills-cli.formatting.test.ts
src/cli/skills-cli.test.ts
Skill onboarding (delete entirely):
src/commands/onboard-skills.ts
src/commands/onboard-skills.test.ts
src/commands/onboard-non-interactive/local/skills-config.ts
Gateway skills API (delete entirely):
src/gateway/server-methods/skills.ts — entire API handler
src/gateway/server-methods/skills.update.normalizes-api-key.test.ts
src/gateway/server.skills-status.e2e.test.ts
Security scanner (delete entirely):
src/security/skill-scanner.ts
src/security/skill-scanner.test.ts
Cron skills snapshot (delete entirely):
src/cron/isolated-agent/skills-snapshot.ts
src/cron/isolated-agent/run.skill-filter.test.ts
Infrastructure (delete entirely):
src/infra/skills-remote.ts
Config types (delete entirely):
src/config/types.skills.ts
src/config/config.skills-entries-config.test.ts
Discord skills deduplication (delete entirely):
src/discord/monitor/provider.skill-dedupe.test.ts
Sandbox skills (delete entirely):
src/agents/sandbox-skills.test.ts
Phase 3: Clean up KEEP/MODIFY files (import removal)
These files survive but need skill-related imports, types, and function calls removed:
CLI registration (remove skills subcommand entry):
src/cli/program/register.subclis.ts — remove the skills entry from subcommand registration
Auto-reply system (remove skill type imports and function calls):
src/auto-reply/commands-registry.ts — remove SkillCommandSpec type import
src/auto-reply/reply/commands-system-prompt.ts — remove buildWorkspaceSkillSnapshot, getSkillsSnapshotVersion imports and calls
src/auto-reply/reply/commands-types.ts — remove SkillCommandSpec type import
src/auto-reply/reply/get-reply-directives.ts — remove SkillCommandSpec type import
src/auto-reply/reply/get-reply-inline-actions.ts — remove SkillCommandSpec type import
src/auto-reply/reply/queue/types.ts — remove SkillSnapshot type from queue payload
src/auto-reply/reply/session-updates.ts — remove skill snapshot injection
src/auto-reply/skill-commands.ts — remove or gut (builds command specs from skills)
src/auto-reply/status.ts — remove SkillCommandSpec type import
Commands (remove skill references):
src/commands/agent.ts — remove skill snapshot building import/call
src/commands/docs.ts — remove hasBinary import (if only used for skills)
src/commands/doctor-workspace-status.ts — remove skill status from diagnostics
src/commands/status-all.ts — remove skill status from overall status
Gateway (remove skill listener):
src/gateway/server.impl.ts — remove skills change listener registration
Hooks (check hasBinary usage):
src/hooks/gmail-setup-utils.ts — uses hasBinary imported from skills; may need to inline or relocate the utility
src/hooks/gmail-watcher.ts — same hasBinary dependency
Security (remove skill audit):
src/security/audit-extra.async.ts — remove workspace skills audit call
System prompt (remove ClawHub reference):
⚠️ DO NOT DELETE: src/gateway/protocol/schema/agents-models-skills.ts — disposition is KEEP (generic schema, no brand refs).
Phase 4: Verify clean build
Must pass with zero errors. Run a grep verification:
# Should return zero results in src/
grep -r "clawhub\|ClawHub" src/ 2>/dev/null
grep -r "from.*skills" src/ --include="*.ts" | grep -v node_modules | grep -v ".test." | grep -v "// "
Note on ClawHub in docs: ClawHub references exist in root markdown files (README.md, CONTRIBUTING.md, VISION.md, SECURITY.md, docs/help/faq.md). These are deferred to M4 rebrand — they don't affect build and are part of the broader namespace transition.
Key Decision: hasBinary utility
The hasBinary() function (checks if a binary exists on PATH) lives in the skills module but is used by src/hooks/gmail-setup-utils.ts and src/hooks/gmail-watcher.ts for non-skill purposes. Options:
- Inline it — it's likely a simple
which/command -v wrapper, 3-5 lines
- Relocate to
src/infra/ — if used by multiple files
Choose the simpler option. Do NOT create a new module for a 3-line utility if it's only used in 2 places.
Estimated Scale
| Category |
Files |
skills/ directory (delete) |
~73 |
src/agents/skills/ directory (delete) |
~16 |
Skill implementation files across src/ (delete) |
~30 |
| KEEP/MODIFY files (import cleanup) |
~25 |
| Total files touched |
~144 |
Acceptance Criteria
Given all dispatch wiring is complete (WI-032 through WI-035) and the Bring Your Own Agent model means users provide skills via ~/.<agent>/
When the skills system and ClawHub are removed
Then skills/ directory (~73 files) is deleted
And src/agents/skills/ directory (~16 files) is deleted
And root-level skills files in src/agents/ are deleted (skills.ts, skills-install.ts, skills-install-download.ts, skills-install-output.ts, skills-status.ts + associated tests)
And skills CLI files are deleted (src/cli/skills-cli.ts, skills-cli.format.ts + tests)
And skills gateway handler is deleted (src/gateway/server-methods/skills.ts + tests)
And skills cron snapshot is deleted (src/cron/isolated-agent/skills-snapshot.ts + test)
And skills config type is deleted (src/config/types.skills.ts + test)
And skills onboarding command is deleted (src/commands/onboard-skills.ts + test)
And skills infrastructure file is deleted (src/infra/skills-remote.ts)
And skills entry is removed from src/cli/program/register.subclis.ts
And all skill-related imports in remaining KEEP/MODIFY files are removed or stubbed
And ClawHub references in source files are removed (system-prompt.ts, discord skill-dedupe test)
And pnpm build passes with zero skill/ClawHub references in src/
Note: ClawHub references in root docs (README.md, CONTRIBUTING.md, VISION.md, SECURITY.md, docs/help/faq.md) are deferred to M4 rebrand. protocol/schema/agents-models-skills.ts is KEEP (generic schema, no brand refs) — do NOT delete.
Summary
Remove the entire OpenClaw skills system and ClawHub integration. RemoteClaw uses a Bring Your Own Agent model — users provide skills via their chosen CLI agent's native skill system (e.g.,
~/.claude/, Gemini skills, etc.). The bundled skills system, skill installation pipeline, ClawHub registry, and all supporting infrastructure are dead code.Context
The skills system is deeply integrated across the codebase: ~73 bundled skill files, ~16 skill engine files, ~30+ skill-related implementation files outside the main directories, and ~25 KEEP/MODIFY files with skill imports that need cleanup. This is one of the largest gutting operations in M3.
Why now: All M2 dispatch wiring is complete. The 4 dispatch sites (auto-reply, cron, CLI command, voice-call) now route through ChannelBridge → CLI runtime. The old pi-embedded execution path that consumed skills is bypassed. Skills are never loaded, never executed, never served — they're dead weight.
What to Remove
Phase 1: Delete skill directories (bulk removal)
Delete
skills/directory (~73 files, ~54 subdirectories):All bundled skill implementations (1password, apple-notes, bear-notes, canvas, clawhub, discord, gemini, github, himalaya, imsg, model-usage, notion, obsidian, openai-image-gen, openai-whisper, etc.).
Delete
src/agents/skills/directory (~16 files):The skill engine — workspace loading, bundled-dir resolution, config, env-overrides, filtering, frontmatter parsing, plugin-skills, refresh/watch, serialization, tools-dir, types.
Phase 2: Delete skill implementation files outside core directories
These files exist under
src/but are entirely skill-specific:Root-level skill files in
src/agents/(delete entirely):src/agents/skills.ts— re-export hub for skills APIsrc/agents/skills-install.ts— skill installation orchestrationsrc/agents/skills-install-download.ts— downloads skills from registriessrc/agents/skills-install-output.ts— formats install outputsrc/agents/skills-install-download-test-utils.tssrc/agents/skills-install-fallback.test.tssrc/agents/skills-install.test.tssrc/agents/skills-install.test-mocks.tssrc/agents/skills-status.ts— skill workspace status reportingsrc/agents/skills-status.test.tssrc/agents/skills.test-helpers.tssrc/agents/skills.e2e-test-helpers.tssrc/agents/skills.*.test.tsfilesCLI skills commands (delete entirely):
src/cli/skills-cli.ts— skill status CLI command handlersrc/cli/skills-cli.format.ts— output formatting + ClawHub hintssrc/cli/skills-cli.formatting.test.tssrc/cli/skills-cli.test.tsSkill onboarding (delete entirely):
src/commands/onboard-skills.tssrc/commands/onboard-skills.test.tssrc/commands/onboard-non-interactive/local/skills-config.tsGateway skills API (delete entirely):
src/gateway/server-methods/skills.ts— entire API handlersrc/gateway/server-methods/skills.update.normalizes-api-key.test.tssrc/gateway/server.skills-status.e2e.test.tsSecurity scanner (delete entirely):
src/security/skill-scanner.tssrc/security/skill-scanner.test.tsCron skills snapshot (delete entirely):
src/cron/isolated-agent/skills-snapshot.tssrc/cron/isolated-agent/run.skill-filter.test.tsInfrastructure (delete entirely):
src/infra/skills-remote.tsConfig types (delete entirely):
src/config/types.skills.tssrc/config/config.skills-entries-config.test.tsDiscord skills deduplication (delete entirely):
src/discord/monitor/provider.skill-dedupe.test.tsSandbox skills (delete entirely):
src/agents/sandbox-skills.test.tsPhase 3: Clean up KEEP/MODIFY files (import removal)
These files survive but need skill-related imports, types, and function calls removed:
CLI registration (remove
skillssubcommand entry):src/cli/program/register.subclis.ts— remove theskillsentry from subcommand registrationAuto-reply system (remove skill type imports and function calls):
src/auto-reply/commands-registry.ts— removeSkillCommandSpectype importsrc/auto-reply/reply/commands-system-prompt.ts— removebuildWorkspaceSkillSnapshot,getSkillsSnapshotVersionimports and callssrc/auto-reply/reply/commands-types.ts— removeSkillCommandSpectype importsrc/auto-reply/reply/get-reply-directives.ts— removeSkillCommandSpectype importsrc/auto-reply/reply/get-reply-inline-actions.ts— removeSkillCommandSpectype importsrc/auto-reply/reply/queue/types.ts— removeSkillSnapshottype from queue payloadsrc/auto-reply/reply/session-updates.ts— remove skill snapshot injectionsrc/auto-reply/skill-commands.ts— remove or gut (builds command specs from skills)src/auto-reply/status.ts— removeSkillCommandSpectype importCommands (remove skill references):
src/commands/agent.ts— remove skill snapshot building import/callsrc/commands/docs.ts— removehasBinaryimport (if only used for skills)src/commands/doctor-workspace-status.ts— remove skill status from diagnosticssrc/commands/status-all.ts— remove skill status from overall statusGateway (remove skill listener):
src/gateway/server.impl.ts— remove skills change listener registrationHooks (check
hasBinaryusage):src/hooks/gmail-setup-utils.ts— useshasBinaryimported from skills; may need to inline or relocate the utilitysrc/hooks/gmail-watcher.ts— samehasBinarydependencySecurity (remove skill audit):
src/security/audit-extra.async.ts— remove workspace skills audit callSystem prompt (remove ClawHub reference):
src/agents/system-prompt.ts— remove "Find new skills: https://clawhub.com" linesrc/gateway/protocol/schema/agents-models-skills.ts— disposition is KEEP (generic schema, no brand refs).Phase 4: Verify clean build
Must pass with zero errors. Run a grep verification:
Note on ClawHub in docs: ClawHub references exist in root markdown files (README.md, CONTRIBUTING.md, VISION.md, SECURITY.md, docs/help/faq.md). These are deferred to M4 rebrand — they don't affect build and are part of the broader namespace transition.
Key Decision:
hasBinaryutilityThe
hasBinary()function (checks if a binary exists on PATH) lives in the skills module but is used bysrc/hooks/gmail-setup-utils.tsandsrc/hooks/gmail-watcher.tsfor non-skill purposes. Options:which/command -vwrapper, 3-5 linessrc/infra/— if used by multiple filesChoose the simpler option. Do NOT create a new module for a 3-line utility if it's only used in 2 places.
Estimated Scale
skills/directory (delete)src/agents/skills/directory (delete)src/(delete)Acceptance Criteria
Given all dispatch wiring is complete (WI-032 through WI-035) and the Bring Your Own Agent model means users provide skills via
~/.<agent>/When the skills system and ClawHub are removed
Then
skills/directory (~73 files) is deletedAnd
src/agents/skills/directory (~16 files) is deletedAnd root-level skills files in
src/agents/are deleted (skills.ts,skills-install.ts,skills-install-download.ts,skills-install-output.ts,skills-status.ts+ associated tests)And skills CLI files are deleted (
src/cli/skills-cli.ts,skills-cli.format.ts+ tests)And skills gateway handler is deleted (
src/gateway/server-methods/skills.ts+ tests)And skills cron snapshot is deleted (
src/cron/isolated-agent/skills-snapshot.ts+ test)And skills config type is deleted (
src/config/types.skills.ts+ test)And skills onboarding command is deleted (
src/commands/onboard-skills.ts+ test)And skills infrastructure file is deleted (
src/infra/skills-remote.ts)And
skillsentry is removed fromsrc/cli/program/register.subclis.tsAnd all skill-related imports in remaining KEEP/MODIFY files are removed or stubbed
And ClawHub references in source files are removed (system-prompt.ts, discord skill-dedupe test)
And
pnpm buildpasses with zero skill/ClawHub references insrc/Note: ClawHub references in root docs (README.md, CONTRIBUTING.md, VISION.md, SECURITY.md, docs/help/faq.md) are deferred to M4 rebrand.
protocol/schema/agents-models-skills.tsis KEEP (generic schema, no brand refs) — do NOT delete.