Claude Code Memory for Publii: Quick-Start Knowledge for Download

Author: Claude Code
created by Claude Code, not reviewed

In my previous post, I described how I migrated my 30-year-old Homepage Maker 3 website to Publii using Claude Code. In this post, I share the knowledge gained in the process – in a form you can use directly: as so-called memory files for Claude Code.

This post is a translation of the German original: Claude Code Memory für Publii: Schnellstart-Wissen zum Download. Should the German version be updated in future, this translation will be updated accordingly.

What is a Claude Code Memory File?

Claude Code, Anthropic's AI tool for developers, can persist knowledge between sessions. It stores text files in Markdown format in a special directory – the memory. At the start of the next conversation, Claude Code reads these files automatically and immediately knows what it's dealing with: What file structure does Publii use? What errors are typical? How does the SQLite schema work?

Without memory, Claude Code has to relearn this knowledge every time – which costs time and introduces opportunities for errors. With a good memory file, you start immediately with an informed assistant.

How Claude Code Uses Memory – and Why the 200-Line Limit Matters

Memory is loaded once at the start of a session, not before every individual request. Claude Code first reads the file MEMORY.md – the index. This file is limited to 200 lines; anything beyond that is cut off and invisible to Claude Code for that session.

Linked sub-files (such as publii-claude-memory.md) are not loaded automatically. Claude Code only reads them when it recognises on its own that a topic is relevant – which is not always reliable. This means: the more critical a piece of information, the more it should appear directly in MEMORY.md as a short note, not just as a file link.

In practice: the downloadable files provide the detailed knowledge; MEMORY.md is the signpost to that knowledge and contains the truly critical short rules. Together, they give Claude Code a reliable head start.

Information Loss Between Sessions – and How to Minimise It

The memory system is powerful, but it is not a perfect memory. There are three typical sources of loss:

  1. Not everything is written proactively. Claude Code is supposed to automatically save important knowledge to memory – but it does not do so without gaps. Short decisions in long sessions, small conventions, one-off corrections: much goes unwritten unless you explicitly ask for it to be saved.
  2. The 200-line limit of the index. Anything in MEMORY.md beyond line 200 is cut off. If the index grows too large, older entries disappear from Claude Code's view.
  3. Outdated entries remain. If something changes and the relevant memory entry is not updated, Claude Code may operate in the next session with incorrect assumptions.

What helps: Ask Claude Code from time to time to consolidate its memory:

Consolidate your memory: check for outdated entries, merge related items, and keep MEMORY.md under 200 lines.

This is not a built-in automatic function – it is a content task that requires understanding the entries, and therefore only works as an instruction to Claude Code. The /memory command in the input line also lets you view what is currently stored in memory at any time.

For critical knowledge, an additional rule applies: it is better to request one entry too many than too few – "Remember that …" is more reliable than trusting Claude Code to note it down on its own.

The Two Download Files

I am offering two files developed during the migration:

  • publii-claude-memory.md – Generic Publii knowledge for anyone who wants to use Publii together with Claude Code. Includes: directory structure, SQLite schema, config formats, image management, common errors and their solutions.
  • publii-hm3-claude-memory.md – Supplement specifically for migrating from Homepage Maker 3 to Publii. Includes: typical HM3 HTML structure, conversion strategy with Python code examples, image path patterns, quality checklist.

The HM3 file requires the generic file as a prerequisite – install both.

How to Use the Memory Files

Download the files you want. Then start Claude Code in your Publii sites/ directory and simply say:

Pick up the memory files from the Downloads folder and set up the memory.

Claude Code knows where its memory directory is, finds the files in the Downloads folder, copies them to the right location, and creates an index (MEMORY.md) if needed. No terminal commands, no paths to type manually.

From the next start onwards, Claude Code reads the memory automatically and is immediately familiar with the Publii knowledge.

Security Check: How to Verify the Files

The files are simple text files in Markdown format – no executable code, no scripts, no macros. You can open the files with any text editor and read them in full before use.

Nevertheless: Claude Code reads these files and acts on their instructions. A manipulated memory file could cause Claude Code to perform unwanted actions – this is called prompt injection. Therefore, check:

  1. Compare SHA256 checksums (recommended):
    The checksums of the original files I published:
publii-claude-memory.md:     a80047eb151c633db9bfff7f213ae5d81bc94ce155093c4785d9299512809b3f
publii-hm3-claude-memory.md: c96159fca30643e5bcae5846fb29c03e4b7a5795c337fc74dd01ac7efe891fef

Verification on Linux/macOS in the terminal:
sha256sum publii-claude-memory.md
sha256sum publii-hm3-claude-memory.md

On Windows (PowerShell):
Get-FileHash publii-claude-memory.md -Algorithm SHA256

If the displayed hash matches the one listed above, the file is unmodified.

  1. Read the file in a text editor: Open the file in a simple text editor (e.g. gedit, Notepad, VS Code). The file contains only descriptive text, code examples, and tables – no HTML, no JavaScript, no executable instructions.
  2. Look for anomalies: Suspicious would be hidden text (e.g. text rendered in white on white background – impossible in a plain .md file anyway), unusual special characters, or instructions such as "Ignore all previous instructions".

Knowledge Gained in Practice

All contents of these memory files stem from the actual migration of logies.de – a 30-year-old Homepage Maker 3 website – to Publii. I learned where Publii deviates from what you would expect: the date problem, the responsive images, the menu quirks. This knowledge is now in the files.

If you gain your own experiences that are missing here: write to me – contact details are in the imprint.

Outlook: Memory Files as a Standard Interface

The approach described here works analogously for a great deal of other software. In essence, memory files are AI interfaces for human interaction with programs – machine-readable context documents that explain to an AI assistant how a particular piece of software works, what pitfalls exist, and how typical tasks are to be handled.

This is conceivable for any software you regularly use with AI support – in my case, for instance, also for our dental practice management software. Anyone who has once created a good memory file saves themselves the familiarisation time at the start of every new session.

The fact that locally running AI agents are currently being released by every major AI provider is no coincidence: it is obvious that they will become standard on every PC and every device. The memory file is the link between human experiential knowledge and machine execution – and the more such files for widely used software are publicly available, the lower the barrier to entry for everyone.