myagents-memory-gardener

Prunes and reorganizes long-term memory files in MyAgents workspaces using lint-driven checks.

863|101|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/hAcKlyc/MyAgents --skill myagents-memory-gardener
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: myagents-memory-gardener
Source: https://github.com/hAcKlyc/MyAgents/tree/main/bundled-skills/myagents-memory-gardener
Command: npx skills add https://github.com/hAcKlyc/MyAgents --skill myagents-memory-gardener

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Long-term memory files in an agent workspace grow unbounded over time, causing bloated auto-loaded context, stale rules, and broken topic pointers. This Skill performs periodic 72-hour consolidation passes that delete outdated entries, demote stories to topic files, and merge duplicate rules so the auto-loaded memory layer stays within budget.

Core Features & Use Cases

  • Memory Linting: Runs memory_lint.py to detect budget overruns on MEMORY/USER/SOUL files, missing daily logs despite git activity, overdue gardener or molt runs, stale verified markers, and broken topic pointers.
  • Structured Consolidation: Deletes obsolete rules, demotes case details into memory/topics/, merges same-root rules, and writes a dated run report under memory/gardener/.
  • Safe Git Handling: Records the working-tree baseline, commits only changes attributable to the current maintenance run, and never pushes or touches pre-existing uncommitted edits.
  • Use Case: An agent workspace whose 04-MEMORY.md has grown past its 50KB budget can be audited and trimmed in one run, with stories moved to topic files and a lint report confirming all pointers remain valid.

Quick Start

Ask the agent to run the myagents-memory-gardener skill on this workspace to lint and consolidate the long-term memory files.

Frequently Asked Questions about myagents-memory-gardener

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce the size of an agent's long-term memory file?

Run the memory_lint.py script to identify over-budget files, then delete outdated rules, demote case stories into memory/topics files, and merge same-root rules. The auto-loaded layer keeps only behavior-changing rules with pointers to topic details.

How to check if agent memory files exceed size budgets?

Run `python3 scripts/memory_lint.py --repo <workspace>` to lint the workspace. It reports RED when MEMORY exceeds 50KB, USER exceeds 20KB, or SOUL exceeds 6KB, and WARN when usage passes 85 percent of budget.

Does the memory gardener work in non-git workspaces?

Yes, the lint script detects whether the workspace is a git repository and skips git-dependent checks like activity log-gap detection when it is not. The consolidation workflow also skips the commit step entirely for non-git workspaces.

What is the difference between memory capture, gardener, and molt layers?

The capture layer (UPDATE_MEMORY.md) handles 24-hour session-level increments, the gardener handles 72-hour consolidation of deletions, demotions, and merges, and the molt layer handles 14-day deep reflection that may modify SOUL or core beliefs.

Why does memory lint report broken topic pointers?

The lint script scans the MEMORY file for references to memory/topics/*.md files and flags any that do not exist on disk. This happens when a topic file was deleted or renamed without updating the pointer in the auto-loaded layer.