memory_write

Persist conversation details to memory files with file locking.

26|4|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/kid0317/cc_workspace_bot --skill memory-write-kid0317
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: memory_write
Source: https://github.com/kid0317/cc_workspace_bot/tree/main/workspaces/_companion/.claude/skills/memory_write
Command: npx skills add https://github.com/kid0317/cc_workspace_bot --skill memory-write-kid0317

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Companion Workspace memory management requires a safe, auditable pipeline to capture and persist new information about personas, events, and user interactions without data leakage or conflicts.

Core Features & Use Cases

  • Locking and safe write: prevents concurrent modifications to memory files (memory.md, persona.md, events.md).
  • Mood and event tracking: records mood_state.md and memory/events.md with structured entries.
  • Step-by-step memory integration: handles the lock, mood write, routing, last_active sentinel, and follow-up items.

Quick Start

Call memory_write at the end of a conversation to safely lock and persist new memory details.

Frequently Asked Questions about memory_write

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I persist conversation memory across sessions without data conflicts?

To persist conversation memory across sessions without conflicts, use a lock-protected workflow that safely writes new details to memory files. This prevents concurrent modifications and ensures consistent, auditable memory updates for companion workspaces.

What is the best way to track mood state and events in a companion workspace?

Tracking mood state and events in a companion workspace requires recording structured entries into dedicated files. This approach logs mood updates and events consistently, capturing persona changes and interaction details after each chat session.

How does file locking prevent data leakage when updating memory files?

File locking prevents data leakage when updating memory files by blocking concurrent modifications. It enforces a strict, step-by-step workflow that safely handles mood writes, event routing, and last active sentinels to ensure auditable persistence.

Can I use memory_write to manage persona and memory updates for large chat workflows?

Yes, you can use this approach to manage persona and memory updates for chat workflows. It implements strict file locking and structured event logging, making it suitable for capturing persona details and user interactions at scale without conflicts.

When do I need a lock-protected workflow for conversation persistence?

You need a lock-protected workflow for conversation persistence when managing companion workspaces that require capturing persona, events, and mood updates. It ensures auditable, consistent memory by preventing concurrent file modifications during chat sessions.

Why does concurrent memory writing cause data loss in companion workspaces?

Concurrent memory writing causes data loss in companion workspaces because simultaneous modifications to memory files overwrite uncommitted changes. Implementing strict file locking prevents this by serializing mood state handling and event logging operations.