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.
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
Claude Code looks for memory files in a project-specific directory. The path depends on your operating system and the directory in which you start Claude Code.
If you start Claude Code in the Publii sites/ directory (which I recommend), the memory path is:
- Linux/macOS:
~/.claude/projects/<path-to-sites-directory>/memory/
The path in angle brackets is thesites/directory, with all forward slashes replaced by hyphens.
Example:~/Documents/Publii/sites/→~/.claude/projects/-home-USERNAME-Documents-Publii-sites/memory/ - Windows:
%USERPROFILE%\.claude\projects\<path>\memory\
Steps:
- Create the directory:
mkdir -p ~/.claude/projects/PATH/memory/ - Copy the downloaded
.mdfiles into it - Create (or append to) the file
MEMORY.mdin the same directory with references to the new files – this is the index that Claude Code reads first:
# My Publii Project
## Publii Core Knowledge
- [publii-claude-memory.md](publii-claude-memory.md) – File structure, schema, config, image management
## Homepage Maker 3 Migration (only if relevant)
- [publii-hm3-claude-memory.md](publii-hm3-claude-memory.md) – HM3 conversion, image paths, checklist
- Restart Claude Code – it reads the memory automatically on startup.
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:
- Compare SHA256 checksums (recommended):
The checksums of the original files I published:
publii-claude-memory.md: 154671f082ffe1b494fb7d03cc6fbb3da2610d392404bcb20ba65e539f0a1f45
publii-hm3-claude-memory.md: c29ee208b0306bebf662f7b5c28b3a4322ddfbc4a56848df0cb2e4f60dd10443Verification on Linux/macOS in the terminal:sha256sum publii-claude-memory.mdsha256sum 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.
- 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.
- 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.
