Claude Code Second Brain
Turn Claude Code (or OpenCode) into your personal virtual assistant with persistent memory.
Every time you open Claude Code, it starts from zero. It doesn't know who you are, what you do, or what you were working on yesterday. This system fixes that.
You create a folder. You run a prompt. It interviews you. And from that moment on, Claude Code becomes your assistant — one that remembers your business, your team, your priorities, your tone, and your decisions. Every single session.
I tried it out of curiosity. Now it's the first thing I open every morning.
Versión en español más abajo.
How It Works
The core idea is simple: Claude Code reads files from its working directory at the start of every conversation. If those files contain your context, it already knows everything about you before you type a single word.
This prompt creates a structured file system that acts as Claude's long-term memory — your profile, your business, your priorities, your communication rules, and a log of every important decision you've made.
The 3-Phase Setup
- You paste the prompt from
PROMPT.md into Claude Code
- Claude interviews you — section by section, not all at once — about who you are, what you do, how you work
- Claude builds the entire system from your answers: context files, rules, project folders, templates, and the master brain file
The Interview Covers:
- Who you are and your #1 priority
- Your business, services, and revenue streams
- Your team and how you communicate
- Current priorities, goals, and active projects
- How you want Claude to talk to you (tone, format, pet peeves)
- What tasks eat your time and what you'd delegate first
The File System: How Memory Works
This is the key concept. Claude Code doesn't have a database or a hidden memory layer. Its memory is your file system. Every file in this structure is a piece of context that Claude reads and uses.
📁 your-assistant/
│
├── CLAUDE.md ← THE BRAIN: master config file (~150 lines)
│ Claude reads this FIRST every session.
│ Contains identity, priorities, and pointers
│ to everything else via @ imports.
│
├── CLAUDE.local.md ← Personal overrides (git-ignored, stays local)
│
├── context/ ← LONG-TERM MEMORY: who you are
│ ├── me.md ← Your profile: name, role, timezone, focus
│ ├── work.md ← Your business: company, services, revenue, tools
│ ├── team.md ← Your team: people, roles, communication channels
│ ├── current-priorities.md ← What you're focused on RIGHT NOW (update often)
│ └── goals.md ← Quarterly goals and milestones
│
├── .claude/
│ ├── settings.json ← Claude Code technical settings
│ ├── rules/ ← BEHAVIORAL RULES: how Claude communicates
│ │ ├── tone.md ← e.g., "Direct, no fluff, Spanish internally"
│ │ ├── formatting.md ← e.g., "Bullet points over paragraphs"
│ │ └── writing-style.md ← e.g., "Never use corporate jargon"
│ └── skills/ ← AUTOMATION: reusable task templates (you build these)
│
├── projects/ ← WORKING MEMORY: one folder per active project
│ ├── project-alpha/
│ │ └── README.md ← Brief, goals, status, key decisions
│ └── project-beta/
│ └── README.md
│
├── decisions/
│ └── log.md ← DECISION JOURNAL: append-only log
│ Format: [date] DECISION | REASONING | CONTEXT
│ Claude references this to stay consistent
│
├── templates/ ← REUSABLE TEMPLATES
│ └── session-summary.md ← End-of-session recap template
│
├── references/ ← Reference docs, SOPs, examples
├── sops/ ← Standard Operating Procedures
├── examples/ ← Example outputs for Claude to follow
│
└── archives/ ← NEVER DELETE, always archive
Completed projects move here
Why This Works
| Concept |
How It's Implemented |
| Identity |
CLAUDE.md tells Claude who it is and what it does for you |
| Long-term memory |
context/ files persist your profile across sessions |
| Working memory |
projects/ folders track what you're actively doing |
| Behavioral rules |
.claude/rules/ control tone, format, and style |
| Decision consistency |
decisions/log.md prevents Claude from contradicting past decisions |
| Task automation |
.claude/skills/ store reusable prompts for repeated tasks |
| Knowledge base |
references/, sops/, examples/ feed Claude domain knowledge |
| Continuity |
templates/session-summary.md bridges one session to the next |
The Key Insight
CLAUDE.md is the entry point. It's the first file Claude reads. It contains:
- A one-line identity ("You are Luis's executive assistant")
- The #1 priority everything should support
@context/me.md, @context/work.md, etc. — pointers that load your full context
- Rules about how to behave, where to log decisions, how to maintain itself
Everything else is referenced from CLAUDE.md. This keeps the brain file under 150 lines while giving Claude access to your entire system.
Quick Start
# 1. Clone the repo
git clone https://github.com/your-user/claude-code-second-brain.git my-assistant
# 2. Enter the folder
cd my-assistant
# 3. Open Claude Code
claude
# 4. Paste the contents of PROMPT.md and follow the instructions
Tip: You can also just create an empty folder, open Claude Code there, and paste the prompt directly. No need to clone anything.
After Setup: Keeping It Alive
Your assistant is only as good as the context you give it. Keep these files updated:
| Action |
When |
Update current-priorities.md |
When your focus shifts |
Add entry to decisions/log.md |
When you make an important decision |
Create a skill in .claude/skills/ |
When you repeat a task 3+ times |
Update context/work.md |
When services, tools, or revenue change |
Archive to archives/ |
When a project ends (never delete) |
The Real Power: Skills
Once the system is running, you start building skills — reusable prompts for tasks you repeat. That's where it gets truly powerful.
Examples:
- Weekly Summary → Generates a recap of everything done that week
- Sales Proposal → Creates proposals from a template in your tone
- LinkedIn Post → Adapts content to your voice and audience
- Lead Follow-up → Updates your CRM from conversation
- Client Onboarding → Generates personalized welcome docs
- Invoice Generator → Creates invoices from project data
- Meeting Prep → Pulls context on attendees and agenda items
Compatibility
| Tool |
Supported |
| Claude Code (Anthropic CLI) |
✅ |
| OpenCode |
✅ |
Any tool that reads CLAUDE.md |
✅ |
Contributing
This project is open source. You can share it, fork it, improve it — just credit the author and don't sell it.
See CONTRIBUTING.md for details.
Ideas for contributing:
- Improve the onboarding prompt
- Share reusable skills in
community-skills/
- Create profile variants in
variants/ (freelancer, agency, startup, etc.)
- Translate to other languages
- Document patterns and best practices
License
This project is licensed under CC BY-NC 4.0 (Creative Commons Attribution-NonCommercial 4.0 International).
You can: share, fork, adapt, and redistribute — as long as you credit the author and don't use it commercially.
Author
Created by Luis Salgado — NorteIA / SalgadoIA
Want custom skills like this, tailored to your business?
This is the generic, open-source version. At NorteIA we design custom skills for companies: client onboarding, proposal generation, sales process automation, and much more.
Get in touch at norteia.es or salgadoia.com
Questions? Open an Issue. If you use it and like it, leave a ⭐ — it helps others find it.
Versión en español
Convierte Claude Code (o OpenCode) en tu asistente virtual personal con memoria persistente.
Cada vez que abres Claude Code, empieza de cero. No sabe quién eres, qué haces, ni en qué trabajabas ayer. Este sistema lo soluciona.
Creas una carpeta. Ejecutas un prompt. Te entrevista. Y a partir de ese momento, Claude Code se convierte en tu asistente — uno que recuerda tu negocio, tu equipo, tus prioridades, tu tono y tus decisiones. En cada sesión.
Lo probé por curiosidad y ahora es lo primero que abro cada mañana.
¿Cómo funciona?
La idea central es simple: Claude Code lee los archivos de su directorio de trabajo al inicio de cada conversación. Si esos archivos contienen tu contexto, ya sabe todo sobre ti antes de que escribas una sola palabra.
Este prompt crea un sistema de archivos estructurado que actúa como la memoria a largo plazo de Claude — tu perfil, tu negocio, tus prioridades, tus reglas de comunicación y un log de cada decisión importante que has tomado.
Las 3 fases de configuración
- Pegas el prompt de
PROMPT.md en Claude Code
- Claude te entrevista — sección por sección, no todo de golpe — sobre quién eres, qué haces, cómo trabajas
- Claude construye todo el sistema a partir de tus respuestas: archivos de contexto, reglas, carpetas de proyecto, plantillas y el archivo cerebro principal
La entrevista cubre:
- Quién eres y tu prioridad #1
- Tu negocio, servicios y fuentes de ingresos
- Tu equipo y cómo os comunicáis
- Prioridades actuales, objetivos y proyectos activos
- Cómo quieres que Claude te hable (tono, formato, manías)
- Qué tareas te comen el tiempo y qué delegarías primero
El sistema de archivos: cómo funciona la memoria
Este es el concepto clave. Claude Code no tiene base de datos ni una capa de memoria oculta. Su memoria es tu sistema de archivos. Cada archivo en esta estructura es una pieza de contexto que Claude lee y utiliza.
📁 tu-asistente/
│
├── CLAUDE.md ← EL CEREBRO: archivo de configuración maestro (~150 líneas)
│ Claude lee esto PRIMERO en cada sesión.
│ Contiene identidad, prioridades y punteros
│ a todo lo demás mediante @ imports.
│
├── CLAUDE.local.md ← Overrides personales (ignorado por git, queda local)
│
├── context/ ← MEMORIA A LARGO PLAZO: quién eres
│ ├── me.md ← Tu perfil: nombre, rol, zona horaria, enfoque
│ ├── work.md ← Tu negocio: empresa, servicios, ingresos, herramientas
│ ├── team.md ← Tu equipo: personas, roles, canales de comunicación
│ ├── current-priorities.md ← En qué estás centrado AHORA MISMO (actualiza a menudo)
│ └── goals.md ← Objetivos trimestrales y milestones
│
├── .claude/
│ ├── settings.json ← Configuración técnica de Claude Code
│ ├── rules/ ← REGLAS DE COMPORTAMIENTO: cómo se comunica Claude
│ │ ├── tone.md ← ej: "Directo, sin florituras, español interno"
│ │ ├── formatting.md ← ej: "Bullets antes que párrafos"
│ │ └── writing-style.md ← ej: "Nunca uses jerga corporativa"
│ └── skills/ ← AUTOMATIZACIÓN: plantillas de tareas reutilizables
│
├── projects/ ← MEMORIA DE TRABAJO: una carpeta por proyecto activo
│ ├── proyecto-alfa/
│ │ └── README.md ← Brief, objetivos, estado, decisiones clave
│ └── proyecto-beta/
│ └── README.md
│
├── decisions/
│ └── log.md ← DIARIO DE DECISIONES: log solo-lectura (append-only)
│ Formato: [fecha] DECISIÓN | RAZÓN | CONTEXTO
│ Claude lo consulta para mantener coherencia
│
├── templates/ ← PLANTILLAS REUTILIZABLES
│ └── session-summary.md ← Resumen de fin de sesión
│
├── references/ ← Docs de referencia, SOPs, ejemplos
├── sops/ ← Procedimientos operativos estándar
├── examples/ ← Outputs de ejemplo para que Claude los siga
│
└── archives/ ← NUNCA BORRAR, siempre archivar
Los proyectos completados van aquí
Por qué funciona
| Concepto |
Cómo se implementa |