Back to Skills

pact-memory

verified

Persistent memory for PACT agents. Save context, goals, lessons learned, decisions, and entities. Semantic search across sessions. Use when: saving session context, recalling past decisions, searching lessons. Triggers: memory, save memory, search memory, lessons learned, remember, recall

View on GitHub

Marketplace

pact-marketplace

ProfSynapse/PACT-prompt

Plugin

PACT

development

Repository

ProfSynapse/PACT-prompt
37stars

pact-plugin/skills/pact-memory/SKILL.md

Last Verified

January 25, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/ProfSynapse/PACT-prompt/blob/main/pact-plugin/skills/pact-memory/SKILL.md -a claude-code --skill pact-memory

Installation paths:

Claude
.claude/skills/pact-memory/
Powered by add-skill CLI

Instructions

# PACT Memory Skill

Persistent memory system for PACT framework agents. Store and retrieve context,
goals, lessons learned, decisions, and entities across sessions with semantic search.

## Overview

The PACT Memory skill provides:
- **Rich Memory Objects**: Store context, goals, tasks, lessons, decisions, and entities
- **Semantic Search**: Find relevant memories using natural language queries
- **Graph-Enhanced Retrieval**: Memories linked to files are boosted when working on related files
- **Session Tracking**: Automatic file tracking and session context
- **Cross-Session Learning**: Memories persist across sessions for cumulative knowledge

## Quick Start

```python
from pact_memory.scripts import PACTMemory

# Initialize
memory = PACTMemory()

# Save a memory
memory_id = memory.save({
    "context": "Implementing user authentication",
    "goal": "Add JWT refresh token support",
    "lessons_learned": [
        "Redis INCR is atomic - perfect for rate limiting",
        "Always validate refresh token rotation"
    ],
    "decisions": [
        {
            "decision": "Use Redis for token blacklist",
            "rationale": "Fast TTL support, distributed access"
        }
    ],
    "entities": [
        {"name": "AuthService", "type": "component"},
        {"name": "TokenManager", "type": "class"}
    ]
})

# Search memories
results = memory.search("rate limiting tokens")
for mem in results:
    print(f"Context: {mem.context}")
    print(f"Lessons: {mem.lessons_learned}")

# List recent memories
recent = memory.list(limit=10)
```

## Memory Structure

Each memory can contain:

| Field | Type | Description |
|-------|------|-------------|
| `context` | string | Current working context description |
| `goal` | string | What you're trying to achieve |
| `active_tasks` | list | Tasks with status and priority |
| `lessons_learned` | list | What worked or didn't work |
| `decisions` | list | Decisions with rationale and alternatives |
| `entities` | list | Refer

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
10726 chars