From claude-initial-setup
Patterns for structuring MEMORY.md and topic-based memory files for Claude Code persistent memory. Use when the user asks about remembering things across sessions, wants to organize project knowledge, or needs guidance on what to save vs not save.
npx claudepluginhub versoxbt/claude-initial-setup --plugin claude-initial-setupThis skill uses the workspace's default tool permissions.
Claude Code's auto memory system persists knowledge across sessions via files in the memory directory. MEMORY.md is always loaded into context; topic files store detailed notes referenced from MEMORY.md.
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
Claude Code's auto memory system persists knowledge across sessions via files in the memory directory. MEMORY.md is always loaded into context; topic files store detailed notes referenced from MEMORY.md.
MEMORY.md is the index file — always loaded, so it must stay concise (under 200 lines). Use it as a table of contents pointing to detailed topic files:
# Project Memory
## Project Overview
- Name: acme-api
- Stack: Node.js, Express, PostgreSQL, TypeScript
- Test framework: Vitest
- Package manager: pnpm
## Key Conventions
- Use Zod for all input validation
- Repository pattern for database access
- All API responses follow ApiResponse<T> interface
- Feature branches: feat/description, fix/description
## Architecture
- See [architecture.md](./architecture.md) for service layout
- See [database.md](./database.md) for schema notes
## User Preferences
- Prefers functional style over classes
- Always use named exports (no default exports)
- Run tests before committing
## Known Issues
- See [debugging.md](./debugging.md) for recurring problems
Create separate files for detailed knowledge. Link them from MEMORY.md:
memory/
MEMORY.md # Index (always loaded, < 200 lines)
architecture.md # Service layout, module boundaries
database.md # Schema notes, migration patterns
debugging.md # Recurring issues and solutions
patterns.md # Code patterns specific to this project
api-conventions.md # API design decisions
Each topic file should be self-contained:
# Architecture Notes
## Service Layout
- src/services/ — Business logic, one file per domain
- src/routes/ — Express route handlers, thin layer
- src/db/ — Database access via repository pattern
- src/middleware/ — Auth, validation, error handling
## Module Boundaries
- Services never import from routes
- Routes call services, never DB directly
- Middleware is stateless
## Key Dependencies
- src/services/auth.ts depends on src/db/users.ts
- src/services/billing.ts depends on external Stripe SDK
Save to memory when:
Do not save:
Before creating a new memory entry, check if an existing one covers the topic:
# WRONG: Creating duplicates
## Database Notes (added 2024-01-15)
Uses PostgreSQL with Prisma ORM.
## Database Info (added 2024-02-03)
Database is PostgreSQL. Uses Prisma for ORM.
# RIGHT: Update the existing entry
## Database
- PostgreSQL with Prisma ORM
- Migrations in prisma/migrations/
- Seed data in prisma/seed.ts
When the user corrects something you stated from memory, update the source immediately:
User: "No, we switched from Prisma to Drizzle last month"
# IMMEDIATELY update MEMORY.md or the relevant topic file:
# Old: "Database: PostgreSQL with Prisma ORM"
# New: "Database: PostgreSQL with Drizzle ORM"
Never continue with incorrect memory. Fix the source first, then proceed.
Group memories by topic, not by time:
# WRONG: Chronological
## January 15
Learned that project uses TypeScript.
## January 16
Found out tests use Vitest.
# RIGHT: Semantic
## Tech Stack
- Language: TypeScript
- Test framework: Vitest
| File | Purpose | Size Limit |
|---|---|---|
| MEMORY.md | Index, always loaded | < 200 lines |
| Topic files | Detailed knowledge | Unlimited |
Save: Stable patterns, user preferences, architecture decisions, recurring solutions Skip: Session state, unverified guesses, CLAUDE.md duplicates Update: When corrected, when information changes, when patterns evolve Organize: By topic (semantic), not by date (chronological)