← Back to Skills Marketplace
harrylabsj

Conversation Recovery

by haidong · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
204
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install conversation-recovery
Description
Capture and recover conversation state across OpenClaw sessions. Use when conversations get interrupted, span multiple sessions, or need context restoration....
README (SKILL.md)

conversation-recovery

Capture and recover conversation state across OpenClaw sessions.

Description

This skill provides conversation state management and recovery capabilities for OpenClaw. When conversations get interrupted or span multiple sessions, it captures the essential context (intents, facts, tasks) and allows seamless recovery.

Use Cases

  • Long-running tasks: Save progress when a conversation spans multiple days
  • Context restoration: Recover where you left off after interruptions
  • Session handoff: Transfer context between different channels/platforms
  • Memory management: Archive old sessions while preserving key information

Installation

# Dependencies are managed via package.json
npm install

# Build TypeScript
npm run build

Core Concepts

Session

A conversation container with metadata (status, channel, timestamps).

Snapshot

A point-in-time capture of conversation state containing:

  • Intents: What the user wants to accomplish
  • Facts: Established information and preferences
  • Tasks: Action items and their status

Recovery

Restoring context from a snapshot to continue a conversation seamlessly.

API Usage

Starting a Session

import { startSession } from 'conversation-recovery';

const session = await startSession(
  'Project Planning Discussion',
  'discord'
);

Capturing a Snapshot

import { captureSnapshot } from 'conversation-recovery';

const snapshot = await captureSnapshot(session.id, {
  description: 'User wants to plan Q3 roadmap',
  intents: [{
    id: 'intent_1',
    description: 'Create Q3 product roadmap',
    confidence: 0.95,
    fulfilled: false,
    createdAt: new Date().toISOString()
  }],
  facts: [{
    id: 'fact_1',
    statement: 'Team has 5 engineers available',
    category: 'constraint',
    confidence: 1.0,
    active: true,
    createdAt: new Date().toISOString()
  }],
  tasks: [{
    id: 'task_1',
    description: 'Gather requirements from stakeholders',
    status: 'pending',
    priority: 'high',
    relatedIntentIds: ['intent_1'],
    dependencies: [],
    createdAt: new Date().toISOString(),
    updatedAt: new Date().toISOString()
  }]
});

Recovering a Session

import { recoverSession } from 'conversation-recovery';

const recovery = await recoverSession(session.id);
// Returns RecoverySummary with key intents, facts, tasks, and suggestions

Managing Sessions

import { 
  pauseSession, 
  resumeSession, 
  archiveSession,
  getActiveSessions,
  deleteSession 
} from 'conversation-recovery';

await pauseSession(session.id);      // Mark as paused
await resumeSession(session.id);     // Mark as active
await archiveSession(session.id);    // Mark as archived
await deleteSession(session.id);     // Permanently delete

const active = await getActiveSessions();

Storage Operations

import { 
  getSession,
  getSnapshot,
  getSessionSnapshots,
  getLatestSnapshot,
  deleteSnapshot,
  listSessions,
  getStorageStats,
  cleanupSnapshots
} from 'conversation-recovery';

const session = await getSession(sessionId);
const snapshot = await getSnapshot(snapshotId);
const snapshots = await getSessionSnapshots(sessionId);
const latest = await getLatestSnapshot(sessionId);

const allSessions = await listSessions();
const stats = await getStorageStats();

// Keep only last 10 snapshots
await cleanupSnapshots(sessionId, 10);

Data Models

Session

interface Session {
  id: string;
  createdAt: string;
  updatedAt: string;
  title?: string;
  channel?: string;
  status: 'active' | 'paused' | 'recovered' | 'archived';
  snapshots: string[];
}

Snapshot

interface Snapshot {
  id: string;
  sessionId: string;
  createdAt: string;
  description?: string;
  intents: Intent[];
  facts: Fact[];
  tasks: Task[];
  context?: string;
  tokenCount?: number;
}

Intent

interface Intent {
  id: string;
  description: string;
  confidence: number;
  sourceMessageId?: string;
  fulfilled: boolean;
  createdAt: string;
}

Fact

interface Fact {
  id: string;
  statement: string;
  category: 'preference' | 'constraint' | 'context' | 'decision' | 'requirement';
  sourceMessageId?: string;
  confidence: number;
  active: boolean;
  createdAt: string;
}

Task

interface Task {
  id: string;
  description: string;
  status: 'pending' | 'in_progress' | 'blocked' | 'completed' | 'cancelled';
  priority: 'low' | 'medium' | 'high' | 'critical';
  relatedIntentIds: string[];
  dependencies: string[];
  dueDate?: string;
  createdAt: string;
  updatedAt: string;
}

Storage

Data is stored in JSON files at:

  • Sessions: ~/.openclaw/conversation-recovery/sessions/
  • Snapshots: ~/.openclaw/conversation-recovery/snapshots/

Override with environment variable:

export CONVERSATION_RECOVERY_STORAGE=/custom/path

Roadmap

