本文へ移動
cccskills
無料GitHub で公開

cognee-switch-datasets

Switch this session to another Cognee dataset. Lists the datasets you can write to, lets you pick one, syncs the current session into its dataset, then starts a fresh Cognee session bound to the chosen dataset. All later saves and recalls target the new dataset and the status line shows it.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md4.1 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Switch Datasets

Move this Claude Code session to a different Cognee dataset. A Cognee session never spans two datasets, so the switch retires the current session (after syncing it into the graph) and starts a new one on the chosen dataset.

Instructions

1. If the user named a dataset, switch directly

When $ARGUMENTS contains a dataset name, skip the picker:

python3 "${CLAUDE_PLUGIN_ROOT}/scripts/switch-dataset.py" "$ARGUMENTS" --json

2. Otherwise, list and let the user choose

python3 "${CLAUDE_PLUGIN_ROOT}/scripts/switch-dataset.py" --list --json

The JSON has current, datasets ([{name, id, writable, current}]), hidden_readonly (datasets you can read but not write — never offered) and filtered (true when write access was verified for every row).

Present the choice with AskUserQuestion (single select), listing the dataset names from datasets with the current one marked "(current)". The tool allows four options per question, so if there are more than four, put the first three plus a "More…" option and page on the next question. The user can always type a name via the built-in "Other" — a name that is not listed is created for them on switch. If filtered is false, say so in the question text ("write access could not be verified for these").

Then run the switch with the chosen name:

python3 "${CLAUDE_PLUGIN_ROOT}/scripts/switch-dataset.py" "<chosen name>" --json

3. Report the result

On success the JSON is {"switched": true, "dataset", "session_id", "previous": {"dataset", "session_id", "synced": true|false}}. Tell the user in one line which dataset and Cognee session are now active and that the previous session was synced. The status line updates within a couple of seconds. If "switched": false with "reason": "already_active", say the session is already on that dataset.

On failure the JSON is {"error", "code"}:

codemeaningwhat to do
2launch record not foundthe plugin did not initialise this session; run "${CLAUDE_PLUGIN_ROOT}/scripts/cognee-doctor.sh". If several Claude Code sessions share this directory, rerun with --session-key <host session id>
3syncing the current session failednothing was changed; show the error. Re-run with --force only if the user explicitly accepts that unsynced entries of the current session are retried at session end instead
4registering the new session failednothing was changed; the server rejected the registration — check the connection
5dataset not writablethe name is readable but owned by another principal; pick from --list

What the switch does

  1. Syncs the current session into its dataset (sync-session-to-graph.py --strict) — aborts if this fails.
  2. Ensures the target dataset exists for this principal.
  3. Registers a new Cognee session on the target dataset under a fresh connection handle, then releases the old handle (register-then-unregister, so a local agent-mode server never sees zero connections).
  4. Repoints this launch's record: every hook, the shell wrappers, the idle/exit watchers and the status line follow it.
  5. Retired sessions stay in the record's touched list; the session-end sync covers them again as a safety net.

Notes

  • A switch is not needed just to look in another dataset: a one-off graph search leaves the session where it is — "${CLAUDE_PLUGIN_ROOT}/scripts/cognee-search.sh" "<query>" 10 --graph --dataset-id <id> (see the cognee-search skill).

  • COGNEE_PLUGIN_DATASET only seeds the dataset at launch; a switch overrides it for the rest of the session and survives --resume.

  • Recall is scoped to the active dataset, so after a switch earlier context from the previous dataset is no longer injected — switch back to see it again.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

codebase

無料

Use when indexing a code repository into Cognee's code graph or querying it (callers, impact analysis, paths, endpoints) from Antigravity.

日本語の概要は準備中です。原文の説明を表示しています。

topoteretes/cognee-integrations992026年10月10日 更新

codebase

無料

Use when indexing a code repository into Cognee's code graph or querying it (callers, impact analysis, paths, endpoints) from Codex.

日本語の概要は準備中です。原文の説明を表示しています。

topoteretes/cognee-integrations992026年10月10日 更新

Index a code repository into Cognee's code graph and query it deterministically (callers, impact analysis, paths, endpoints). Use for structural code questions, "index this repo", and checking what a re-index changed.

日本語の概要は準備中です。原文の説明を表示しています。

topoteretes/cognee-integrations992026年10月10日 更新

A multi-day digest of the user's own coding-agent sessions — sessions per day and project, most-edited files, and every lesson Cognee distilled into the knowledge graph in that window. Use only when the user explicitly asks for a weekly digest, a retro, a recap or report of their recent sessions, or invokes /cognee-digest. Not for questions about code or the current task.

日本語の概要は準備中です。原文の説明を表示しています。

topoteretes/cognee-integrations992026年10月10日 更新

A multi-day digest of the user's own coding-agent sessions — sessions per day and project, most-edited files, and every lesson Cognee distilled into the knowledge graph in that window. Use only when the user explicitly asks for a weekly digest, a retro, a recap or report of their recent sessions, or asks for the `cognee-digest` skill by name. Not for questions about code or the current task.

日本語の概要は準備中です。原文の説明を表示しています。

topoteretes/cognee-integrations992026年10月10日 更新

Use when an agent must stand up the OpenClaw↔Cognee integration with FalkorDB as the vector + graph store. This skill is SELF-CONTAINED — it tells you to generate every file (Dockerfile, sitecustomize.py, docker-compose.yaml) from the exact contents below, build a custom Cognee image that loads the FalkorDB adapter, run Cognee + FalkorDB together, self-verify the adapter registered, and point the OpenClaw cognee plugin at it (including per-agent graphs). No other files in this directory are required.

日本語の概要は準備中です。原文の説明を表示しています。

topoteretes/cognee-integrations992026年10月10日 更新

topoteretes のスキルをすべて見る

このスキルの問題を報告する