Agent skill

Save to Long-Term Memory

by rohitg00 in rohitg00/agentmemory

Saves an insight, decision or fact to agentmemory with specific concept tags and file paths, so a later recall can find it in a future session.

Apache-2.0Auto-check passedAgent Workflows

Install Save to Long-Term Memory

skills CLI
$ npx skills add rohitg00/agentmemory --skill remember -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install rohitg00/agentmemory remember --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/rohitg00/agentmemory.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugin/skills/remember .claude/skills/remember && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
remember
GitHub stars
29k
Token cost
~600 tokens
SKILL.md length
235 words
Files
2
Skills in repo
17
Repo updated
First seen
Licence
Apache-2.0

At a glance

Saves an insight, decision or fact to agentmemory with specific concept tags and file paths, so a later recall can find it in a future session.

  • Works in 6 steps: Pull the core insight, decision, or fact… → Extract 2-5 lowercased concept phrases.… → Extract referenced file paths (absolute… → …
  • Saving a decision or design rationale for later sessions
  • SKILL.md covers Quick start, Why, Workflow and Anti-patterns, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

When you ask the agent to remember something, it pulls out the core fact, picks two to five specific lowercase concept phrases, and notes any file paths you mentioned. It then calls the `memory_save` tool with the content, the concepts and the files, keeping your own wording instead of a paraphrase. In a multi-agent setup it can pass an agent id so the memory lands in the right scope.

After saving, the agent repeats the concepts it used so you know which terms will retrieve the memory. Saving a corrected version of a fact replaces the older record in recall, though the old one stays in a version chain. The skill needs agentmemory's `memory_save` tool to be available, and it points to companion skills for recall, forgetting, behavioral lessons and unprompted saving.

When your agent uses it

  • Saving a decision or design rationale for later sessions
  • Recording a fact together with the files it relates to
  • Correcting a memory that was saved earlier with outdated information

Example prompts

  • “Remember that we rotate JWT refresh tokens on every use and revoke the old one server-side.”
  • “Save this for next time: the staging database resets every Sunday night.”
  • “Note that the billing webhook handler lives in src/billing/webhook.ts.”

Requirements

  • agentmemory with its `memory_save` tool available

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Pull the core insight, decision, or fact out of $ARGUMENTS.
  2. Extract 2-5 lowercased concept phrases. Prefer specific over generic
  3. Extract referenced file paths (absolute or repo-relative). Empty if none.
  4. Call memory_save with content, concepts (comma-separated string), and
  5. Confirm the save and echo the concepts so the user knows the retrieval terms.
  6. To update a fact, save the corrected version outright: near-duplicate content

What it can do on your machine

Read from SKILL.md and the folder at commit 007a1a7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are json).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Save to Long-Term Memory loads about 600 tokens when it runs. Until then it costs about 62 tokens; SKILL.md has 235 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~62
When it runs · the whole SKILL.md, loaded when a task matches
~600

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from rohitg00/agentmemory at commit 007a1a7, republished under its Apache-2.0 licence (© rohitg00). 235 words, ~600 tokens.

Download SKILL.mdSave it as .claude/skills/remember/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
remember
description
Save an insight, decision, or learning to agentmemory's long-term storage with searchable concept tags. Use when the user says "remember this", "save this", "note that", "don't forget", or wants to preserve knowledge for future sessions.
argument-hint
[what to remember]
user-invocable
true

The user wants to save this to long-term memory: $ARGUMENTS

Quick start

json
memory_save {
  "content": "We rotate JWT refresh tokens on every use; the old token is revoked server-side in auth/refresh.ts.",
  "concepts": "jwt-refresh-rotation, token-revocation, auth-flow",
  "files": "src/auth/refresh.ts"
}

Expected output:

text
Saved memory abc12345 with 3 concepts: jwt-refresh-rotation, token-revocation, auth-flow.

Why

A memory is only as useful as the terms that retrieve it. Tag with specific concepts so a future recall finds it, and preserve the user's own phrasing.

