Skip to content

opensite-ai/opensite-skills / memory

memory

Verified

The OpenSite persistent long-term memory store. Provides a hierarchical filesystem tree for all agent memories across four cognitive layers: episodic (session history), semantic (project/tech/user knowledge), procedural (decisions, workflows, conventions), and working (active session state). Use this skill to directly read, write, search, or inspect memory entries. For automated session capture use memory-write; for context retrieval before a task use memory-recall; for periodic maintenance use memory-consolidate.

FileKindSize
.gitignoreother780 B
README.mdmarkdown1.4 KB
SKILL.mdskill md5.2 KB
meta/.gitkeepother0 B
scripts/consolidate.pyscript7.4 KB
scripts/list_memories.pyscript2.4 KB
scripts/search_memory.pyscript7.6 KB
scripts/write_memory.pyscript8.2 KB

scripts/list_memories.py

View on GitHub
#!/usr/bin/env python3
"""
list_memories.py — List all memories with optional filtering and brief summaries.

Usage:
    python list_memories.py
    python list_memories.py --type semantic --brief
    python list_memories.py --project opensite-api
"""
import argparse
import re
import sys
from collections import defaultdict
from datetime import datetime
from pathlib import Path

SCRIPT_DIR = Path(__file__).resolve().parent
MEMORY_ROOT = SCRIPT_DIR.parent / "store"


def parse_frontmatter(text):
    fm = {}
    m = re.match(r"^---\n(.*?)\n---", text, re.DOTALL)
    if m:
        for line in m.group(1).splitlines():
            if ": " in line:
                k, _, v = line.partition(": ")
                fm[k.strip()] = v.strip()
    return fm


def list_memories(memory_type=None, project=None, brief=False):
    if not MEMORY_ROOT.exists():
        print(f"⚠️  Memory store not found at {MEMORY_ROOT}")
        return

    entries = []
    for md_file in sorted(MEMORY_ROOT.rglob("*.md")):
        try:
            text = md_file.read_text(encoding="utf-8", errors="ignore")
        except Exception:
            continue
        fm = parse_frontmatter(text)
        if memory_type and memory_type != "all" and fm.get("type") != memory_type:
            continue
        if project and fm.get("project", "null") != project:
            continue
        entries.append((md_file, fm))

    by_type = defaultdict(list)
    for f, fm in entries:
        by_type[fm.get("type", "unknown")].append((f, fm))

    for mtype, items in sorted(by_type.items()):
        print(f"\n▸ {mtype.upper()} ({len(items)} entries)")
        print("─" * 60)
        for f, fm in items:
            rel = str(f.relative_to(MEMORY_ROOT.parent))
            title = fm.get("title", f.stem)
            created = fm.get("created", "?")
            conf = fm.get("confidence", "high")
            print(f"  {title}")
            if not brief:
                print(f"  Path:  {rel}")
                print(f"  Date:  {created}  |  Confidence: {conf}")
                print(f"  Tags:  {fm.get('tags', 'none')}")
                print()


if __name__ == "__main__":
    parser = argparse.ArgumentParser(description="List memory store entries")
    parser.add_argument("--type", default=None)
    parser.add_argument("--project", default=None)
    parser.add_argument("--brief", action="store_true")
    args = parser.parse_args()
    list_memories(memory_type=args.type, project=args.project, brief=args.brief)
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall