Save the real Claude Code or Grok Build session messages only when the user explicitly requests it. Also use it to save or move the current conversation to a Space the user names. Use nmem t save to import the recorded session, not a summary-only checkpoint.
206 stars
0 votes
0 copies
0 views
Added September 24, 2026
ai-agentsbashapi
Works with
claude code
cli
api
Security analysis
A92/100
mediumInstalls packages at runtime which could introduce malicious dependencies
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 Save Thread?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nowledge-co-save-thread-community)
---
name: save-thread
description: Save the real Claude Code or Grok Build session messages only when the user explicitly requests it. Also use it to save or move the current conversation to a Space the user names. Use nmem t save to import the recorded session, not a summary-only checkpoint.
---
# Save Thread
## When to Save
**Only when user explicitly says:**
"Save this session" | "Checkpoint this" | "Record conversation" | "Save this conversation to the Test Space"
Never auto-save or suggest.
## Tool Usage
Use `nmem t save` to import the current session. Use `claude-code` in Claude Code and `grok` in Grok Build:
```bash
# Save current session for current project
nmem t save --from claude-code
# In Grok Build:
nmem t save --from grok
# Save with custom summary
nmem t save --from claude-code -s "Brief summary of what was accomplished"
# In Grok Build:
nmem t save --from grok -s "Brief summary of what was accomplished"
# Save all sessions for current project
nmem t save --from claude-code -m all
# In Grok Build:
nmem t save --from grok -m all
# Save for specific project path
nmem t save --from claude-code -p /path/to/project
# In Grok Build:
nmem t save --from grok -p /path/to/project
```
**Options:**
- `--from`: Source app (`claude-code` for Claude Code, `grok` for Grok Build)
- `-s, --summary`: Optional brief summary (recommended)
- `-m, --mode`: `current` (default, latest session) or `all` (all sessions)
- `-p, --project`: Project directory path (defaults to current directory)
- `--truncate`: Truncate large tool results (>10KB)
**Behavior:**
- Auto-detects sessions from `~/.claude/projects/` for Claude Code or `~/.grok/sessions/` for Grok Build
- Idempotent: Re-running appends only new messages
- Thread ID: Auto-generated as `claude-code-{session_id}` or `grok-{session_id}`
## Save or move to a Space the user names
For requests such as "save this conversation to the Test Space", act only on
the current conversation in an existing Space.
1. Use the session ID Claude Code inserts here, `${CLAUDE_SESSION_ID}`. Use
`claude-code` as
`<host>` and `claude-code-<session-id>` as `<thread-id>`. In Grok Build,
use the current host-provided session ID, `grok` as `<host>`, and
`grok-<session-id>` as `<thread-id>`. If the session ID is unavailable,
stop and report that the current session could not be identified.
2. Resolve the destination with `nmem --json spaces list` and
`nmem --json spaces show "<name>"`. Use the returned exact Space ID in all
write and verification commands. Treat a Space as the target only when the
user's name matches its name or ID exactly. If the name does not match
exactly, such as "Test Space" for a Space named "Test", name the candidate
Spaces and ask which one to use; do not pick one yourself. If you cannot
resolve one writable target, report the reason and ask which Space to use.
3. Look up the exact Thread with `nmem --json t show "<thread-id>" -n 1`. Use
the returned `space_id` as the source. A missing result from one Space
only covers that Space. If the lookup was scoped by the current settings,
check the other readable candidate Spaces by exact ID. If you cannot
distinguish a missing Thread from a failed lookup or identify one exact
source, stop and explain what needs to be resolved.
4. For an existing Thread in a different Space, preview the move:
```bash
nmem --json t move "<thread-id>" --space-id "<source-id>" --to-space-id "<target-id>" --dry-run
```
Continue only when the preview identifies one movable Thread. If the target
is shared or the preview shows new readers, name the destination and ask
for confirmation. If the preview requires the author to use the Team share
flow, direct them to **Share** on the conversation in Nowledge Mem and stop
here: do not run the save in step 5, because the Thread is still in its
source Space. For an allowed and confirmed move, repeat the same command
with `--force` in place of `--dry-run`.
5. For a new Thread in a shared Space, confirm the destination with the user.
Save the current transcript in the target Space. Use the same save for a
Thread already there, including after a successful move, to capture the
latest available turns.
```bash
nmem --json t save --from "<host>" --session-id "<session-id>" --space-id "<target-id>"
```
Inspect the save result for this exact session and Thread. A missing, skipped
or failed result leaves the requested save unconfirmed, even if the Thread
already appears in the target Space.
Another writer, such as automatic capture, can create the Thread between
the lookup and the save. If the save reports that the Thread is stored in
another Space, look it up again as in step 3, follow step 4 with its
confirmation rules, and then run this save again.
6. Read back `nmem --json t show "<thread-id>" -n 1 --space-id "<target-id>"`.
Confirm the same Thread ID and the exact target, and report the Space and
`total_messages`. Report save success only when the save result and readback
both confirm it. Report a verified move separately if the save is unconfirmed.
Report an ambiguous, unknown or unwritable target without falling back to
Default. In that report, say that the requested save did not happen, and that
automatic capture may still store this conversation in its usual Space.
Ordinary automatic capture follows the existing Thread. A host Space
override can affect subsequent capture, so mention any known override when
reporting the result.
## Thread vs Memory
Thread = real session messages | Memory = distilled insights (different purposes, can do both)
## Response
```
✓ Thread saved
Summary: {summary}
Messages: {count}
Thread ID: claude-code-{session_id} or grok-{session_id}
```
## Troubleshooting
If `nmem` is not in PATH: `pip install nmem-cli`, or on Arch Linux `yay -S nmem-cli` / `paru -S nmem-cli`
For remote servers: run `nmem config client set url https://...` and `nmem config client set api-key ...` once on this machine.
Run `/status` to check server connection.