Workflow

  1. Pull the core insight, decision, or fact out of $ARGUMENTS.
  2. Extract 2-5 lowercased concept phrases. Prefer specific over generic (jwt-refresh-rotation beats auth).
  3. Extract referenced file paths (absolute or repo-relative). Empty if none.
  4. Call memory_save with content, concepts (comma-separated string), and files (comma-separated string). In a multi-agent setup pass agentId so the memory lands in the right agent's scope.
  5. Confirm the save and echo the concepts so the user knows the retrieval terms.
  6. To update a fact, save the corrected version outright: near-duplicate content supersedes the old record, which leaves recall but stays in the version chain.

Anti-patterns

WRONG: concepts: "stuff, code, notes" (generic tags nothing can find later).

RIGHT: concepts: "jwt-refresh-rotation, token-revocation" (specific, retrievable).

Checklist

  • Content preserves the user's phrasing, not a paraphrase.
  • Concepts are specific, lowercased, 2-5 items.
  • File paths are real references, not guesses.
  • Confirmation echoes the exact concepts tagged.

See also

  • recall: retrieve what you save here (the pair to this skill).
  • forget: remove a memory you saved by mistake.
  • lesson: behavioral rules from corrections; memories are for facts.
  • memory-discipline: when to save unprompted.

Troubleshooting

See ../_shared/TROUBLESHOOTING.md if memory_save is not available.

© rohitg00, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in plugin/skills/remember of rohitg00/agentmemory.

  • SKILL.md
  • EXAMPLES.md

Open the folder on GitHubat commit 007a1a7

Compare with similar skills

Save to Long-Term Memory next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Save to Long-Term Memory compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Save to Long-Term Memory this skillrohitg00/agentmemory29k—~600Automated safety check: PassApache-2.0
Custom Mode Creator for claude-memthedotmack/claude-mem98k—~2.4kAutomated safety check: PassApache-2.0
Coding Agent Session Findercode-yeongyu/oh-my-openagent70k1 repos~2.8kAutomated safety check: PassCustom licence
Claude-Mem Cloud Syncthedotmack/claude-mem98k1 repos~1kAutomated safety check: NotesApache-2.0
Cognee CLI Memory Commandstopoteretes/cognee32k1 repos~2.2kAutomated safety check: NotesApache-2.0
Neat-Freak Knowledge CloseoutKKKKhazix/khazix-skills21k—~1.9kAutomated safety check: PassMIT

Similar skills

  • Walks you through creating, installing and verifying a custom claude-mem mode, including note types, tags and optional Telegram alerts for chosen memories.

    98k GitHub stars~2.4k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Coding Agent Session Finder

    code-yeongyu/oh-my-openagent

    Finds, reads and reconstructs past coding-agent sessions across Codex, Claude, OpenCode, Senpi and many other local agent logs.

    70k GitHub starsUsed in 1 repo~2.8k tokens
    Agent WorkflowsAuto-check passed
  • Claude-Mem Cloud Sync

    thedotmack/claude-mem

    Checks claude-mem cloud sync status and guides you through connecting a cmem.ai Pro account without the sync token ever passing through the chat.

    98k GitHub starsUsed in 1 repo~1k tokens
    Agent WorkflowsAuto-check: notes
  • Cognee CLI Memory Commands

    topoteretes/cognee

    Drives cognee from the terminal with remember, recall, forget and improve memory commands, dataset and config management and database migrations.

    32k GitHub starsUsed in 1 repo~2.2k tokens
    Agent WorkflowsAuto-check: notes
  • Neat-Freak Knowledge Closeout

    KKKKhazix/khazix-skills

    Brings project docs, agent rule files, authorized memory and leftover workspace files back in line with what the code and runtime actually do at the end of a work session.

    21k GitHub stars~1.9k tokensUpdated 6 days ago
    Agent WorkflowsAuto-check passed
  • Claude-Mem Search

    thedotmack/claude-mem

    Searches the user's persistent cross-session memory for timestamped observations synthesized from past agent sessions on cmem.ai.

    98k GitHub starsUsed in 1 repo~511 tokens
    Agent WorkflowsAuto-check passed

