Skip to content
Back to skills

Memory Health

ASecurity

Audit gsnote agent memory (and, read-only, user notes) for health, duplicates, stale or wrong facts, noise, leaked secrets and misplaced spaces, then clean up with the user's approval. Use when the user asks to check, validate, review or clean the memory.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 4, 2026
ai-agentsgobashgitapi

Works with

  • cli
  • api

Security analysis

A100/100

Scanned December 4, 2026

npx -y skills add gscode1/gsnote --skill memory-health --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Memory Health?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Memory Health
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/gscode1-memory-health/badge)](https://www.skillsdirectory.com/skills/gscode1-memory-health)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: memory-health
description: Audit gsnote agent memory (and, read-only, user notes) for health, duplicates, stale or wrong facts, noise, leaked secrets and misplaced spaces, then clean up with the user's approval. Use when the user asks to check, validate, review or clean the memory.
---

# Memory health

Audit first, change nothing until the user approves. Deletions cannot be undone.

Use the `gsnote` CLI (`--agent` = agent-memory instance; without it = user notes). Never print
tokens or the env files in `~/.config/gsnote/`.

## 1. Health

- `gsnote health --agent` and `gsnote health`: both reachable, at the expected URL.
- `gsnote search --agent "test" --broad --top-k 1`: a query search works. A 503 means the server's
  embedding config no longer matches the stored vectors (see REFERENCE.md, "Changing the embedding model").
- `gsnote spaces --agent`: counts per space.

## 2. Snapshot

Audit from a full export, not search (search returns at most 50). Keep it out of the repo:

```bash
umask 077; mkdir -p ~/.local/share/gsnote/backups
gsnote export --agent -o ~/.local/share/gsnote/backups/agent-$(date +%Y%m%d-%H%M%S).json
```

The same file is the backup to restore from (`gsnote import --agent <file>` skips existing ids).

## 3. Checks

Review every memory (`id`, `content`, `category`, `space`, `created_at`). Flag:

1. **Secrets**: anything that looks like a token, key, password or private URL. Highest priority.
2. **Duplicates**: same fact twice, also reworded. For candidates, run
   `gsnote search --agent "<content>" --space <space> --broad --top-k 5`.
3. **Superseded**: conflicting facts. The newest usually wins; keep the older one only if it still holds.
4. **Wrong**: in the current repository's space, check claims against the code and `git log`
   (files, settings, commands or behavior that no longer exist).
5. **Noise**: what the code or git history already holds, chit-chat, logs, task status,
   relative dates ("today", "this") with no absolute date, facts too vague to act on.
6. **Misplaced**: anything in `default`; `local-*` spaces (repos without a usable remote);
   project facts in `global` or preferences in a project space.

User notes (instance without `--agent`) are the user's own: report secrets and exact duplicates
only, and never change them unless the user explicitly asks.

## 4. Report

One table per space: id (first 8 chars), finding, proposed action (delete / merge / move / fix / keep),
one-line reason. Then totals and the health results. Ask which actions to apply.

## 5. Apply (only what the user approved)

There is no update API:

- **delete**: `gsnote delete --agent <id>`
- **merge / fix**: save the corrected memory with the memory tool (`save_memory`), then delete the old ids.
- **move**: save the same content in the right space, then delete the old id.

Afterwards run `gsnote spaces --agent` and report the counts before and after.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.