惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

量子位
Recent Announcements
Recent Announcements
D
Docker
V
V2EX
阮一峰的网络日志
阮一峰的网络日志
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
The GitHub Blog
The GitHub Blog
U
Unit 42
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
月光博客
月光博客
腾讯CDC
B
Blog
博客园_首页
罗磊的独立博客
D
DataBreaches.Net
IT之家
IT之家
酷 壳 – CoolShell
酷 壳 – CoolShell
L
LangChain Blog
aimingoo的专栏
aimingoo的专栏
MongoDB | Blog
MongoDB | Blog
GbyAI
GbyAI
Stack Overflow Blog
Stack Overflow Blog
M
MIT News - Artificial intelligence

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Stop re-explaining your project to Claude Code every session
manja316 · 2026-06-03 · via DEV Community

manja316

You open a new Claude Code session and spend the first ten minutes re-explaining your project. What you're building. Why you chose Postgres over Mongo. That you hate verbose output and want diffs, not essays. That the auth rewrite is a compliance deadline, not tech debt.

Then the session ends and all of it evaporates. Next session, you do it again.

The model isn't the problem — context is. Claude Code starts every conversation as a blank slate. The fix isn't a bigger model or a vector database. It's a small, structured set of plain markdown files that load automatically at session start.

The structure

~/.claude/
  CLAUDE.md                    # custom instructions, loaded every session
  projects/<project>/
    CLAUDE.md                  # project-specific instructions
    memory/
      MEMORY.md                # index — always loaded, kept under 200 lines
      user_profile.md          # who you are, your skills, preferences
      feedback_style.md        # how you want Claude to behave
      project_overview.md      # what you're building, architecture decisions
      reference_links.md       # external resources, API docs, dashboards

Enter fullscreen mode Exit fullscreen mode

No dependencies, no daemon, no cloud. Just files Claude reads on startup.

Four memory types, and one rule that matters most

Type What to store Example
user Your role, skills, preferences "Senior backend dev, prefers Go, hates verbose output"
feedback Corrections you've given Claude "Don't mock the database in tests — use the real DB"
project Ongoing context, deadlines, decisions "Auth rewrite is compliance-driven, not tech debt"
reference Pointers to external resources "Bug tracker is Linear project INGEST"

The single highest-value type is feedback. Every time you correct Claude — "stop doing X," "always do Y" — that correction should become a memory file. That's the difference between an assistant that repeats the same mistake every session and one that learns once and never repeats it.

The index rule (the part people get wrong)

MEMORY.md is the one file loaded into every conversation. So it has exactly one job: be a lean index of pointers, not a content dump.

Keep it under 200 lines. Past that it gets truncated and you silently lose the tail. What goes in the index:

  • One-line links to topic files, each with a short description
  • Critical facts that apply to literally every session

What does not go in the index — or anywhere in memory:

  • Code conventions — Claude reads your code directly
  • File paths and structure — that's what glob/grep are for
  • Git history — git log is authoritative
  • Bug fixes — the fix already lives in the code

If it's derivable from the repo, don't store it. Memory is for the things the code can't tell Claude: who you are, what you've decided and why, and how you want to be worked with.

How it actually plays out

After the one-time setup, you don't manage memory by hand. You say "remember that I prefer X" mid-conversation and Claude writes the file. You correct it once and the correction persists. Review the set monthly — delete what's stale, tighten the index. A lean memory system beats a bloated one every time.

The payoff is mundane and enormous: every session starts with Claude already knowing your project, your standards, and your last six months of decisions. The first ten minutes go away.

Try it

It's free and open source — templates plus a one-command setup:

git clone https://github.com/LuciferForge/claude-code-memory.git
cd claude-code-memory
python3 setup.py

Enter fullscreen mode Exit fullscreen mode

Repo (templates + the index rules in full): https://github.com/LuciferForge/claude-code-memory?utm_source=devto&utm_medium=article&utm_campaign=claude-code-memory-2026-06-01

If you've built your own memory setup for Claude Code, I want to hear how you structure the index — that's the part everyone solves differently.