More from rohitg00/agentmemory

All 17 skills in this repo
  • Sets up and troubleshoots a local agentmemory install, covering the MCP connection, environment variables, ports, authentication and optional feature flags.

    29k GitHub stars~1k tokensUpdated yesterday
    Auto-check: notes
  • Commit Context Lookup

    rohitg00/agentmemory

    Traces a file, function or line back to the agent session behind its current commit, using git blame and a memory lookup, and reports only what the records show.

    29k GitHub stars~522 tokensUpdated yesterday
    Auto-check passed
  • Agent Commit History

    rohitg00/agentmemory

    Lists recent git commits linked to agent sessions, filterable by branch, repository or a result limit, showing the session id and observation count behind each one.

    29k GitHub stars~524 tokensUpdated yesterday
    Auto-check passed
  • Agentmemory Forget

    rohitg00/agentmemory

    Deletes chosen memories from agentmemory only after showing the matches and getting an explicit yes, for privacy requests and cleanup of outdated notes.

    29k GitHub stars~612 tokensUpdated yesterday
    Auto-check passed
  • Session Handoff Resume

    rohitg00/agentmemory

    Resumes the most recent agent session for the current directory, leading with any question left unanswered and ending with a concrete next step.

    29k GitHub stars~678 tokensUpdated yesterday
    Auto-check passed
  • Lesson Memory Recorder

    rohitg00/agentmemory

    Distills a user correction or hard-won rule into a confidence-weighted lesson that resurfaces automatically before similar future work.

    29k GitHub stars~721 tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Save to Long-Term Memory

What does Save to Long-Term Memory do?

Saves an insight, decision or fact to agentmemory with specific concept tags and file paths, so a later recall can find it in a future session. When you ask the agent to remember something, it pulls out the core fact, picks two to five specific lowercase concept phrases, and notes any file paths you mentioned. It then calls the `memory_save` tool with the content, the concepts and the files, keeping your own wording instead of a paraphrase.

When should I use Save to Long-Term Memory?

Save to Long-Term Memory fits situations like: saving a decision or design rationale for later sessions; recording a fact together with the files it relates to; correcting a memory that was saved earlier with outdated information.

How do I install Save to Long-Term Memory in Claude Code?

Run `npx skills add rohitg00/agentmemory --skill remember -a claude-code`. Or copy the skill folder (plugin/skills/remember in rohitg00/agentmemory) into .claude/skills/remember in your project. Claude Code loads it when a task matches its description.

How do I install Save to Long-Term Memory in Codex?

Run `npx skills add rohitg00/agentmemory --skill remember -a codex`. Or copy the skill folder (plugin/skills/remember in rohitg00/agentmemory) into .agents/skills/remember in your project. Codex loads it when a task matches its description.

Can I use Save to Long-Term Memory in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add rohitg00/agentmemory --skill remember -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/remember, .gemini/skills/remember, .github/skills/remember and .opencode/skills/remember in your project.

What does Save to Long-Term Memory need to run?

SKILL.md names no scripts, command-line tools or credentials: Save to Long-Term Memory is instructions for the agent only. Our summary lists: agentmemory with its `memory_save` tool available.

Does Save to Long-Term Memory access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Save to Long-Term Memory safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Save to Long-Term Memory use?

Save to Long-Term Memory is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Save to Long-Term Memory use?

About 600 tokens (SKILL.md is roughly 2.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Save to Long-Term Memory?

Skills that share tags, products or a category with Save to Long-Term Memory: Custom Mode Creator for claude-mem (thedotmack/claude-mem, 98k stars), Coding Agent Session Finder (code-yeongyu/oh-my-openagent, 70k stars), Claude-Mem Cloud Sync (thedotmack/claude-mem, 98k stars) and Cognee CLI Memory Commands (topoteretes/cognee, 32k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Save to Long-Term Memory?

rohitg00 (a GitHub user) maintains it in rohitg00/agentmemory, which has 29,222 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on October 6, 2026.

Source: rohitg00/agentmemory on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.