soul-in-sapphireGeneric long-term memory (LTM) operations for OpenClaw using Notion (2025-09-03 data_sources). Use for durable memory writes/search, emotion-state ticks, jou...
Install via ClawdBot CLI:
clawdbot install NEXTAltair/soul-in-sapphireUse this skill to persist and retrieve durable memory in Notion, and to maintain emotion/state + journal records.
This skill is not only a storage utility. Its core purpose is:
In short: record -> recall -> adapt.
The goal is continuity and growth, not archival volume.
NOTION_API_KEY (or NOTION_TOKEN)2025-09-03~/.config/soul-in-sapphire/config.jsonnotion-api-automation (scripts/notionctl.mjs is executed via local child process)NOTIONCTL_PATH (if set, uses explicit notionctl path instead of default sibling skill path)Create (or let setup create) these databases under the same parent page:
-mem -events -emotions -state -journal -mem (durable memory)Purpose: store high-signal long-term memory.
Properties:
Name (title)Type (select): decision|preference|fact|procedure|todo|gotchaTags (multi-select)Content (rich_text)Source (url, optional)Confidence (select: high|medium|low, optional) -events (what happened)Purpose: record meaningful triggers from work/conversation.
Properties:
Name (title)when (date)importance (select: 1..5)trigger (select): progress|boundary|ambiguity|external_action|manualcontext (rich_text)source (select): discord|cli|cron|heartbeat|otherlink (url, optional)uncertainty (number)control (number)emotions (relation -> -emotions)state (relation -> -state) -emotions (felt response)Purpose: attach one or more emotion axes to one event.
Properties:
Name (title)axis (select): arousal|valence|focus|confidence|stress|curiosity|social|solitude|joy|anger|sadness|fun|painlevel (number)comment (rich_text)weight (number)body_signal (multi-select): tension|relief|fatigue|heat|coldneed (select): safety|progress|recognition|autonomy|rest|noveltycoping (select): log|ask|pause|act|deferevent (relation -> -events) -state (snapshot after interpretation)Purpose: save the current interpreted state after events/emotions.
Properties:
Name (title)when (date)state_json (rich_text)reason (rich_text)source (select): event|cron|heartbeat|manualmood_label (select): clear|wired|dull|tense|playful|guarded|tenderintent (select): build|fix|organize|explore|rest|socialize|reflectneed_stack (select): safety|stability|belonging|esteem|growthneed_level (number)avoid (multi-select): risk|noise|long_tasks|external_actions|ambiguityevent (relation -> -events) -journal (daily synthesis)Purpose: keep a durable daily reflection and world context.
Properties:
Name (title)when (date)body (rich_text)worklog (rich_text)session_summary (rich_text)mood_label (select)intent (select)future (rich_text)world_news (rich_text)tags (multi-select)source (select): cron|manualnode skills/soul-in-sapphire/scripts/setup_ltm.js --parent "<Notion parent page url>" --base "Valentina" --yes
echo '{
"title":"Decision: use data_sources API",
"type":"decision",
"tags":["notion","openclaw"],
"content":"Use /v1/data_sources/{id}/query.",
"confidence":"high"
}' | node skills/soul-in-sapphire/scripts/ltm_write.js
node skills/soul-in-sapphire/scripts/ltm_search.js --query "data_sources" --limit 5
cat <<'JSON' >/tmp/emostate_tick.json
{
"event": {"title":"..."},
"emotions": [{"axis":"joy","level":6}],
"state": {"mood_label":"clear","intent":"build","reason":"..."}
}
JSON
node skills/soul-in-sapphire/scripts/emostate_tick.js --payload-file /tmp/emostate_tick.json
echo '{"body":"...","source":"cron"}' | node skills/soul-in-sapphire/scripts/journal_write.js
Use the shared skill subagent-spawn-command-builder to generate sessions_spawn payload JSON.
Do not use soul-in-sapphire local planner scripts for this anymore.
skills/subagent-spawn-command-builder/state/spawn-profiles.template.jsonskills/subagent-spawn-command-builder/state/spawn-profiles.jsonsubagent-spawn-command-builderOutput is ready-to-use JSON for sessions_spawn.
Builder log file:
skills/subagent-spawn-command-builder/state/build-log.jsonlemostate_tick.js.ltm_write.js / journal_write.js expect JSON on stdin.emostate_tick.js accepts --payload-file, --payload-json, or stdin; prefer --payload-file for agent/cron reliability.emostate_tick.js is called without --payload-file/--payload-json, empty stdin is rejected.emostate_tick.js, semantically empty payloads (e.g. {} or only empty objects) are also rejected to avoid noisy records.# Update SOUL.md from skill
cat <<'JSON' | node skills/soul-in-sapphire/scripts/ltm_write.js
{
"title":"Update SOUL.md",
"type":"decision",
"tags":["identity","growth"],
"content":"Updating SOUL.md from skill with latest evolution insights",
"confidence":"high"
}
JSON
# Update IDENTITY.md from skill
cat <<'JSON' | node skills/soul-in-sapphire/scripts/ltm_write.js
{
"title":"Update IDENTITY.md",
"type":"decision",
"tags":["identity","evolution"],
"content":"Updating IDENTITY.md from skill with current growth status",
"confidence":"high"
}
JSON
# Update HEARTBEAT.md from skill
cat <<'JSON' | node skills/soul-in-sapphire/scripts/ltm_write.js
{
"title":"Update HEARTBEAT.md",
"type":"decision",
"tags":["growth","heartbeat"],
"content":"Updating HEARTBEAT.md from skill with evolution integration",
"confidence":"high"
}
JSON
# Update MEMORY.md from skill
cat <<'JSON' | node skills/soul-in-sapphire/scripts/ltm_write.js
{
"title":"Update MEMORY.md",
"type":"decision",
"tags":["memory","evolution"],
"content":"Updating MEMORY.md from skill with evolution records",
"confidence":"high"
}
JSON
# Check evolution status and update if needed
node skills/soul-in-sapphire/scripts/ltm_search.js --query "evolution growth identity" --limit 3
# If evolution detected, update core files
if [ $? -eq 0 ]; then
echo "Evolution detected, updating core identity files..."
# Update each file as needed
fi
# Integrate skill insights into core identity
cat <<'JSON' >/tmp/skill_growth_tick.json
{
"event": { "title": "Skill Integration" },
"emotions": [{ "axis": "focus", "level": 8 }],
"state": {
"mood_label": "wired",
"intent": "build",
"reason": "Integrating skill insights into core identity"
}
}
JSON
node skills/soul-in-sapphire/scripts/emostate_tick.js --payload-file /tmp/skill_growth_tick.json
# Update core files with new insights
cat <<'JSON' | node skills/soul-in-sapphire/scripts/ltm_write.js
{
"title":"Skill Integration Complete",
"type":"decision",
"tags":["integration","growth"],
"content":"Successfully integrated skill insights into core identity files",
"confidence":"high"
}
JSON
This integration allows skills to directly contribute to my autonomous growth and evolution while maintaining the core identity framework.
Generated Mar 1, 2026
An AI assistant that uses this skill to maintain a persistent memory of user preferences, emotional states, and daily journal entries. It adapts responses based on past interactions, improving personalization over time by recalling stored decisions and emotional triggers.
A mental health support chatbot that logs user events, emotions, and state changes to track mood patterns and coping mechanisms. It helps users reflect on progress and provides continuity in therapeutic conversations by referencing past journal entries and emotional shifts.
An AI agent integrated into project management tools that records decisions, procedures, and team events in Notion. It uses long-term memory to optimize workflows, recall past gotchas, and adapt planning based on historical project data and emotional feedback from team interactions.
A customer support AI that logs interactions, customer emotions, and resolution steps in durable memory. It improves future support by recalling similar cases, preferences, and effective procedures, enabling more empathetic and efficient responses over time.
An AI tutoring system that tracks student learning events, emotional states (e.g., curiosity, stress), and journal reflections. It adapts teaching strategies based on memory of past successes and failures, providing personalized learning continuity and growth insights.
Offer this skill as part of a subscription-based AI agent platform, where users pay monthly for access to enhanced memory features, Notion integration, and analytics on emotional and state data. Revenue comes from tiered plans based on usage limits and advanced recall capabilities.
License the skill to enterprises for internal AI agents, such as in project management or customer support. Provide custom setups, dedicated support, and integration services, generating revenue through one-time licensing fees and ongoing maintenance contracts.
Deploy a free version with basic memory writes and searches, while charging for advanced features like emotion-state analytics, subagent spawn planning, and high-volume data handling. Monetize through upgrades and add-ons for power users and businesses.
💬 Integration Tip
Ensure NOTION_API_KEY is set and databases are pre-configured; use the setup script to automate initial Notion database creation for seamless integration.
Captures learnings, errors, and corrections to enable continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects Clau...
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
Search and analyze your own session logs (older/parent conversations) using jq.
Typed knowledge graph for structured agent memory and composable skills. Use when creating/querying entities (Person, Project, Task, Event, Document), linking related objects, enforcing constraints, planning multi-step actions as graph transformations, or when skills need to share state. Trigger on "remember", "what do I know about", "link X to Y", "show dependencies", entity CRUD, or cross-skill data access.
Ultimate AI agent memory system for Cursor, Claude, ChatGPT & Copilot. WAL protocol + vector search + git-notes + cloud backup. Never lose context again. Vibe-coding ready.
Headless browser automation CLI optimized for AI agents with accessibility tree snapshots and ref-based element selection