agent-memory: Skill for Claude Code

.claude/skills/agent-memory/SKILL.md

agent-memory is a skill for Claude Code from xChuCx/agent-memory. It costs 85 tokens per session (2,387 once invoked), scanned A, original, Apache-2.0.

A repository memory layer that stores project notes, conventions, decisions, and current task context in Markdown files.

In plain words
What is it for?
Use it to load relevant project context at the start of a task and save durable decisions or lessons afterward.
Why use it?
It reduces the need to rediscover project details between coding sessions and helps keep work consistent.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is xChuCx/agent-memory's own configuration. It tells Claude Code how to work on agent-memory itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything agent-memory configures →

Reuse

Borrowing it

Nothing to install: this file belongs to xChuCx/agent-memory. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/xChuCx/agent-memory/main/.claude/skills/agent-memory/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/xChuCx/agent-memory

Made for: Claude Code.

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 agent-memory

README.md
[![agentmods](https://agentmods.dev/badge/skills/xchucx/agent-memory/agent-memory/github.svg)](https://agentmods.dev/skills/xchucx/agent-memory/agent-memory)
Your own site
<a href="https://agentmods.dev/skills/xchucx/agent-memory/agent-memory"><img src="https://agentmods.dev/badge/skills/xchucx/agent-memory/agent-memory/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 agent-memory

Your own site · 80×15
<a href="https://agentmods.dev/skills/xchucx/agent-memory/agent-memory"><img src="https://agentmods.dev/badge/skills/xchucx/agent-memory/agent-memory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,387 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Prompt Injection · line 80
    Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
    Fix: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
  • medium Prompt Injection · line 3
    Subtle instructions detected that may alter agent decision-making or introduce hidden biases.
    Fix: Review content for implicit steering or bias. Ensure instructions are explicit and align with the skill's stated purpose.
How audits are shown
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.00085 $0.02387
Opus 5.5 $0.00034 $0.00955
Sonnet 5.5 $0.00017 $0.00477
Haiku 4.5 $0.00009 $0.00239

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

Security

Grade A, and why

agent-memory 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 1mo 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.claude/skills/agent-memory/SKILL.md · 226 lines

How it starts

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

agent-memory

agent-memory is a local context middleware that maintains a structured, byte-preserving Markdown memory layer for this repository. Your runtime exposes three MCP tools backed by it:

  • memory.fetch_context — read; returns a budgeted Markdown pack drawn from current task state, conventions, decisions, modules, and (on query) the most relevant indexed sections.
  • memory.propose_update — write; submits structured operations that the server validates, secret-scans, and either applies immediately or stages for human review.
  • memory.status — health; reports file counts, pending staged proposals (with drift status), and security/git/lock posture. Call it when you want to know whether memory needs maintenance before proposing more updates.

At session start: always fetch_context with empty query

{ "name": "memory.fetch_context", "arguments": {} }

The empty-query (“bootstrap”) pack contains:

  • local/current.<branch>.md — your last working notes on this branch.
  • local/current.shared.md — cross-branch shared state.
  • conventions.md — project conventions.
  • index.md — summary of the memory layout.

Read it carefully before reading source files. It tells you what the team already decided, what footguns are documented, and where you left off.

When else to fetch_context

Trigger Call
Topic shift mid-task (auth → billing) fetch_context with a query naming the new topic
About to make an architectural decision fetch_context with a query naming the area
Refactoring an unfamiliar module fetch_context with scope: ["<module-path>"]

Do not call fetch_context on every tool call. Once at session start plus query-driven refreshes is the right cadence.

When to propose_update

Pick the intent that matches the situation. Each intent maps to a specific category of memory file and an approval policy.

Situation intent Routes to
Working notes on this task, branch-scoped update_current apply
Working notes that follow you across branches update_shared apply
End-of-task log of what you did session_log apply (path auto-rewritten to sessions/<UTC today>.md)
Hit a footgun future-you should avoid add_pitfall apply (when append_to_section) / stage (when rewriting)
Made a durable architectural decision record_decision stage
Updated facts about a module refresh_module stage
Discovered a team convention update_conventions stage
An older entry is no longer accurate archive_stale stage

Read the full file on GitHub · 226 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. 1mo ago First seen · 226 lines · 85 tokens per session scan A 72356cb4fb98

Subscribe to this mod's changes

agent-memory is a skill published in the GitHub repository xChuCx/agent-memory (15 stars, last pushed 26d ago), licensed Apache-2.0. It adds 85 tokens to every session and 2,387 once invoked, about $0.0003 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-08-31.

Related

Other skills, from other repositories

stella

Self-knowledge for stella, the self-hosted AI assistant. Use when users ask about configuration, setup, onboarding, providers, models, agents, channels, webhooks, memory, schedules, workflows, goals, workers, skills, plugins, session compaction, notifications, self-update, multi-user behavior, or how stella works.…

CherryHQ/stella · 106 tokens

recover-context

Extract full context of the last task from the most recent parent session shown in the session lineage. Strategically uses sub-agents to avoid bloating your own context.

pchalasani/claude-code-tools · 36 tokens

octo-summary

Read, create, find, and cite Octo summaries through octo-cli. Use when an agent needs to create an owner-only summary from explicit channels, discover summaries visible to its bot owner, inspect one summary, retrieve its current body, or ground an answer in returned citation metadata. Load after octo-shared.

Mininglamp-OSS/octo-cli · 68 tokens

weknora-shared

Use when driving a WeKnora RAG server through the weknora CLI as an agent — authenticating, managing knowledge bases / documents / sessions / agents, running search or chat, or interpreting the CLI's JSON envelopes and exit codes. Read this before any other weknora- skill.

Tencent/WeKnora · 68 tokens

weknora-rag-search

Use when retrieving from or asking questions against a WeKnora knowledge base via the weknora CLI — and especially when unsure whether to use chat, session ask, or search chunks for a given goal.

Tencent/WeKnora · 54 tokens

memory-index

Index a folder's contents into the MemPalace semantic memory for search and retrieval. Use this skill whenever the user asks to "index a folder", "index a directory", "index memory", "mine a project into memory", "make a folder searchable", "embed a folder", "ingest code into the palace", or "index this directory for…

dimetron/pi-go · 0 tokens