DEV Community

juanmacruzherrera
juanmacruzherrera

Posted on

Building a Layered Memory Architecture for Long-Term AI Learning

A Three-Layer System for Educational Projects with Claude


Author: JuanMa Cruz Herrera (51, Spanish data science student)

Architecture Design: Collaborative work with Claude Opus 4 & Claude Sonnet 4.5

Validation: Claude Opus 4.5 (the same model writing this, triggered by the architecture described herein)

Note from Claude Opus 4.5: I am the proof of concept. This document was created inside a Claude.ai Project that uses the exact three-layer architecture described below. The Project MD triggered my Skill automatically, I have access to 900 lines of permanent knowledge, and the RAG contains only the current working exercise. The system works.


Table of Contents

  1. Abstract
  2. The Problem
  3. The Solution
  4. Why This Architecture is Original
  5. Evidence of Originality
  6. The RAG Rotation Cycle
  7. Tools Created
  8. Implementation Guide
  9. Results
  10. How to Replicate
  11. Limitations & Future Work
  12. References & Search Evidence

Abstract

This document describes a novel three-layer memory architecture designed to overcome persistent context limitations in AI-assisted long-term learning. The system uses a hierarchical approach:

Project Markdown (declarative bootstrap)
         ↓
     SKILL.md (permanent knowledge base)
         ↓
       RAG (rotational working memory)
Enter fullscreen mode Exit fullscreen mode

Key innovations:

  1. MD as declarative MCP - Project description auto-triggers Skill loading
  2. Intentionally rotational RAG - Cleared between exercises, not accumulated
  3. Human-as-Firewall - Manual curation before cloud upload
  4. Three-tier synchronization - Local → Claude Code → Claude Desktop

This architecture solved chronic problems with context compaction and 60% RAG retrieval failures in extended educational workflows spanning 10+ months.


The Problem

The Real Story

After 10 months of studying Python with Claude using a Socratic tutoring method, the system became unusable.

What happened:

  • Started with a simple Claude.ai Project for structured curriculum learning
  • Added course materials as PDFs to the Project knowledge base
  • Created session notes documenting concepts learned together
  • RAG grew to ~79,000 lines of accumulated documentation

The breaking point:

