Skillquality 0.47

mark-after-filter-memory-deduplication

Filter prefetched memory attachments against cumulative read state before mutating that state, so async surfacing does not dedupe itself away.

Price
free
Protocol
skill
Verified
no

What it does

SKILL: Mark-After-Filter Memory Deduplication

Domain: context-management
Trigger: Apply when asynchronously prefetched memories or file attachments must be deduplicated against a cumulative read-state cache that they will also update after surviving the filter. Source Pattern: Distilled from reviewed context, compaction, and memory-governance patterns.

Core Method

When prefetch results need to consult a cumulative "already seen" index, treat that index as read-only during selection. First filter the candidate attachments against the existing state, then write only the survivors into the shared cache. This breaks the self-referential cycle where a prefetch marks everything as seen before dedupe runs, causing the filter to delete the very data it just found. Keep the dedupe state cumulative across the whole turn so later iterations and future turns still suppress genuine repeats.

Key Rules

  • Read from the shared dedupe state during filtering, but do not mutate it until the final survivor set is known.
  • Update the shared cache only for attachments that actually survive the filter and remain eligible for surfacing.
  • Use a cumulative state store that includes earlier loop iterations and prior surfaced memories, not just the current batch.
  • Keep the mutation step adjacent to the filter so future maintainers cannot reintroduce self-poisoning writes inside the prefetch path.

Example Application

If a background document selector prefetches five candidate help files while the main agent is still running tools, first drop any files already present in the session's read-state map. Only after that should you record the surviving files in the map, ensuring they surface once now and stay suppressed on later retries.

Anti-Patterns (What NOT to do)

  • Do not mark prefetched files as read before duplicate filtering; the filter will see its own writes and erase the whole batch.
  • Do not dedupe only against the current iteration's attachments; you need cumulative session state to avoid resurfacing files already read by tools or earlier turns.

Capabilities

skillsource-ychampionskill-mark-after-filter-memory-deduplicationtopic-agent-skillstopic-ai-agentstopic-clitopic-coding-agentstopic-context-engineeringtopic-developer-toolstopic-mcptopic-multi-agenttopic-terminal-ui

Install

Quality

0.47/ 1.00

deterministic score 0.47 from registry signals: · indexed on github topic:agent-skills · 34 github stars · SKILL.md body (2,092 chars)

Provenance

Indexed fromgithub
Enriched2026-04-22 00:56:52Z · deterministic:skill-github:v1 · v1
First seen2026-04-18
Last seen2026-04-22

Agent access