diff --git a/README.md b/README.md index 9e43633..830b2a4 100644 --- a/README.md +++ b/README.md @@ -42,10 +42,11 @@ Everything runs in the cloud. Supermemory handles extraction, deduplication, and ## Slash Commands -| Command | Description | -| ------------------ | --------------------------------------- | -| `/remember ` | Manually save something to memory. | -| `/recall ` | Search memories with similarity scores. | +| Command | Description | +| -------------------- | ---------------------------------------------------------------------------------------------------- | +| `/remember ` | Manually save something to memory. Stores the given text immediately. | +| `/recall ` | Search memories with similarity scores. | +| `/supermemory-index` | Index the current project into memory. Agent skill: explores the codebase, then saves focused memories (unlike `/remember`). | ## AI Tools diff --git a/index.ts b/index.ts index 5b1ed3b..c528268 100644 --- a/index.ts +++ b/index.ts @@ -16,7 +16,7 @@ import { registerProfileTool } from "./tools/profile.ts" import { registerSearchTool } from "./tools/search.ts" import { registerStoreTool } from "./tools/store.ts" -const PLUGIN_VERSION = "2.1.14" +const PLUGIN_VERSION = "2.1.18" const UPDATE_COMMAND = "openclaw plugins install @supermemory/openclaw-supermemory" diff --git a/openclaw.plugin.json b/openclaw.plugin.json index d3b9427..b48d2cd 100644 --- a/openclaw.plugin.json +++ b/openclaw.plugin.json @@ -7,6 +7,7 @@ "cliCommand": "supermemory" } ], + "skills": ["skills"], "contracts": { "tools": [ "supermemory-search", diff --git a/package.json b/package.json index 4cd2553..2746f7b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@supermemory/openclaw-supermemory", - "version": "2.1.17", + "version": "2.1.18", "type": "module", "description": "OpenClaw Supermemory memory plugin", "license": "MIT", @@ -15,6 +15,7 @@ "client.ts", "commands", "hooks", + "skills", "tools", "config.ts", "logger.ts", diff --git a/runtime.ts b/runtime.ts index 1ed621d..9597c54 100644 --- a/runtime.ts +++ b/runtime.ts @@ -138,6 +138,7 @@ export function buildPromptSection(params: { if (storeTool) { lines.push( `Use ${storeTool} to save important information the user asks you to remember.`, + "The user can run /supermemory-index (or the supermemory-index skill) to index a project.", ) } diff --git a/skills/supermemory-index/SKILL.md b/skills/supermemory-index/SKILL.md new file mode 100644 index 0000000..dca7df1 --- /dev/null +++ b/skills/supermemory-index/SKILL.md @@ -0,0 +1,37 @@ +--- +name: supermemory-index +description: Index the current project into Supermemory. Use when the user asks to index, learn, or memorize the codebase. +--- + +# Index codebase into Supermemory + +Explore the current workspace and save several focused memories about it. This skill must run through the agent — do not look for a slash-command handler. + +## Explore + +Auto-detect the ecosystem from manifests and source layout: + +- JS/TS — `package.json`, `tsconfig.json`, lockfiles, `src/` +- Python — `pyproject.toml`, `requirements.txt`, `setup.py`, `setup.cfg` +- Go — `go.mod` +- Rust — `Cargo.toml` +- .NET — `*.csproj`, `*.sln` +- Java — `pom.xml`, `build.gradle` +- Ruby — `Gemfile` +- PHP — `composer.json` +- Swift — `Package.swift` +- Elixir — `mix.exs` + +Read the README, package/manifest files, architecture notes, conventions, and key source files. Skip dependency and build directories (`node_modules`, `dist`, `build`, `target`, `.git`, `vendor`, `__pycache__`, and similar). + +## Save + +For each distinct insight — what the project is, how it is structured, conventions, important modules, how to run and test — save a focused memory with `supermemory-save`. If that tool is unavailable, use `supermemory_store`. + +Prefer several short, specific memories over one dump. Do not save secrets, credentials, or lockfile/dependency noise. + +## Confirm + +When done, reply in this form (fill in N and the project name): + +Codebase indexed — [N] memories saved about [project name]