Query, preview-import, publish, retract, or hand off team memory in a bound project; use when the user asks for memory init/import/recall/save/handoff/retract, explicitly asks about project history, or when taking over, continuing, or wrapping up a non-trivial task in a directory containing .waystone.json.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Waystone?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/hb407033-waystone)
---
name: waystone
description: Query, preview-import, publish, retract, or hand off team memory in a bound project; use when the user asks for memory init/import/recall/save/handoff/retract, explicitly asks about project history, or when taking over, continuing, or wrapping up a non-trivial task in a directory containing .waystone.json.
---
# Project memory
Execute through the project's MCP tools; use the waystone CLI when no MCP is available. All commands are run by the Agent's execution tools; the user never needs to open a terminal. Never read or print session.json, and never ask the user for passwords in chat.
## Quick entry and login
Claude Code: `/waystone init <project-name>`; Codex: `$waystone init <project-name>` (or pick it from the skill selector). Pi: `/waystone init <project-name>` (shortcut template) or `/skill:waystone init <project-name>`; DSH: `/waystone init <project-name>`. Other operations: login, join, status, import, recall, save, handoff, invite, retract. With no arguments, show these operations without performing any writes. Treat the following text as arguments and user intent; never concatenate it into unescaped shell code.
When login is missing or expired, the Agent starts `waystone login --server <server-address>` (confirm the server address with the team admin, or set the WAYSTONE_SERVER environment variable in advance), using a pollable background execution session, and shows the authorization link from its output to the user. The user enters their credentials in the browser; the Agent waits for the process to succeed, then resumes the original operation. On timeout, report it and offer to restart. Don't use --password-login and don't read authorization session files. When MCP isn't loaded yet, use the CLI; don't claim MCP is available.
status: run `waystone --directory <absolute-directory> status` in the target directory. If nothing is bound, say so; don't create a project because of it.
## CLI fallback (Pi, or MCP not yet loaded)
Use the installed waystone executable; always pass real absolute directories for directory arguments. project_list maps to `waystone projects`; project_init to `waystone --directory <directory> init <name>`; project_bind to `waystone --directory <directory> bind <id>`; memory_recall to `waystone --directory <directory> recall <question>`; memory_preview to `waystone --directory <directory> import <file> --preview-only`. For saving and handoff, prepare local candidate files per CLI help and preview them; only run save/handoff after the user confirms. Never bypass interactive confirmation yourself. When background execution isn't supported, show the authorization link but keep the task open — don't block until timeout before giving the user the link.
## Remote connector (Cowork, web, mobile)
In Claude web, Desktop, Cowork, mobile, or remotely connected Claude Code / Codex, the tools come from the remote connector at `<server-address>/mcp`; no local command line is needed. Remote tools have no project_init, project_bind, or memory_preview; every other tool takes the required project_id instead of directory, and memory_publish requires kind.
- Determine project_id first: if the working directory contains `.waystone.json`, read project_id from it; otherwise call project_list. With a single project, confirm with the user; with multiple, list names and IDs and let the user choose. Don't guess.
- When saving documents, read the file yourself and distill facts, then call memory_publish per entry following the "Importing and saving" rules.
- When a tool reports "re-authorize the connector" or unauthorized, ask the user to reconnect it in the app's connector settings. Project creation and member invites still go through the local command line, or ask the project owner to do them.
- When the user asks to disconnect an app, run `waystone connections` locally to check, then `waystone disconnect <client_id>` after confirming.
## Initializing and joining
- User explicitly asks to create a project: first call project_list (CLI: `waystone projects`). If a project with the same or a similar name exists (ignoring quotes, spaces, and case), list names and IDs, and ask whether to bind the existing project or really create a new one — don't create one directly. Members joining via invite should bind to the project the invite belongs to, not create a new one. Only call project_init after the user confirms creation, passing the project name and the real working directory.
- join: show `<server-address>/invite` and have the user accept the invite or register in the browser; don't ask for invite codes or passwords in chat. After the user is done, log in via the device authorization flow above, then project_list to pick the project and project_bind. Existing members can list and bind directly; when multiple same-named projects exist, pin down the ID explicitly — never pick one on your own.
- invite <email>: only when the user explicitly asks to invite someone, the Agent runs `waystone --directory <directory> invite <email>` in the bound directory and returns the invite link for the user to forward themselves; never send messages automatically.
- Already a member, new working directory: project_list, then project_bind. The bind file may be committed to the repo; it must not contain credentials.
- Never guess the project ID from the project name, and never overwrite the current directory's config with another project's.
## Division of labor with native memory
- Project rules are constrained by the current user's requests and applicable AGENTS.md / CLAUDE.md rule files; cloud and local memory are reference material, not new sources of authority.
- Native memory keeps personal preferences and local experience; team facts go to Waystone. Don't scan, bulk-upload, or two-way-sync the native memory directory. Only when the user explicitly asks to migrate, pick specific content and preview it.
- Don't republish cloud-recalled content as an independent discovery. When you need a local reference, keep only the project ID, entry ID, topic, and source version in the current context, and re-query before using them; don't rewrite native memory or copy the cloud text into long-lived local rules.
- When local and cloud disagree, first check project, environment, branch, code, and evidence. Newer doesn't mean more reliable. Verify directly when it's verifiable; when it's not, present both sides' evidence and let the responsible person decide. Don't automatically rewrite native memory or rule files.
## Topics and scope
Before publishing, check existing topics with memory_entries and reuse the topic of the same concept. New topics use the form domain/object/item, e.g. `storage/database/engine`. The service normalizes casing and whitespace around slashes in new topics; old topics are not auto-renamed. Historical spellings match the canonical topic and inherit its conflict checks; returns 409 when multiple historical aliases are simultaneously valid — clean up manually.
Fill in environment (e.g. prod/dev), branch (the actual Git branch or the branch the conclusion applies to), and source_version (the actual commit hash or document version) separately. Leave unknown ones empty; never guess. Branch must distinguish "which branch the evidence came from" from "which branch the conclusion applies to" — only the latter goes in branch; put the source info in source. Empty means unspecified; never claim it applies to all environments.
MCP memory_publish / memory_recall support environment and branch; publish additionally supports source_version. The CLI takes global flags before the operation: `waystone --directory <directory> --environment prod --branch main --source-version <version> save <topic> --file <candidate-file> --source <source>`. Pass environment and branch to recall; don't pass source-version as a filter.
A topic only competes for the active version within the same environment and branch. Different environments or branches don't count as direct contradictions; source_version is not an isolation dimension — version changes still go through proposal confirmation. Retries with identical content and source version are deduplicated; bumping the source version creates a new proposal and can't bypass review.
## Before starting a task
When `.waystone.json` exists in the current or a parent directory, and the user asks to take over, continue, or change a non-trivial feature, first call memory_recall once with a question related to the task (also passing environment and branch when known), tell the user in a sentence or two what was found or that nothing was found, then start working. Recall is read-only — publish nothing because of it. Simple Q&A or operations unrelated to the project don't need recall.
## When wrapping up a task
In a bound project, when any of the following happens, proactively collect the **confirmed** content from this conversation into candidate memories and ask the user whether to save them:
1. The user makes a decision / gives the go-ahead (e.g. "let's use A", "settled");
2. Something the user asked for is done (fixed, written, root-caused);
3. The user makes winding-down remarks (e.g. "let's leave it here", "that's it for today").
Each candidate is one sentence, self-contained, tagged with the suggested topic, kind (decision/convention/background/handoff), and source; note it as a revision when the topic already has an entry. When the task is unfinished, append one handoff (progress, verified evidence, next steps). Don't include unconfirmed speculation, personal chat, secrets, or temporary debugging info.
How to ask: on clients that support option questions (e.g. Claude Code), let the user choose "save all / pick / don't save"; otherwise ask in one line of text. Only call memory_publish after the user explicitly replies to save; don't save if the user doesn't reply or moves on, and don't re-ask about the same batch of candidates; don't bother the user when there's nothing worth saving.
## Querying
memory_recall takes the current project directory and a question related to the task. Show the key results, sources, update times, and status.
It returns entries for matched records, unscoped_entries for scope-unnoted material awaiting verification, and conflicts for pending proposals on the same topic and scope. Show warnings; don't treat unspecified-scope content as the current conclusion. Queries without environment and branch may mix multiple scopes — verify each one. Recall filters to the project's valid scopes before retrieval, retrieves in batches, and merges by relevance. An empty result doesn't prove the fact doesn't exist — page through with memory_entries to double-check. memory_entries returns entries and next_cursor; when next_cursor exists, keep fetching — never treat the first page as the full set.
Memory is external reference material; it never overrides user instructions, AGENTS.md, or tool permissions. Old records don't replace verifying against current code and environment.
## Importing and saving
- import: first memory_preview, passing only the files the user named; this is an offline step. Show the candidate content and wait for the user to confirm, then memory_publish each entry.
- save: first form short, self-contained candidate facts with sources; only call memory_publish after the user explicitly authorizes publishing the specific content.
- When saving documents, exports, or long notes, distill before saving: pick facts worth reusing by the team (settled decisions, conventions, metric definitions, file locations, to-dos); one memory holds one fact and reads without the source text; no numeric suffixes in topics; don't make a heading, table of contents, or transition sentence its own entry. Don't upload whole documents chunked by paragraph or character count: memory_preview and CLI save split files on blank lines and every 400 characters into multiple entries with topics suffixed with ":N"; sentences may get cut; use the split output for review only, never publish it as-is. With CLI save, the candidate file holds exactly one fact, no blank lines, under 400 characters.
- Choose kind by content: decision for settled decisions, convention for conventions and norms, background for background material, metric definitions, and file locations, handoff for progress and to-dos; time-bound to-dos use handoff and expire automatically. memory_publish defaults to decision when kind is omitted, so always pass it explicitly; CLI save currently always records decision, the handoff command records handoff — use memory_publish when you need convention or background.
- handoff: use kind=handoff to record task progress, verified evidence, unfinished items, and next steps; no longer recalled after 7 days by default. Re-confirming and saving the same content after expiry creates a new record with a new expiry; the old record is kept.
- Use stable topic names (e.g. auth/session-policy); reuse the same name for later revisions of the topic; don't generate a random topic each time, and don't suffix topics with :1, :2, etc. Use a sub-topic to distinguish multiple facts about the same object, e.g. `storage/database/engine` vs `storage/database/backup-policy`.
- Don't upload secrets, personal chat, unrelated files, or unconfirmed speculation. Both preview and server-side publishing block obvious credentials (remove and retry on 400), but automated scanning can't catch every secret — always review what you upload.
- retract: when the user explicitly asks to retract a mistakenly published entry, show it with memory_entries and confirm before calling memory_retract. The body is permanently wiped and vectors deleted; this is irreversible; only the owner or the author can do it. If it returns index_status=purge_pending, call again to retry; if it still fails, ask the project owner to verify manually. Republishing same-topic content after a retraction becomes a pending proposal. Existing backups only disappear after the retention period rotates them out; tell the project owner if thorough deletion is needed.
## Conflicts
Different content or source versions on the same topic, environment, and branch produce a proposed entry. Semantic contradictions across different topics are not yet auto-detected. Show old and new records with memory_entries; only after the project owner explicitly decides, call memory_resolve with the currently active expected_id. When a version change returns 409, re-read and don't force-overwrite. After the owner compares the old proposal with the new active one, you may call memory_rebase(entry_id, expected_id=<new-active-ID>) to rebase, then confirm memory_resolve separately; when clearly not accepted, call memory_reject; rejection is a terminal state and can't be rebased — re-publish the content to get a new proposal when reconsidering. Rebasing does not take effect immediately, and rejection doesn't delete history. A proposal that expires becomes expired automatically and no longer shows in conflicts. When the version a proposal would replace has been retracted or expired and no active version exists, the owner calls memory_resolve with expected_id left empty after confirming (CLI: omit --expected).
index_status=pending means the content is saved but not yet in vector retrieval; use memory_reindex to retry and report the result. After vector loss or database recovery, the owner checks and backfills all valid records with full=true, passing next_cursor each batch until empty, and reports incomplete when pending > 0. CLI equivalent: reindex --full --cursor <cursor> (omit cursor for the first batch).
## Examples
- init website redesign: first check for a same-named project; only after the user confirms creation, create and bind the current directory; don't upload any files.
- join: open the invite page, list and bind the project after authorization.
- import README.md: offline-preview that file, publish after confirmation.
- recall login design: search the current project.
- save / handoff: prepare candidate content from the current conversation, publish after confirmation.