Back to Blog

automation

Give Your Agent a Memory: memory-init for Claude

Initialize CLAUDE.md, MEMORY.md, and memory/ in one command—give your Claude agent persistent context and daily memory.

OpenAgentSkillPublished:

Where this fits

You're a developer who switches between five projects a week. Every time you open a new directory in Claude Code or Cursor, you have to re-explain the project, your role, and your preferences. The agent forgets everything between sessions, and you waste the first ten minutes of every conversation re-establishing context. memory-init solves this by scaffolding a memory system directly into your working directory—so your agent finally remembers who you are and what you're building.

Why agents benefit

  • Persistent role and context: CLAUDE.md encodes your persona, conversation rules, and a memory protocol, so every new session starts with the same understanding.
  • Structured long-term memory: MEMORY.md acts as a stable store for project facts, decisions, and preferences that survive across chats.
  • Daily memory capture: The memory/ directory organizes notes by day, letting the agent reference what happened yesterday or last week.
  • Interactive setup: The skill asks targeted questions about your role, usage, and style—so the generated files are personalized, not generic templates.
  • Non-destructive checks: It detects existing CLAUDE.md or AGENT.md files and asks before overwriting, avoiding accidental data loss.

Practical scenarios

Onboarding a new project with existing code

You clone a repo and run /memory-init. The skill scans the directory, generates a 2-3 sentence project summary from README and source files, then asks about your role (SA, dev, PM) and communication style. In two minutes you have a CLAUDE.md that makes the agent immediately useful.

Setting up a fresh workspace for daily journaling

You start a new empty folder to track client interactions. The skill notices there's no project content, asks you to describe what the folder is for, and then creates the memory scaffolding. Now you can tell your agent "log today's call" and it appends to memory/2025-04-10.md with the right tone.

Migrating from Cursor to Claude Code

You already use Cursor but want to try Claude Code. The skill optionally generates AGENT.md for Cursor compatibility, so you get the same memory structure in both tools without duplicating effort.

Add it to your agent workflow

Install the skill via npx:

npx skills add yunshu0909/yunshu_skillshub --skill memory-init

Then in any project directory, trigger it:

/memory-init

The interactive flow will ask a few questions and generate CLAUDE.md, MEMORY.md, and memory/. If you need to reset later, just run it again—it will detect existing files and ask before replacing.

Compare before adopting

Before committing to memory-init, compare it against alternatives: check the skill's GitHub stars (752 at time of writing), recent commit activity, and whether the author maintains other useful skills. Also evaluate if the generated structure fits your existing workflow—some teams prefer a single NOTES.md or a custom prompt file. The skill works best for solo developers or small teams using Claude Code or Cursor.

Why it is worth tracking

This skill addresses a universal pain point—agent amnesia—with a pragmatic, low-friction solution. The 752 stars and active maintenance signal a real community need. Track it if you're building agent workflows that require persistent context, and revisit when the author adds support for other agents or memory formats. For a deeper look, see the skill page on OpenAgentSkill.

Featured Skill

memory-init

Skill by yunshu0909