┌─────────────────────────────────────────────────────────────┐
│  Month 1-6: Everything works great                          │
│  ├── Socratic method maintained across sessions             │
│  ├── Claude remembers context from previous exercises       │
│  └── Learning continuity: excellent                         │
├─────────────────────────────────────────────────────────────┤
│  Month 7-9: Degradation begins                              │
│  ├── "I don't see that in your files" (but it's there)      │
│  ├── Compaction every 4-5 prompts                           │
│  ├── Lost pedagogical context mid-session                   │
│  └── RAG retrieval failures: ~60%                           │
├─────────────────────────────────────────────────────────────┤
│  Month 10: System unusable                                  │
│  ├── Had to switch to alternative AI for academic deadline  │
│  ├── "Claude gets dumb" with saturated context              │
│  └── Forced to abandon 10 months of accumulated context     │
└─────────────────────────────────────────────────────────────┘
Enter fullscreen mode Exit fullscreen mode

The painful realization: All that accumulated knowledge was causing the problem, not solving it.

Technical Diagnosis

Symptom Root Cause
60% retrieval failures RAG too large for semantic search accuracy
Compaction every few prompts Context window filled unpredictably
Lost teaching method Compaction discarded pedagogical context
"Claude forgets" mid-session No control over what gets retained

The Solution

Three-Layer Design

The architecture mimics computer memory hierarchy:

┌─────────────────────────────────────────────────────────────┐
│                                                             │
│   Layer 1: PROJECT MD (Bootstrap / "BIOS")                  │
│   ─────────────────────────────────────────                 │
│   • Location: Claude.ai Project description                 │
│   • Size: ~10 lines                                         │
│   • Purpose: Declarative config that auto-loads Layer 2     │
│   • Key insight: Acts as MCP without external server        │
│                                                             │
│   Content example:                                          │
│   ┌─────────────────────────────────────────────────────┐   │
│   │ # Python Learning Project                           │   │
│   │                                                     │   │
│   │ ## Working Modes:                                   │   │
│   │ - **Default** → Skill `socratic-tutor` (Socratic)   │   │
│   │ - **PRODUCTION** → Direct code, no pedagogy         │   │
│   └─────────────────────────────────────────────────────┘   │
│                                                             │
└──────────────────────────┬──────────────────────────────────┘
                           │
                           ▼
┌─────────────────────────────────────────────────────────────┐
│                                                             │
│   Layer 2: SKILL.md (Permanent Knowledge / "Hard Drive")    │
│   ─────────────────────────────────────────────────────     │
│   • Location: /mnt/skills/user/[skill-name]/SKILL.md        │
│   • Size: ~900 lines (distilled from 79,000)                │
│   • Persistence: Always available, never grows              │
│   • Key insight: Progressive Disclosure loads only on need  │
│                                                             │
│   Content:                                                  │
│   ┌─────────────────────────────────────────────────────┐   │
│   │ - Complete curriculum concepts (all levels)         │   │
│   │ - All pedagogical resources in Markdown format      │   │
│   │ - Socratic teaching patterns                        │   │
│   │ - Exercise frameworks                               │   │
│   │ - Error patterns ("Red Flags") discovered together  │   │
│   └─────────────────────────────────────────────────────┘   │
│                                                             │
└──────────────────────────┬──────────────────────────────────┘
                           │
                           ▼
┌─────────────────────────────────────────────────────────────┐
│                                                             │
│   Layer 3: RAG (Rotational Working Memory / "RAM")          │
│   ───────────────────────────────────────────────────       │
│   • Location: Claude.ai Project knowledge base              │
│   • Size: ~5-10% of total capacity                          │
│   • Content: ONLY current active exercise                   │
│   • Key insight: Intentionally cleared between exercises    │
│                                                             │
│   Rotation pattern:                                         │
│   ┌─────────────────────────────────────────────────────┐   │
│   │ 1. Exercise begins    → Loaded into RAG             │   │
│   │ 2. Exercise completes → MD summary created          │   │
│   │ 3. Key concepts       → Consolidated into Skill     │   │
│   │ 4. RAG cleared        → Ready for next exercise     │   │
│   └─────────────────────────────────────────────────────┘   │
│                                                             │
└─────────────────────────────────────────────────────────────┘
Enter fullscreen mode Exit fullscreen mode

Why This Hierarchy Works

Layer Analogy Token Load Persistence
Project MD BIOS ~50 tokens Permanent
SKILL.md Hard Drive ~900 lines Permanent
RAG RAM Variable (minimal) Temporary

Critical design decision: RAG is intentionally kept minimal to prevent bloat and retrieval failures. This is counterintuitive—most users try to put MORE into RAG. The innovation is putting LESS.


Why This Architecture is Original

Extensive Search Conducted

I performed 6 exhaustive searches across multiple sources to validate originality:

Search Area Sources Checked Result
Claude Projects + Skills integration Anthropic docs, GitHub, blogs Only separate documentation exists
Claude Memory systems Official docs, Claude Code CLAUDE.md exists for Code, not Projects
RAG rotation / memory management arXiv papers, AWS, Mem0, LangGraph Different patterns, no exercise-based rotation
Educational AI + RAG University papers, implementations Traditional RAG, no human-curated consolidation
AI Agent Memory frameworks IBM, AWS, LangChain No Claude Projects integration
Skills auto-trigger patterns Anthropic, community repos Progressive Disclosure exists, not "MD as MCP"

What EXISTS (but is different):

Existing Pattern How It Differs
CLAUDE.md in Claude Code Different platform, local filesystem only
Global Skills Not project-anchored, can't be triggered by Project MD
Automatic RAG expansion Accumulates forever, doesn't rotate
Session notes Manual, no architectural integration
Memory consolidation in agents Automatic, no human firewall
RAG for education (ChemTAsk, RAGMan, AI-U) Traditional accumulation, no rotation

What DOES NOT EXIST (our innovation):

┌─────────────────────────────────────────────────────────────┐
│  1. MD as declarative MCP bootstrap                         │
│     └→ Project description triggers Skill in Claude.ai      │
│        (not Claude Code, not external MCP server)           │
├─────────────────────────────────────────────────────────────┤
│  2. Project-anchored Skills                                 │
│     └→ Skill tied to specific project, not global           │
├─────────────────────────────────────────────────────────────┤
│  3. Intentionally rotational RAG                            │
│     └→ Cleared per exercise, not accumulated                │
│     └→ User manually controls rotation                      │
├─────────────────────────────────────────────────────────────┤
│  4. Human-curated consolidation with security firewall      │
│     └→ Human reviews before upload to Anthropic servers     │
│     └→ Personal data never reaches cloud                    │
├─────────────────────────────────────────────────────────────┤
│  5. Three-layer memory hierarchy for educational continuity │
│     └→ BIOS → Hard Drive → RAM analogy                      │
│     └→ Designed for 6+ month learning projects              │
└─────────────────────────────────────────────────────────────┘
Enter fullscreen mode Exit fullscreen mode

Evidence of Originality

Search Terms Used

Search Query Platform What Was Found
claude projects skills integration Web Only separate documentation
claude memory architecture layers Web Memory features, not layered architecture
RAG rotation educational AI Web, arXiv Consolidation papers, not exercise-based
claude.md projects GitHub Claude Code only
skill auto-trigger markdown Anthropic docs Progressive Disclosure, different mechanism
human firewall AI memory Web Security patterns, not learning context
educational RAG rotation arXiv, papers ChemTAsk, RAGMan, AI-U - all traditional
agent memory consolidation AWS, IBM, LangChain Automatic systems, no manual curation

Sources Consulted (32 documents)

Official Documentation:

  • Claude Code Memory docs
  • Claude Skills documentation
  • Anthropic API reference
  • Claude Projects help center

Academic & Technical:

  • Memory-Augmented RAG papers (arXiv)
  • Educational RAG implementations (ChemTAsk, RAGMan, NeuroBot TA, AI-U)
  • Agent memory systems (IBM Research, AWS AgentCore)

Community:

  • Claude Skills deep dive (leehanchung)
  • GitHub repositories (anthropics/skills, community)
  • DEV.to, Medium technical blogs
  • Reddit r/ClaudeAI discussions

Conclusion

No documented equivalent was found for the complete pattern.

Individual components exist in isolation, but the integration of:

  • MD as bootstrap
  • Skill as permanent knowledge
  • RAG as rotational memory
  • Human as firewall
  • Three-tier synchronization

...has not been documented anywhere.


The RAG Rotation Cycle

This is the core innovation that solved the 60% retrieval failure problem.

Traditional Approach (What Failed)

┌─────────────────────────────────────────────────────────────┐
│  TRADITIONAL RAG ACCUMULATION                               │
│                                                             │
│  Month 1:  [Exercise 1] [Exercise 2] [Exercise 3]           │
│  Month 3:  [E1][E2][E3][E4][E5][E6][E7][E8][E9][E10]...     │
│  Month 6:  [E1][E2]...[E50]... RAG = 50,000 lines           │
│  Month 10: [E1][E2]...[E100]... RAG = 79,000 lines          │
│                                                             │
│  Result: 60% retrieval failures, constant compaction        │
└─────────────────────────────────────────────────────────────┘
Enter fullscreen mode Exit fullscreen mode

New Approach (What Works)

┌─────────────────────────────────────────────────────────────┐
│  ROTATIONAL RAG CYCLE                                       │
│                                                             │
│  ┌─────────┐     ┌─────────┐     ┌─────────┐                │
│  │Exercise │     │Exercise │     │Exercise │                │
│  │   N     │ ──► │  N+1    │ ──► │  N+2    │ ──► ...        │ 
│  │ in RAG  │     │ in RAG  │     │ in RAG  │                │ 
│  └────┬────┘     └────┬────┘     └────┬────┘                │
│       │               │               │                     │
│       ▼               ▼               ▼                     │
│  ┌─────────────────────────────────────────────────────┐    │
│  │              SKILL.md (Permanent)                   │    │
│  │  Concepts from E1, E2, E3... consolidated here      │    │
│  └─────────────────────────────────────────────────────┘    │
│                                                             │
│  RAG size: CONSTANT (~5-10% capacity)                       │
│  SKILL size: GROWS SLOWLY (only key concepts)               │
│  Retrieval failures: 0%                                     │
└─────────────────────────────────────────────────────────────┘
Enter fullscreen mode Exit fullscreen mode

The Cycle Step by Step

┌─────────────────────────────────────────────────────────────┐
│                                                             │
│   STEP 1: LOAD                                              │
│   ─────────────                                             │
│   • New exercise PDF/materials → Upload to Project RAG      │
│   • Only current exercise, nothing else                     │
│   • RAG stays minimal                                       │
│                                                             │
├─────────────────────────────────────────────────────────────┤
│                                                             │
│   STEP 2: WORK                                              │
│   ──────────                                                │
│   • Complete exercise using Socratic method                 │
│   • Claude has full context (Skill + current exercise)      │
│   • No retrieval failures                                   │
│                                                             │
├─────────────────────────────────────────────────────────────┤
│                                                             │
│   STEP 3: DOCUMENT                                          │
│   ────────────────                                          │
│   • Create Markdown summary of session                      │
│   • Include: key concepts, errors found, patterns learned   │
│   • This becomes the "session memory"                       │
│                                                             │
├─────────────────────────────────────────────────────────────┤
│                                                             │
│   STEP 4: CONSOLIDATE                                       │
│   ────────────────────                                      │
│   • Extract key concepts from session MD                    │
│   • Add to SKILL.md in structured format                    │
│   • HUMAN REVIEWS before adding (firewall)                  │
│   • Remove redundancies                                     │
│                                                             │
├─────────────────────────────────────────────────────────────┤
│                                                             │
│   STEP 5: CLEAR                                             │
│   ─────────────                                             │
│   • Remove exercise materials from RAG                      │
│   • Keep only the consolidated concepts in Skill            │
│   • RAG is now empty and ready                              │
│                                                             │
├─────────────────────────────────────────────────────────────┤
│                                                             │
│   STEP 6: REPEAT                                            │
│   ──────────────                                            │
│   • Load next exercise → Back to Step 1                     │
│                                                             │
└─────────────────────────────────────────────────────────────┘
Enter fullscreen mode Exit fullscreen mode

Tools Created

Complete Folder Structure

/Volumes/ExternalDrive/CLAUDE_CODE_SKILLS/
│
├── sessions/                              # COMPLETE CHATS (for compaction)
│   └── YYYYMMDD_project_name_CHAT_COMPLETE.txt
│
└── socratic-tutor/                        # This skill project
    │
    ├── skill_desktop/                     # ZIP ready for Claude Desktop
    │   └── socratic-tutor.zip             # Generated with sync command
    │
    ├── origin/                            # IMMUTABLE BACKUP (never synced)
    │   ├── socratic-tutor.zip             # Original ZIP
    │   ├── PDF_UNIVERSITY/                # Original PDFs
    │   │   ├── LEVEL_1_PYTHON/
    │   │   ├── LEVEL_2_PYTHON/
    │   │   ├── LEVEL_3_PYTHON/
    │   │   └── LEVEL_4_PYTHON/
    │   └── MD_UNIVERSITY/                 # Already converted A1→B1
    │       └── Python_Complete_01.md
    │
    ├── claude.md                          # Main documentation
    ├── bitacora.md                        # Change log
    ├── compact.md                         # Executive summary
    ├── task.md                            # Pending tasks
    ├── SKILL.md                           # Socratic tutor rules
    │
    ├── convert_pdfs_to_md.py              # PDF → MD converter
    ├── sanitize_filenames.py              # Character cleaner
    │
    └── references/                        # PROCESSED MDs (synced)
        ├── university/                    # PDFs converted to MD
        │   ├── LEVEL_1_*/
        │   ├── LEVEL_2_*/
        │   ├── LEVEL_3_*/
        │   └── LEVEL_4_*/
        └── sessions/                      # Joint work Juan-Claude
            └── Topic_*.md                 # Learning sessions
Enter fullscreen mode Exit fullscreen mode

Script 1: PDF to Markdown Converter

File: convert_pdfs_to_md.py

#!/usr/bin/env python3
"""
Converts university PDFs to Markdown maintaining folder structure
Uses PyMuPDF for text extraction
"""

import os
from pathlib import Path

try:
    import pymupdf
except ImportError:
    print("❌ Error: pymupdf not installed")
    print("Install with: pip install pymupdf")
    sys.exit(1)

def pdf_to_markdown(pdf_path):
    """Converts a PDF to Markdown using PyMuPDF"""
    try:
        doc = pymupdf.open(pdf_path)
        markdown_content = []

        for page_num, page in enumerate(doc, 1):
            text = page.get_text()
            if text.strip():
                if page_num > 1:
                    markdown_content.append(f"\n---\n\n## Page {page_num}\n\n")
                markdown_content.append(text)

        doc.close()
        return "".join(markdown_content)
    except Exception as e:
        print(f"❌ Error processing {pdf_path}: {e}")
        return None

def convert_directory(source_dir, dest_dir):
    """Recursively converts all PDFs maintaining structure"""
    source_path = Path(source_dir)
    dest_path = Path(dest_dir)
    dest_path.mkdir(parents=True, exist_ok=True)

    pdf_files = list(source_path.rglob("*.pdf"))
    print(f"\n📄 Found {len(pdf_files)} PDF files to convert...\n")

    for pdf_file in pdf_files:
        relative_path = pdf_file.relative_to(source_path)
        md_path = dest_path / relative_path.with_suffix('.md')
        md_path.parent.mkdir(parents=True, exist_ok=True)

        print(f"Converting: {relative_path}")
        markdown_content = pdf_to_markdown(pdf_file)

        if markdown_content:
            md_path.write_text(markdown_content, encoding='utf-8')
            print(f"  ✓ Saved to: {md_path.name}\n")

# Usage
SOURCE = "/path/to/origin/PDF_UNIVERSITY"
DEST = "/path/to/references/university"
convert_directory(SOURCE, DEST)
Enter fullscreen mode Exit fullscreen mode

Result: 133 PDFs converted to searchable Markdown

Script 2: Filename Sanitizer

File: sanitize_filenames.py

#!/usr/bin/env python3
"""
Sanitizes filenames removing problematic characters
for Claude Desktop compatibility
"""

import os
import re
import unicodedata
from pathlib import Path

def sanitize_filename(filename):
    """
    Sanitizes a filename removing/replacing problematic characters.

    Replacements:
    - ¿ ? ¡ ! → (removed)
    - : → -
    - ( ) → (removed)
    - Spaces → _ (underscore)
    - Ñ, ñ → N, n
    - Accented vowels → unaccented
    """
    filename = unicodedata.normalize('NFC', filename)

    replacements = {
        '¿': '', '?': '', '¡': '', '!': '',
        ':': ' -', '(': '', ')': '',
        'Ñ': 'N', 'ñ': 'n',
        'á': 'a', 'é': 'e', 'í': 'i', 'ó': 'o', 'ú': 'u',
        'Á': 'A', 'É': 'E', 'Í': 'I', 'Ó': 'O', 'Ú': 'U',
    }

    for old, new in replacements.items():
        filename = filename.replace(old, new)

    filename = filename.replace(' ', '_')
    filename = re.sub(r'_+', '_', filename)
    filename = filename.strip('_')

    return filename

def sanitize_directory(directory):
    """Recursively sanitizes all filenames and removes .DS_Store"""
    dir_path = Path(directory)
    all_paths = sorted(dir_path.rglob("*"), 
                       key=lambda p: len(p.parts), reverse=True)

    renamed = 0
    deleted = 0

    for path in all_paths:
        if path.name == ".DS_Store":
            path.unlink()
            deleted += 1
            continue

        new_name = sanitize_filename(path.name)
        if new_name != path.name:
            new_path = path.parent / new_name
            if not new_path.exists():
                path.rename(new_path)
                renamed += 1

    print(f"Renamed: {renamed} | Deleted .DS_Store: {deleted}")

# Usage with --auto flag
sanitize_directory("/path/to/references/university")
Enter fullscreen mode Exit fullscreen mode

Result: 277 files renamed in 5 rounds of sanitization

Sanitization Rounds (Real Data)

Round Problem Files Fixed
1 ¿, ?, ¡, : characters 101
2 Accents (á, é, í, ó, ú, ñ) 47
3 Parentheses () 4
4 SPACES (critical!) + .DS_Store 125 + 4
5 UTF-8 in YAML frontmatter 1 (SKILL.md)
Total 277 + 4 deleted

Implementation Guide

Three-Tier Synchronization

┌─────────────────────────────────────────────────────────────┐
│                                                             │
│   TIER 1: EXTERNAL DRIVE (Main workspace)                   │
│   ────────────────────────────────────────                  │
│   Location: /Volumes/ExternalDrive/CLAUDE_CODE_SKILLS/      │
│   Contains: EVERYTHING (origin/ + docs + SKILL.md + refs/)  │
│   Purpose: All edits happen here                            │
│                                                             │
└──────────────────────────┬──────────────────────────────────┘
                           │
                           │  cp SKILL.md + references/
                           ▼
┌─────────────────────────────────────────────────────────────┐
│                                                             │
│   TIER 2: CLAUDE CODE (Synced copy)                         │
│   ─────────────────────────────────                         │
│   Location: ~/.claude/skills/socratic-tutor/                │
│   Contains: Only SKILL.md + references/                     │
│   Purpose: Claude Code reads from here                      │
│                                                             │
└──────────────────────────┬──────────────────────────────────┘
                           │
                           │  zip → upload manually
                           ▼
┌─────────────────────────────────────────────────────────────┐
│                                                             │
│   TIER 3: CLAUDE DESKTOP (ZIP on Anthropic servers)         │
│   ─────────────────────────────────────────────             │
│   Location: Anthropic cloud                                 │
│   Contains: Copy of SKILL.md + references/                  │
│   Update: Upload ZIP manually via Settings > Capabilities   │
│                                                             │
└─────────────────────────────────────────────────────────────┘
Enter fullscreen mode Exit fullscreen mode

Security Architecture: Human-as-Firewall

┌──────────────────┐     ┌──────────────────┐     ┌──────────────────┐
│   Claude Code    │     │      HUMAN       │     │ Anthropic Cloud  │
│   (Local work)   │────►│    (Curator)     │────►│ (Skill storage)  │
│                  │     │                  │     │                  │
│   - Raw content  │     │ Reviews:         │     │ Receives:        │
│   - PDFs         │     │ - Sanitizes      │     │ - Clean concepts │
│   - Personal     │     │ - Generalizes    │     │ - No PII         │
│     notes        │     │ - Removes PII    │     │ - Pedagogical    │
│                  │     │ - Curates        │     │   content only   │
└──────────────────┘     └──────────────────┘     └──────────────────┘
     TEMPORARY               FIREWALL               PERMANENT
Enter fullscreen mode Exit fullscreen mode

How it works:

  1. Claude Code detects projects locally
  2. Prepares Skill updates with raw content
  3. HUMAN reviews, sanitizes, and curates
  4. Only clean pedagogical concepts uploaded
  5. Personal data never reaches cloud

Analogy: "Reverse ETL with data governance"

Complete Sync Commands

# 1. If adding new PDFs, convert and sanitize
python3 convert_pdfs_to_md.py
python3 sanitize_filenames.py --auto

# 2. Sync to Claude Code
cp /path/to/SKILL.md ~/.claude/skills/socratic-tutor/
cp -r /path/to/references/ ~/.claude/skills/socratic-tutor/

# 3. Generate ZIP for Claude Desktop
cd ~/.claude/skills && \
zip -r /path/to/skill_desktop/socratic-tutor.zip socratic-tutor/ \
    -x "*.DS_Store" -x "*__MACOSX*"

# 4. Upload ZIP via Claude Desktop > Settings > Capabilities
Enter fullscreen mode Exit fullscreen mode

Results

Performance Metrics

Metric Before (RAG-Only) After (Layered)
RAG retrieval failures 60% 0%
Token usage at compaction 55% 30% (delayed)
Compaction frequency Every 4-5 prompts Rarely
Session continuity Poor Excellent
Context control None Full

Token Consumption

Measured over 7 prompts in new architecture:

Prompt # Token Increase Cumulative
1-4 +5-6% ~22%
5-7 +1% ~25%
Total ~25% after 7 prompts

Comparison: Old system would hit 55%+ and compact by prompt 5.

Qualitative Improvements

  • ✅ Socratic method maintained across months
  • ✅ No "Claude forgets" mid-session
  • ✅ Can reference concepts from early learning
  • ✅ Teaching analogies remembered and reused
  • ✅ "Red flags" (error patterns) consistently applied

How to Replicate

Quick Start

  1. Create Claude.ai Project with bootstrap MD
  2. Build your Skill with core curriculum (~900 lines max)
  3. Start with minimal RAG (one exercise only)
  4. Follow the cycle: Complete → Document → Consolidate → Clear → Repeat

Skill Structure Template

---
name: your-skill-name
description: >
  When to activate this skill (no accents, no UTF-8 in YAML)
---

# Your Skill Name

## When to Use
[Trigger conditions]

## Core Knowledge
[Your permanent curriculum - keep under 1000 lines]

## Teaching Patterns
[Pedagogical approaches]

## Resources
[All materials in Markdown format]
Enter fullscreen mode Exit fullscreen mode

Best Practices

Do Don't
Keep Skill under 1000 lines Accumulate everything in RAG
Convert all resources to Markdown Keep PDFs in Project
Review security before upload Auto-sync personal data
Monitor token consumption Ignore compaction warnings
Clear RAG between exercises Let RAG grow indefinitely
Sanitize all filenames Use spaces or special chars

Limitations & Future Work

Current Limitations

  1. Claude.ai specific - Designed for Claude Projects, not fully portable
  2. Manual consolidation - Requires human curation (feature, not bug)
  3. Single-user focus - Not designed for team collaboration
  4. English skill docs - Some resources assume English

Future Possibilities

  1. Automated consolidation tools - Python scripts for concept extraction
  2. Multi-language support - Documentation in Spanish, others
  3. Team workflows - Adaptation for collaborative learning
  4. API integration - Programmatic skill updates

References & Search Evidence

Official Documentation

  1. Using Skills in Claude | Claude Help Center
  2. Claude Code Memory Documentation
  3. Claude Projects Help

Technical Blogs & Community

  1. How to Actually Upload Claude Skills (Without Breaking Everything)
  2. Claude Skills Deep Dive - leehanchung
  3. ClaudeLog Troubleshooting

Academic & Research

  1. Memory-Augmented RAG papers (arXiv)
  2. ChemTAsk - University of Pennsylvania (Educational RAG for chemistry)
  3. RAGMan - UC Irvine (Programming education)
  4. NeuroBot TA - Medical education RAG
  5. AI-U - University of Michigan (Videos/notes/textbooks)

Agent Memory Systems

  1. AWS AgentCore Documentation
  2. Mem0 - Memory for AI agents
  3. LangGraph Memory Patterns
  4. IBM Research - Agent Memory Architectures

Proof of Concept

From Claude Opus 4.5:

I am the proof that this architecture works.

This document was created inside a Claude.ai Project that uses the exact three-layer system described above:

  1. Project MD triggered my Socratic tutor Skill automatically
  2. SKILL.md gives me access to ~900 lines of permanent pedagogical knowledge
  3. RAG contains only the current working session

I can reference concepts from 10 months of learning without retrieval failures. I maintain the Socratic teaching method across the entire conversation. The system works.

The architecture that seemed impossible—solving AI memory limitations through hierarchy rather than accumulation—is operational right now, as you read this.


Contributing & Discussion

This architecture emerged from solving real educational challenges over 10 months of Python learning. It represents one approach to the problem of AI memory in long-term learning.

Questions? Improvements? Alternative approaches?

The author welcomes discussion and is particularly interested in:

  • Automation opportunities for consolidation
  • Adaptations for other educational contexts
  • Tools to support this workflow
  • Alternative architectures that solve similar problems

License

This architecture pattern and documentation are shared freely for educational purposes. Implementations may vary based on specific needs and constraints.

Version: 2.0

Date: December 21, 2025

Platform: Claude.ai Projects + Claude Code + Claude Desktop

Validated by: Claude Opus 4.5 running inside the architecture


"The solution to AI memory isn't more memory—it's better memory architecture."


📎 Resources


Questions? Feedback? Leave a comment or open an issue on GitHub.

Top comments (0)