From f559e26f845335c5a2830e85033e2c490d9d7408 Mon Sep 17 00:00:00 2001 From: dodaa08 Date: Tue, 8 Sep 2026 13:31:23 +0530 Subject: [PATCH] Merged command menu skills into openclaw native skills and added both in same folder --- docs/SKILLS/Collections.md | 10 +++++----- openclaw.plugin.json | 2 +- package.json | 2 +- src/service/channel.ts | 11 +++++------ 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/docs/SKILLS/Collections.md b/docs/SKILLS/Collections.md index f03e2e7..3dfc063 100644 --- a/docs/SKILLS/Collections.md +++ b/docs/SKILLS/Collections.md @@ -4,20 +4,20 @@ Skills let you extend what your OpenClaw agent can do from sending emails to sch ## 1. Create the skills folder -Skills live **outside** your workspace, in your home directory root: +Skills live inside your OpenClaw workspace, in the `skills` subfolder: ```bash -mkdir -p ~/.openclaw/skills +mkdir -p ~/.openclaw/workspace/skills ``` -Each skill gets its own subfolder inside `~/.openclaw/skills/`. +Each skill gets its own subfolder inside `~/.openclaw/workspace/skills/`. ## 2. Add a skill Inside each skill's folder, add a `SKILL.md` file describing what the skill does and how to use it. ``` -~/.openclaw/skills/ +~/.openclaw/workspace/skills/ ├── email/ │ └── SKILL.md ├── cron/ @@ -43,7 +43,7 @@ Two ready-made example skills are included to get you started: These two are directly accessible from the **command menu**. -> Copy the contents of the reference file into `~/.openclaw/skills//SKILL.md` to use it as-is, or edit it to fit your setup. +> Copy the contents of the reference file into `~/.openclaw/workspace/skills//SKILL.md` to use it as-is, or edit it to fit your setup. ## 4. Skills beyond the command menu diff --git a/openclaw.plugin.json b/openclaw.plugin.json index 7bf32ad..bc55a32 100644 --- a/openclaw.plugin.json +++ b/openclaw.plugin.json @@ -2,7 +2,7 @@ "id": "rocketchat", "name": "Rocket.Chat", "description": "Rocket.Chat channel plugin with DDP/websocket outbound/inbound", - "version": "1.2.9", + "version": "1.2.10", "kind": "channel", "channels": [ "rocketchat" diff --git a/package.json b/package.json index 143d678..433336c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dodaa08/openclaw-plugin-test", - "version": "1.2.9", + "version": "1.2.10", "description": "A fully unified plugin for integrating Rocket.Chat with OpenClaw. This plugin eliminates the need for an external bridging server, providing a direct, single-place architecture for inbounds, outbounds, session management, and CLI configuration.", "main": "dist/index.js", "peerDependencies": { diff --git a/src/service/channel.ts b/src/service/channel.ts index 38431c2..b071992 100644 --- a/src/service/channel.ts +++ b/src/service/channel.ts @@ -1,11 +1,10 @@ import type { InboundEvent } from "../types.js"; import type { ChannelRuleOptions } from "../types.js"; -import { DM_SCOPE, CommandParser } from "../utils.js"; +import { DM_SCOPE, CommandParser, resolveOpenClawDir } from "../utils.js"; import { RocketChatClient } from "../client/rest.js"; import type { RCLoginResult } from "../types.js"; import { readdirSync, readFileSync, existsSync, statSync } from "node:fs"; -import { resolve } from "node:path"; -import { homedir } from "node:os"; +import { resolve, join } from "node:path"; import { readConfig, readDefaultModel, @@ -491,9 +490,9 @@ function parseSkillFrontmatter(content: string): { name?: string; description?: } function runSkills(showOwnerOnly: boolean): string { - const skillsDir = resolve(homedir(), ".openclaw", "skills"); + const skillsDir = join(resolveOpenClawDir(), "workspace", "skills"); if (!existsSync(skillsDir)) { - return "No skills installed (expected at ~/.openclaw/skills)."; + return "No skills installed (expected at ~/.openclaw/workspace/skills)."; } const entries = readdirSync(skillsDir).filter((name) => { const full = resolve(skillsDir, name); @@ -518,7 +517,7 @@ function runSkills(showOwnerOnly: boolean): string { skills.push({ name: fm.name, description: fm.description ?? "" }); } if (skills.length === 0) { - return "No skills installed (expected at ~/.openclaw/skills)."; + return "No skills installed (expected at ~/.openclaw/workspace/skills)."; } const cap = (s: string, n = 80): string => (s.length > n ? s.slice(0, n).trimEnd() + "…" : s); const lines = ["**Skills**"];