Skip to content
Back to skills

Yishan Memory

ASecurity

Use when you need durable Yishan memory: search past decisions and preferences, read `.my-context/` files, or save a lasting decision, discovery, convention or user preference with the `yishan memory` CLI.

  • 7 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 14, 2026
ai-agentsgogit

Works with

  • terminal
  • cli

Security analysis

A100/100

Scanned December 4, 2026

npx -y skills add yishan-io/yishan-mono --skill yishan-memory --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Yishan Memory?

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

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

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: yishan-memory
description: Use when you need durable Yishan memory: search past decisions and preferences, read `.my-context/` files, or save a lasting decision, discovery, convention or user preference with the `yishan memory` CLI.
---

# Yishan Memory

Yishan memory keeps durable facts as entries, one fact per entry. The daemon is the only writer: always use the `yishan memory` CLI, never edit memory files by hand. Add `--output json` when you parse the result.

A session in a Yishan terminal starts with a `<memory>` block: user preferences and pinned entries in full, then one line per other entry naming its scope and slug. Read such an entry with `yishan memory get <slug> --scope <scope>` before you rely on it.

## Scopes

| Scope | What goes there |
|---|---|
| `project` (default) | Decisions and discoveries about this repository |
| `org` | Conventions and decisions of the organization, shared by its projects |
| `user` | The user's own preferences and habits: language, tone, workflow |

Company or project facts never go in `user`: user entries reach every org's sessions. When unsure, use `project`.

The project comes from `--project-id` or `YISHAN_PROJECT_ID`, which is already set in a Yishan terminal. The org scope uses the project's org unless you pass `--org-id`. Never invent or guess an ID.

## Commands

- `yishan memory search "<1-3 keywords>"`: search entries, `.my-context/` documents and task documents. Add `--include-superseded` to see replaced entries.
- `yishan memory list [--scope user|org|project]`: list the entries of one scope.
- `yishan memory get <slug> [--scope ...]`: show one entry in full.
- `yishan memory save --type decision|discovery|convention|preference --title "<one line>" (--body "<text>" | --file <path> | --file -) [--scope ...] [--slug <slug>]`: save one fact. Without `--slug` it creates a new entry named after the title. With `--slug` it updates that entry.
- `yishan memory supersede <slug> --by <slug> [--scope ...]`: mark an entry as replaced by a newer one in the same scope.
- `yishan memory delete <slug> [--scope ...]`: delete an entry that was wrong.
- `yishan memory read <path>`: read one file under `.my-context/`, relative to it.
- `yishan memory history [--scope ...]` and `yishan memory undo <batch-id>`: list recorded changes and revert one batch.

## When to search

Search before you change structure, reopen a past decision, or ask the user to repeat history. Use few, specific keywords. Read the entry or file a result points to before you rely on its snippet.

## When to save

Save when the user states a decision, a convention or a preference that should outlive this session, or when you find a non-obvious fact that a future session would otherwise rediscover. Do not save what the code, git history or `.my-context/` documents already record, or what only matters to this task.

- One fact per entry. The title is one line. The body states the fact, then `Why:` and `How to apply:`.
- Search or list first. If an entry already covers the fact, update it with `--slug`. If the new fact replaces an old one, save the new entry, then `supersede` the old one.
- Ask the user before you delete an entry or save a `user` preference they did not state.

## Failure handling

- Exit code 2 means a usage error, such as a missing project. 4 means not found. 5 means a path outside `.my-context/`. Report the message. Do not work around it.
- A stopped daemon is started for you. If the command still fails, tell the user.

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.