harness-memory-maintenance

harness-memory-maintenance is a skill for Claude Code, Codex from jmagly/aiwg. It costs 26 tokens per session (1,401 once invoked), scanned A, original, MIT.

A workflow for auditing and maintaining an AI agent's stored instructions and context, called memory. It reviews ownership, scope, loading paths, cost, uncertainty, and possible cleanup before applying changes.

In plain words
What is it for?
Use it to inspect project, global, or provider memory, review cleanup recommendations, resolve ownership, and apply selected maintenance operations.
Why use it?
It helps find stale, inaccessible, duplicated, or costly memory without deleting records blindly. Reviews and owner checks make cleanup easier to verify and recover from.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Codex.

Good fit Use it to inspect project, global, or provider memory, review cleanup recommendations, resolve ownership, and apply selected maintenance operations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jmagly/aiwg/harness-memory-maintenance
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 jmagly/aiwg --skill harness-memory-maintenance
Clone the repo
git clone --depth 1 https://github.com/jmagly/aiwg

Made for: Claude Code, Codex.

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 harness-memory-maintenance

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/jmagly/aiwg/harness-memory-maintenance"><img src="https://agentmods.dev/badge/skills/jmagly/aiwg/harness-memory-maintenance.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,401 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.00026 $0.01401
Opus 5.5 $0.00010 $0.00560
Sonnet 5.5 $0.00005 $0.00280
Haiku 4.5 $0.00003 $0.00140

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

Security

Grade A, and why

harness-memory-maintenance 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 today.

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.

agentic/code/addons/aiwg-utils/skills/harness-memory-maintenance/SKILL.md · 144 lines

How it starts

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

Harness Memory Maintenance

Discover

Use aiwg memory for harness memory maintenance on every provider. Fetch only the needed section with `aiwg show skill harness-memory-maintenance --section

Audit

Run the requested read-only inventory:

aiwg memory audit --scope project --json
aiwg memory audit --scope global --json
aiwg memory audit --scope provider --provider codex --json

Explain ownership, scope, loading chains, inaccessible or opaque surfaces and uncertainty. Static eligibility does not prove live session loading. Use aiwg memory cost --scope project --json for cost attribution, or aiwg memory recommend --scope project --json for advisory candidates.

Cleanup

Audit the requested scope, then run aiwg memory recommend --scope project --json (or --scope global). Review each candidate's uncertainty, protection, retrieval impact and owner. Cleanup selects explicit operations; it never bulk-deletes memory. Fetch the matching operation section and Review and Apply. Blocked candidates need owner resolution. Global recommendations are advisory; the executable lifecycle currently supports project-owned records only.

Review and Apply

Resolve the exact owner handle from the inventory and owner records. Executable owners are line-memory, compound-memory and semantic-memory. Show global versus project targeting, the before/after diff, owner review requirements and native/next-session limitations before mutation. Never reinterpret a global request as permission to change a project or provider-native source.

Create a reviewed plan, selecting the operation's flags from its section:

aiwg memory plan --owner <owner> --target <handle> --op <operation> --rationale <reason> --reviewer <reviewer> --out <new-plan.json> --json
aiwg memory apply --plan <new-plan.json> --preview --json

Read the full file on GitHub · 144 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. today First seen · 144 lines · 26 tokens per session scan A 9ad50dbb1a94

Subscribe to this mod's changes

harness-memory-maintenance is a skill published in the GitHub repository jmagly/aiwg (225 stars, last pushed today), licensed MIT. It adds 26 tokens to every session and 1,401 once invoked, about $0.0001 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-26.

Related

Other skills, from other repositories