stage-snapshot-writer

Capture operator-visible stage outputs into task-scoped snapshot files with atomic writes.

11|1|Updated Apr 10, 2026
One-click install
npx skills add https://github.com/Arcanada-one/datarim --skill stage-snapshot-writer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: stage-snapshot-writer
Source: https://github.com/Arcanada-one/datarim/tree/main/skills/stage-snapshot-writer
Command: npx skills add https://github.com/Arcanada-one/datarim --skill stage-snapshot-writer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

It prevents lost context by reliably writing each stage’s final, operator-visible snapshot so later commands can resume with consistent state.

Core Features & Use Cases

  • Deterministic stage snapshotting: Records the Summary + Gate Results + CTA block emitted by each /dr-* command into a task-scoped snapshot file.
  • Overwrite semantics for replays: Replaces an existing snapshot for the same task/stage to keep results current.
  • Safe, bounded outputs: Enforces an 8 KB total size cap with a truncation marker to avoid runaway context growth.
  • Concurrency control: Uses a per-task lock to prevent concurrent writers from corrupting snapshot contents.
  • Kill switch: Can disable writing entirely via DATARIM_DISABLE_SNAPSHOT=1.

Quick Start

Use stage-snapshot-writer to write the snapshot for task TASK-ID after you generate the final CTA block in stage plan using the /dr-plan command.

Frequently Asked Questions about stage-snapshot-writer

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

FAQPage Schema
How do I persist AI agent pipeline stage outputs for context recovery?

You can persist AI agent pipeline stage outputs by capturing the final Summary, Gate Results, and CTA block into a task-scoped snapshot file for later replay and consistent state recovery.

What is the best way to prevent lost context after terminal shutdown in workflow orchestration?

Preventing lost context after terminal shutdown is achieved by reliably writing each stage's operator-visible snapshot file, allowing later commands to resume with consistent state.

How do I handle concurrency locking when multiple agents write stage snapshots?

Concurrency locking for multiple writers is handled using a per-task lock mechanism that prevents concurrent writers from corrupting snapshot contents during atomic write and rename operations.

Does this stage snapshotting approach enforce size limits on context persistence files?

Yes, this stage snapshotting approach enforces safe bounded outputs with an 8 KB total size cap, applying a truncation marker to avoid runaway context growth in the snapshot file.

Can I disable context persistence snapshots entirely in my CLI workflows?

Yes, you can disable context persistence snapshot writing entirely by setting the optional no-op kill switch environment variable DATARIM_DISABLE_SNAPSHOT to 1.

Do I need specific CLI commands to trigger stage snapshotting in AI pipelines?

You need to use producer-style `/dr-*` flows across plan, prd, do, qa, verify, and auto stages to generate the final CTA block that triggers the snapshot writing.