Phase 1 (Current)

  • ✅ Core data models (Session, Snapshot, Intent, Fact, Task)
  • ✅ File storage layer (CRUD operations)
  • ✅ Basic session lifecycle management
  • ✅ Recovery summary generation

Phase 2 (Planned)

  • Intent extraction from conversation text
  • Automatic snapshot triggers (token limits, time intervals)
  • Compression and summarization of old snapshots

Phase 3 (Planned)

  • Vector search for similar past sessions
  • Cross-session knowledge graph
  • Integration with OpenClaw memory system

License

MIT

Usage Guidance
What to check before installing: - Node/npm requirement: SKILL.md requires running 'npm install' and 'npm run build' but the registry metadata lists no required binaries — ensure you have Node.js and npm and be comfortable running them. - Review package.json/package-lock.json for dependencies before running npm install to spot any unexpected packages. - Storage location: by default the skill writes JSON files to ~/.openclaw/conversation-recovery (sessions/ and snapshots/). If you prefer isolation, set CONVERSATION_RECOVERY_STORAGE to a custom path (export CONVERSATION_RECOVERY_STORAGE=/path) before use or run inside a sandbox/container. - Data deletion: functions exist to delete snapshots and sessions permanently. Back up any important conversation data before using deletion/cleanup APIs. - Network/LLM: current code simulates LLM extraction and does not perform external network calls, but roadmap mentions future LLM integrations — if you upgrade later, re-check for outbound network calls and required API credentials. - Install in a controlled environment (VM/container) if you want to inspect runtime behavior first. If you lack the ability to audit dependencies, avoid running 'npm install' as root or on a production machine.
Capability Analysis
Type: OpenClaw Skill Name: conversation-recovery Version: 1.0.0 The skill provides conversation state management by saving session snapshots as JSON files to the local filesystem. While the logic aligns with its stated purpose, the storage implementation in `storage.js` (and `src/storage.ts`) is vulnerable to path traversal; the `sessionId` and `snapshotId` parameters are used directly in `path.join` without sanitization, which could allow an attacker to read or write files outside the intended directory. No evidence of intentional malice, data exfiltration, or unauthorized execution was found.
Capability Assessment
Purpose & Capability
The name/description align with the implementation: session/snapshot models, capture/recover APIs, local JSON storage, and analysis/compression helpers. However the registry metadata lists no required binaries or env vars while SKILL.md expects npm/node (npm install, build) and the code reads process.env.CONVERSATION_RECOVERY_STORAGE and process.env.HOME. The skill should declare Node/npm as required binaries and document the optional CONVERSATION_RECOVERY_STORAGE env var in the registry metadata.
Instruction Scope
SKILL.md and the exported API focus on capturing/recovering conversation state and managing snapshots; the implementation reads/writes JSON files under a dedicated directory (~/.openclaw/conversation-recovery by default). There are no instructions or code paths that reach outside these responsibilities (no network endpoints, no scanning of unrelated system files). The analyzer notes LLM-based extraction would be a production-time call but currently contains a simulated implementation — no active external LLM calls were found in the shipped code.
Install Mechanism
There is no packaged install spec in the registry, but SKILL.md requires running npm install and npm run build; package.json and package-lock.json are included. Installing will pull dependencies from the npm registry and write node_modules to disk. This is a standard Node.js build workflow but the registry should advertise node/npm requirements; review package.json dependencies before running npm install to confirm no unexpected packages.
Credentials
The skill requests no credentials (good) but reads/writes files under the user's home directory (default location ~/.openclaw/conversation-recovery) and uses the CONVERSATION_RECOVERY_STORAGE env var to override storage. The registry's required env list is empty despite the SKILL.md and code referencing that environment variable. File write/delete operations (createSnapshot, deleteSnapshot, deleteSession) are present — these are appropriate for the feature but are destructive. The lack of declared env/config requirements in the registry is an inconsistency that reduces transparency.
Persistence & Privilege
The skill does not request 'always: true' or other elevated platform privileges. It can be invoked autonomously per platform defaults (disable-model-invocation is false), which is normal for skills. Its persistence is limited to storing JSON files in a per-user directory; it does not modify other skills' configurations or system-wide settings.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install conversation-recovery
  3. After installation, invoke the skill by name or use /conversation-recovery
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release: conversation state capture and recovery with intelligent context analysis.
Metadata
Slug conversation-recovery
Version 1.0.0
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 1
Frequently Asked Questions

What is Conversation Recovery?

Capture and recover conversation state across OpenClaw sessions. Use when conversations get interrupted, span multiple sessions, or need context restoration.... It is an AI Agent Skill for Claude Code / OpenClaw, with 204 downloads so far.

How do I install Conversation Recovery?

Run "/install conversation-recovery" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Conversation Recovery free?

Yes, Conversation Recovery is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Conversation Recovery support?

Conversation Recovery is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Conversation Recovery?

It is built and maintained by haidong (@harrylabsj); the current version is v1.0.0.

💬 Comments