skill-update-memory

A tool that detects code changes and suggests updates to .AGENTS.md files, which store instructions and context for coding agents in a project.

In plain words
What is it for?
Use it before committing or during review to find changed files, identify their nearest context files, generate update templates, and optionally create missing files under selected source directories.
Why use it?
It keeps agent guidance aligned with the source code so future sessions are less likely to rely on outdated project knowledge.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/matrixfounder/agentic-development/skill-update-memory
Any agent
npx skills add MatrixFounder/Agentic-development --skill skill-update-memory
Clone the repo
git clone --depth 1 https://github.com/MatrixFounder/Agentic-development

Made for: Claude Code, Codex.

Per session 16 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 560 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00016 $0.00560
Opus 5 $0.00008 $0.00280
Sonnet 5 $0.00003 $0.00112
Haiku 4.5 $0.00002 $0.00056

Measured 2d ago against content hash 160ae0e4c490, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

skill-update-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 2d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/suggest_updates.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.agent/skills/skill-update-memory/SKILL.md · 75 lines

How it starts

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

Update Memory Skill

Purpose

Prevent "Agent Amnesia" by keeping .AGENTS.md context files synchronized with code changes.

When to Use

  • Before committing code (Developer).
  • During Code Review (Reviewer).
  • In 04-update-docs workflow.

Strategy: Automated Detection + Manual Description

Phase 1: Detect Changes

Tool: scripts/suggest_updates.py

Usage:

python3 .agent/skills/skill-update-memory/scripts/suggest_updates.py

Bootstrap Migration Mode (optional):

python3 .agent/skills/skill-update-memory/scripts/suggest_updates.py --mode bootstrap --create-missing --development-root src

Output:

  • Identifies modified source files (ignoring build artifacts).
  • Groups them by the closest .AGENTS.md (or suggested per-directory target in source folders).
  • Generates a template for the update.
  • In bootstrap mode, can create missing .AGENTS.md files without overwriting existing ones.
  • Creation/suggestions are limited to explicit development roots (--development-root, default: src).
  • /.agent/skills/* and /.cursor/skills/* are always excluded from memory target creation.

[!NOTE] .AGENTS.md remains optional. If it does not exist, the helper must not fail.

Phase 2: Generate Description (.AGENTS.md Update)

For each file listed by the script:

  1. Identify Change Type:
    • New File -> Create entry.
    • Modified Logic -> Update description/functions.
    • Deleted -> Mark as (Deleted).
  2. Write Description:
    • Focus on Purpose (Why does it exist?).
    • List public Classes/Functions.

Phase 3: Preservation

[!IMPORTANT] NEVER delete sections marked [Human Knowledge] or <!-- PRESERVE -->.

Append new information below manual annotations.

Example Update

### [new_service.py]
**Purpose:** Handles user authentication.
**Classes:**
- `AuthService` — Main entry point.
  - `login()` — Validates credentials.

Integration

  • Code Review: Reviewer runs script to check if docs match code changes.
  • Pre-Commit: Developer runs script to ensure no "Undocumented Code" is committed.
  • Migration/Onboarding: Run bootstrap mode for external projects to create initial .AGENTS.md skeletons in source folders.

Read the full file on GitHub · 75 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2d ago First seen · 75 lines · 16 tokens per session scan A 160ae0e4c490

Subscribe to this mod's changes

skill-update-memory is a skill published in the GitHub repository MatrixFounder/Agentic-development (5 stars, last pushed 19d ago), licensed Apache-2.0. It adds 16 tokens to every session and 560 once invoked, about $0.0001 per session on Opus 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

add-tests

Generates tests for existing code. Analyzes the target function, method, or class to identify the happy path, error cases, and edge cases, then writes test cases following the project's testing framework and naming conventions. Invoked when the user asks to add tests, write tests, cover code, or increase coverage.

soulcodex/agentic · 67 tokens

nunit-api-design

Use when adding or modifying public API surface in NUnit — new or changed constraints, attributes, assertions, helpers, or any type/member visibility change. Covers the conventions NUnit maintainers enforce for types that ship to consumers of the framework.

nunit/nunit · 51 tokens

review-offered-task

Review a task that has been offered to you and decide whether to accept or reject it.

desplega-ai/agent-swarm · 22 tokens

company-hiring-intelligence

Reverse-engineer what a company is building by scraping their job postings, careers page, LinkedIn Jobs, and engineering blog using TinyFish web agents. Use whenever a user wants to understand a company's strategic direction from hiring signals, do competitive intelligence, figure out a tech stack from job…

tinyfish-io/tinyfish-cookbook · 169 tokens

Swift Performance Optimization Skill

Use when investigating measured Swift or Apple-platform regressions in CPU, memory, launch, scrolling, animation hitches, image processing, energy, networking, or concurrency, or when designing performance tests and Instruments experiments. Do not use for speculative micro-optimization, ordinary refactoring, or a…

termio-sh/termio · 68 tokens

app-screenshot-debug

Drive the running termio app via AppleScript / System Events to reach a UI state (focus the window, click a sidebar project, a terminal pane, a control), capture a pixel-accurate screenshot of just that window, and read it back for visual analysis — for diagnosing layout / spacing / alignment / 'this looks ugly'…

termio-sh/termio · 161 tokens