Token saver memory dedup

From oimiragieo/agent-studio · View interactive version

Token saver memory dedup is an AI agent skill from the GitHub repository oimiragieo/agent-studio. Helper skill that deduplicates token-saver memory records before persistence.

How to use this skill

Skill file

Token Saver Memory Dedup

Deduplicates memory records against existing memory files to prevent duplicate entries.

Purpose

This skill provides the deduplicateAgainstMemory function that filters out memory records that already exist in the memory system:

Usage

const { deduplicateAgainstMemory } = require('./scripts/main.cjs');

const records = {
  patterns: [{ text: 'Use canonical transitions', timestamp: '2026-01-01', source: 'test' }],
  gotchas: [{ text: 'Avoid shell: true for spawn', timestamp: '2026-01-01', source: 'test' }],
  issues: [],
  decisions: [],
};

const { dedupedRecords, stats } = deduplicateAgainstMemory(records, '/path/to/memory');

When to Use

Implementation

Re-exports the deduplicateAgainstMemory function from token-saver-context-compression for module resolution and testing purposes.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.