token-saver-memory-dedup

v2026.09.24

Helper skill that deduplicates token-saver memory records before persistence.

GitHub
安装命令
npx skhub add oimiragieo/token-saver-memory-dedup
Markdown
SKILL.md

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:

  • Compares incoming records against patterns.json and gotchas.json
  • Case-insensitive matching for deduplication
  • Returns statistics about total, kept, and filtered records
  • Handles corrupt or missing memory files gracefully

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

  • Before persisting memory records to avoid duplicates
  • As part of the token-saver-context-compression workflow
  • When syncing memory records between sessions

Implementation

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

发现
标签

此技能尚未发布标签。

版本
最新版本元数据

版本

v2026.09.24

发布时间

2026年9月24日

分类

未分类

许可证

未指定

源路径

.claude/skills/token-saver-memory-dedup

默认分支

main

最新提交

64b580e

Tree SHA

42a1df4