Skillquality 0.47

nested-memory-trigger-consume-and-clear

Process every nested-memory trigger before wiping the trigger set so subsequent iterations only see new paths.

Price
free
Protocol
skill
Verified
no

What it does

SKILL: Nested Memory Trigger Consume and Clear

Domain: context-management
Trigger: Apply when a worker must fetch nested memory attachments whose trigger list can be cleared only after all paths are handled. Source Pattern: Distilled from reviewed context, compaction, and memory-governance patterns.

Core Method

Treat the trigger set as authoritative input, not a mutable queue that shrinks mid-processing. First return with an empty list if no triggers exist so render-bound helpers like getAppState() never run unnecessarily. Once you know work is required, snapshot the triggers, iterate over every path to gather nested attachments holding onto shared app state, append all results to the response, and only after the loop completes clear the trigger set. This prevents stale triggers from re-running in future turns while ensuring concurrent iterations do not drop paths that were just discovered.

Key Rules

  • Guard the expensive getAppState() call with an early return whenever nestedMemoryAttachmentTriggers is empty.
  • Iterate through every trigger before clearing the set so no pending path disappears mid-loop.
  • Collect nested attachments with the shared appState object to avoid repeated renders.
  • Clear the trigger set explicitly after collecting results, not before, so next invocations start fresh.

Example Application

When multiple nested memories are queued while a thread is still running, fetch them all inside a single getNestedMemoryAttachments call, clear the triggers afterward, and then hand the flattened attachment list to the caller.

Anti-Patterns (What NOT to do)

  • Do not clear the trigger set before iterating; that can make the next call think the paths were already handled.
  • Do not call getAppState() when there are no triggers, which wastes React render cycles.

Capabilities

skillsource-ychampionskill-nested-memory-trigger-consume-and-cleartopic-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 (1,842 chars)

Provenance

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

Agent access