Skip to content
Back to skills

Skill Update Memory

ASecurity

Auto-update .AGENTS.md files based on code changes.

  • 6 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 9, 2026
ai-agentspythonbash

Works with

  • cursor

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned October 9, 2026

npx -y skills add MatrixFounder/Agentic-development --skill skill-update-memory --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Skill Update Memory?

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

Security grade badge for Skill Update Memory
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/matrixfounder-skill-update-memory/badge)](https://www.skillsdirectory.com/skills/matrixfounder-skill-update-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: skill-update-memory
description: "Auto-update .AGENTS.md files based on code changes."
tier: 2
version: 1.1
---
# 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:**
```bash
python3 .agent/skills/skill-update-memory/scripts/suggest_updates.py
```

**Bootstrap Migration Mode (optional):**
```bash
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

```markdown
### [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.

Files in this skill

  • SKILL.md2.3 KB
  • scripts/suggest_updates.py10 KB

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.

Comments

Loading comments…