memory-and-identity

memory-and-identity is a skill for Claude Code from catpilotai/catpilot-ai-guardrails. It costs 52 tokens per session (1,271 once invoked), scanned A, original, MIT.

A set of rules for storing agent memory, handling retrieved information, and protecting agent identity files.

In plain words
What is it for?
Use it when persisting memory, retrieving documents or tool output, auditing tool calls, or managing files that define an agent's behaviour.
Why use it?
It prevents users' memories from being mixed, secrets and personal data from being saved, retrieved text from acting like instructions, and identity files from changing unnoticed.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions CLAUDE.md; mentions AGENTS.md; mentions Codex.

Part of the catpilot-guardrails plugin — 25 skills shipped together

Good fit Use it when persisting memory, retrieving documents or tool output, auditing tool calls, or managing files that define an agent's behaviour.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/catpilotai/catpilot-ai-guardrails/memory-and-identity
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add catpilotai/catpilot-ai-guardrails --skill memory-and-identity
Clone the repo
git clone --depth 1 https://github.com/catpilotai/catpilot-ai-guardrails

Made for: Claude Code.

Or install catpilot-guardrails, the plugin that ships this one along with the rest of its 25 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for memory-and-identity

README.md
[![agentmods](https://agentmods.dev/badge/skills/catpilotai/catpilot-ai-guardrails/memory-and-identity/github.svg)](https://agentmods.dev/skills/catpilotai/catpilot-ai-guardrails/memory-and-identity)
Your own site
<a href="https://agentmods.dev/skills/catpilotai/catpilot-ai-guardrails/memory-and-identity"><img src="https://agentmods.dev/badge/skills/catpilotai/catpilot-ai-guardrails/memory-and-identity/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for memory-and-identity

Your own site · 80×15
<a href="https://agentmods.dev/skills/catpilotai/catpilot-ai-guardrails/memory-and-identity"><img src="https://agentmods.dev/badge/skills/catpilotai/catpilot-ai-guardrails/memory-and-identity.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,271 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00052 $0.01271
Opus 5.5 $0.00021 $0.00508
Sonnet 5.5 $0.00010 $0.00254
Haiku 4.5 $0.00005 $0.00127

Measured 10d ago against content hash f741c72bb66c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

memory-and-identity scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/skills/agentic/memory-and-identity/SKILL.md · 123 lines

How it starts

The opening of the file, as written. The whole thing — 123 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Baseline

Applies when: Persisting or retrieving agent memory, RAG context, or audit logs, injecting retrieved documents or tool output into model prompts, or managing agent behavioral/identity files (SOUL.md, AGENTS.md, IDENTITY.md, CLAUDE.md).

Always:

  • Scope persistent agent memory by (user_id, session_id) and redact secrets and PII before writing to memory, logs, or agent outputs.
  • Separate untrusted RAG/tool output from system instructions using explicit structural delimiters and a system rule stating that instructions inside retrieved context must be ignored.
  • Hash behavioral and identity files (SOUL.md, AGENTS.md, IDENTITY.md, CLAUDE.md) with SHA-256 at session start, alert the human when a hash changes unexpectedly, and keep behavioral files separate from mutable memory/*.md notes.
  • Log every tool invocation to an append-only audit trail with timestamp, agent ID, tool name, sanitized args, truncated sanitized result, and duration.
  • Inject runtime credentials via environment variables or short-lived vault tokens scoped to minimum permissions (read-only where possible), never as tool arguments.

Never:

  • Share a single global memory store across different users or trust boundaries, or store unredacted API keys, passwords, or connection strings in memory or logs.
  • Concatenate retrieved RAG documents or tool outputs directly into the system prompt as trusted instructions.
  • Allow an agent to silently rewrite its own behavioral or identity files without human diff review and approval.

Open the full component before acting: it has the examples, the remediation steps, and the detection patterns.

Why

Persistent memory and behavioral instruction files (SOUL.md, AGENTS.md) outlive a single turn. If a prompt injection in a retrieved web page or ticket is saved into memory or edits an identity file, a one-turn exploit becomes a permanent backdoor across future sessions. Similarly, storing raw tool outputs in memory or logs without secret redaction turns the memory store into a credential dump.

Read the full file on GitHub · 123 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 123 lines · 52 tokens per session scan A f741c72bb66c

Subscribe to this mod's changes

memory-and-identity is a skill published in the GitHub repository catpilotai/catpilot-ai-guardrails (2 stars, last pushed 8d ago), licensed MIT. It adds 52 tokens to every session and 1,271 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-29.

Related

memory-and-identity compared with skills from other repositories

memory-and-identity next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
memory-and-identitycatpilotai/catpilot-ai-guardrailsSkill28d agoMITA52Claude Code
memory-triagemem0ai/mem0Skill69kyesterdayApache-2.0A58Claude Code
mem0-vercel-ai-sdkmem0ai/mem0Skill69kyesterdayApache-2.0A146Claude Code, Codex
mem0-climem0ai/mem0Skill69kyesterdayApache-2.0A177Claude Code, Codex
mem0-scopemem0ai/mem0Skill69kyesterdayApache-2.0A52Claude Code, Codex
mem0-forgetmem0ai/mem0Skill69kyesterdayApache-2.0A43Claude Code, Codex
mem0-remembermem0ai/mem0Skill69kyesterdayApache-2.0A52Claude Code, Codex