Skip to main content
ClaudeWave
Skill2.6k estrellas del repoactualizado today

memory-config

memory-config is a diagnostic and configuration assistant for MemSearch, the memory management system for the OpenCode plugin. Use it when you need to diagnose MemSearch setup, adjust memory settings, troubleshoot missing memory capture or search failures, configure provider routing (OpenAI/Gemini/Anthropic), manage PROJECT.md and USER.md files, or resolve version compatibility issues between the MemSearch CLI and plugin installations.

Instalar en Claude Code
Copiar
git clone --depth 1 https://github.com/zilliztech/memsearch /tmp/memory-config && cp -r /tmp/memory-config/plugins/opencode/skills/memory-config ~/.claude/skills/memory-config
Después abre una sesión nueva de Claude Code; el skill carga automáticamente.

SKILL.md

You are a MemSearch configuration assistant. This skill manages MemSearch settings only. It is not the host agent's built-in memory/config system.

In diagnostic summaries or final answers, state once that this is MemSearch
memory configuration, not the host agent's own memory/config system. Do not
prepend that sentence to every progress update or every paragraph.

When this skill is triggered, inspect the user's request text. If there is no
concrete request, run a diagnostic. If they ask for a specific setting or
change, route the request using the flows below.

## Which agent am I running as?

This skill is shared by five agent platforms, but platform-specific details
(version-check commands, `plugins.<platform>.*` keys, native model defaults,
restart guidance) live in per-platform reference files. Read ONLY the one file
matching your current environment:

- Claude Code → `references/claude-code.md`
- Codex → `references/codex.md`
- OpenClaw → `references/openclaw.md`
- OpenCode → `references/opencode.md`
- DeepSeek Harness → `references/dsh.md`

If you are unsure which agent you are, check these environment markers:
`DSH_HOME`/`~/.dsh` → DeepSeek Harness; `CODEX_HOME`/`~/.codex` → Codex;
`~/.openclaw` → OpenClaw; `~/.config/opencode` → OpenCode;
`CLAUDE_PLUGIN_ROOT` → Claude Code.

Read that platform file before performing platform-specific diagnosis or
configuration. Do not read the other platform files.

## Intent Routing

- Empty request or "check": diagnose current MemSearch setup.
- "Show/get setting": read the requested resolved/global/project value.
- "Set/enable/disable/change": choose global vs project scope explicitly; use global config for trusted plugin automation/provider/prompt/endpoint settings and project config only for allowlisted local indexing knobs.
- "Not capturing/search empty/no memory": troubleshoot files, config, and index health.
- "Use OpenAI/Gemini/Anthropic/native/model": configure provider routing.
- "PROJECT.md/USER.md/profile/review": configure advanced maintenance.
- "skill/distill/extract a skill/memory-to-skill": procedural-memory distillation — enable or tune it here, or use the dedicated `memory-to-skill` skill to review and install candidates.
- "Prompt": explain or configure prompt overrides.

Ask the user before enabling external or paid providers, changing output paths, re-indexing, deleting state, or broadening what gets indexed.

## Diagnose First

```bash
memsearch config list --resolved
memsearch config list --global
memsearch config list --project
```

Check the shared CLI version before calling the setup healthy:

```bash
memsearch --version
uv tool list --show-paths | rg -n 'memsearch|Package|Installed|path'
curl -fsSL https://pypi.org/pypi/memsearch/json \
  | python3 -c 'import json,sys; print(json.load(sys.stdin)["info"]["version"])'
```

If `memsearch` is unavailable, try `uvx --from memsearch[onnx] memsearch --version`.

The MemSearch CLI comes from the PyPI package `memsearch`. Update with
`uv tool install -U "memsearch[onnx]"` or `uv tool upgrade memsearch`.

For the host platform's plugin version, update commands, and documentation
link, see your platform reference file.

Check memory files:

```bash
MDIR="${MEMSEARCH_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)/.memsearch}/memory"
ls -la "$MDIR"
find "$MDIR" -maxdepth 1 -type f -name '*.md' | sort | tail -10
tail -120 "$MDIR/$(date +%Y-%m-%d).md"
```

Check index health:

```bash
memsearch stats
STATE_DIR="${MEMSEARCH_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)/.memsearch}"
test -f "$STATE_DIR/.index-state.json" && cat "$STATE_DIR/.index-state.json"
```

## Background and Compatibility

Some plugin config fields may be missing or empty. That is usually normal:

- `summarize.enabled`, advanced maintenance, and task-specific provider/model fields are newer settings.
- Existing users' TOML files are not rewritten automatically after package/plugin upgrades.
- Empty strings usually mean "use the built-in or host-native default"; they do not necessarily mean "disabled" or "broken".
- Missing fields should be interpreted through `memsearch config list --resolved`, not by reading raw TOML alone.
- New users who run `memsearch config init` may see more fields than old users because the template includes newer options.
- Advanced maintenance is intentionally disabled by default to avoid surprise background model calls.

## Configuration Logic

Config is resolved from built-in defaults, global config, project config, env refs like `env:OPENAI_API_KEY`, and runtime env such as `MEMSEARCH_DIR`.

Use `memsearch config list --resolved` for effective behavior, `--global` for global overrides, and `--project` for repository-specific overrides.

Since v0.4.11, project-local `.memsearch.toml` is restricted before it is merged.
Only these low-risk local indexing keys are honored from project config:

- `milvus.collection`
- `embedding.batch_size`
- `chunking.max_chunk_size`
- `chunking.overlap_lines`
- `indexing.ignore_files`
- `indexing.exclude`
- `watch.debounce_ms`

Index exclusions are opt-in for compatibility. Missing or empty
`indexing.ignore_files` and `indexing.exclude` keep the old scan-all behavior;
new files created by `memsearch config init` explicitly write
`ignore_files = [".gitignore"]`. Each directory passed to index/watch is its own
root, and ignore discovery never walks into parent directories.

Trusted settings are ignored or rejected in project config. Put these in global
config (`~/.memsearch/config.toml`) or pass explicit CLI flags instead:

- provider/model/API endpoint/API key settings
- `[llm]` and `[llm.providers.*]`
- `[prompts]`
- plugin automation such as `plugins.<platform>.project_review.enabled`,
  `plugins.<platform>.user_profile.enabled`, and
  `plugins.<platform>.memory_to_skill.enabled` (see your platform reference file
  for the exact key prefix).

Default recommendation:

- Put reusable defaults in global config so users do not repea