Self-Evolving Codebase Memory
Give Claude Code a long-term memory that grows every session, extracts lessons from your conversations, and answers questions from a compiled wiki instead of re-scanning your codebase.
Before & after
Same prompt, same agent — the only difference is the skill.
That's a good question. Most teams rely on git commit messages or documentation wikis, but those get outdated fast. You could set up a decision log or read through your PRs from that time period. Some teams use architecture decision records, or ADRs, to formally document why they made choices. You'd need to decide what decisions matter enough to capture, and then someone has to write and maintain that documentation. It's hard to keep it current unless you build it into your workflow somehow.
CODEBASE MEMORY SYSTEM (auto-compiled) SESSION-START HOOK → Loads agents.md (active decision-makers, CTO priorities) + index.md (compiled concepts wiki) → Runs at every session start; you see relevant architectural context before you code AUTO-CAPTURED (per session) → Session SDK logs end-of-session Claude summary: "Architecture questions answered today: X vs. Y trade-off, reason we chose Z" → Daily log saved to logs/2026-07-31.md (session summary + decisions made) WIKI PROMOTION (nightly flush) → Last 7 days of daily logs → concepts and connections wiki (Obsidian) → Example: "Why we chose Postgres over DynamoDB" promoted as a permanent wiki entry → Backlinks auto-added: "Postgres decision" links to "scaling strategy", "transaction guarantees", "team SQL expertise" QUERY FROM MEMORY (instant) Asked: "How did we justify the auth refactor last quarter?" Clause answers in 3 sec: "See kb/auth-refactor-decision.md (May 2026); context was security audit X and team capacity Z; alternative we considered was Y. Linked issues: security-audit-5, sprint-23, onboarding-refactor." OBSIDIAN GRAPH VIEW → See your architectural concepts as a visual network → "Data layer" connects to "caching strategy", "backup procedures", "API contracts" → Hover over nodes to see decision timeline CUSOMIZATION vault_root: /your-repo/.claude-memory log_retention: 30 days before wiki promotion flush_frequency: Nightly at midnight UTC hook_prompts: Tuned to ask about trade-offs and alternatives codebase_scope: This repo + shared monorepo (if applicable) RESULT: New engineer onboarding cut from 2 weeks to 4 days (can query the memory instead of code archaeology)
About this skill
name: self-evolving-codebase-memory description: Give Claude Code a long-term memory that grows every session, extracts lessons from your conversations, and answers questions from a compiled wiki instead of re-scanning your codebase.
Self-Evolving Codebase Memory
What This Does
Inspired by the original author's LLM knowledge bases idea, the creator builds a session-start hook that loads agents.md and a compiled index.md, plus pre-compact and session-end hooks that call the Claude Agent SDK to summarize each conversation into a daily log. A flush process promotes those logs into a concepts and connections wiki with backlinks in Obsidian.
What You Get
- SessionStart hook loading agents.md and index.md
- PreCompact and SessionEnd hooks calling Claude Agent SDK to summarize
- daily log MD files per session
- flush process into concepts and connections wiki
- Obsidian graph view of the codebase memory
Customize
- vault_root: where the wiki lives
- log_retention: how long daily logs stay before promotion
- flush_frequency: how often logs promote into wiki
- hook_prompts: what the SDK asks for at compact and session end
- codebase_scope: which repos this memory covers
Sample Output
Asked what to watch out for in the project, Claude answers in 10 seconds citing three specific KB articles instead of grepping the git log.
Target Audience
Developers who want per-codebase long-term memory for Claude Code
SKILL.md preview
---
name: self-evolving-codebase-memory
description: Use this skill when setting up or operating a long-term codebase memory system that compiles session lessons into a searchable wiki instead of re-scanning the repository each time.
version: 1.0.0
category: Memory/Knowledge
author: AgentVolt
license: proprietary
tags:
- memory
- knowledge
- standard
---
# Self-Evolving Codebase Memory
Gives the agent a growing memory of a codebase: session summaries accumulate into daily logs, and a periodic flush promotes them into a linked wiki the agent reads from instead of re-scanning the repo.
## When to use
… (sign up to view the full skill)More ai & agents skills
View all AI & Agents skills →Obsidian Emerge Idea Surfacer
Give Claude Code your Obsidian vault and let it surface ideas you have been circling for months but never actually named.
AI Starter Toolkit
A free, curated starting point — the essential prompts and habits to get real value from AI on day one.
ChatGPT Mastery Kit
The fastest way to go from casual ChatGPT user to power user, with 50+ proven prompt patterns.
Skill Status Report
Scan every skill in a project and report which pass validation, which are stale, and which lack required metadata.