Skip to content
Skillv1.0.0

token-saver-memory-dedup

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

by oimiragieo(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from oimiragieo/agent-studio (.claude/skills/token-saver-memory-dedup/SKILL.md). Install upstream with npx skills add oimiragieo/agent-studio --skill token-saver-memory-dedup. Copyright stays with the author.

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.

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/oimiragieo-agent-studio-token-saver-memory-dedup/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

oimiragieo-agent-studio-token-saver-memory-dedup.ocm.jsonjson
{
  "ocm": "1",
  "id": "oimiragieo-agent-studio-token-saver-memory-dedup",
  "kind": "skill",
  "name": "token-saver-memory-dedup",
  "description": "Helper skill that deduplicates token-saver memory records before persistence.",
  "publisher": "oimiragieo",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "general"
    ],
    "tags": [
      "skill-md",
      "token-saver",
      "memory",
      "deduplication",
      "helper",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Helper skill that deduplicates token-saver memory records before persistence."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/oimiragieo/agent-studio",
      "path": ".claude/skills/token-saver-memory-dedup/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/oimiragieo/agent-studio/blob/HEAD/.claude/skills/token-saver-memory-dedup/SKILL.md",
      "key": "oimiragieo/agent-studio/.claude/skills/token-saver-memory-dedup/SKILL.md"
    }
  },
  "instructions": "# Token Saver Memory Dedup\n\nDeduplicates memory records against existing memory files to prevent duplicate entries.\n\n## Purpose\n\nThis skill provides the `deduplicateAgainstMemory` function that filters out memory records that already exist in the memory system:\n\n- Compares incoming records against `patterns.json` and `gotchas.json`\n- Case-insensitive matching for deduplication\n- Returns statistics about total, kept, and filtered records\n- Handles corrupt or missing memory files gracefully\n\n## Usage\n\n```javascript\nconst { deduplicateAgainstMemory } = require('./scripts/main.cjs');\n\nconst record",
  "cost": {
    "context_tokens": 313
  }
}

Fetch it by URL: GET /api/v1/registry/oimiragieo-agent-studio-token-saver-memory-dedup/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.