state_persistence_v2

Persist, roll up, and prune trading state snapshots for ClaudeTrading paper trading runs.

2|4|Updated Apr 27, 2026
One-click install
npx skills add https://github.com/khoks/ClaudeTrading --skill state-persistence-v2
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: state_persistence_v2
Source: https://github.com/khoks/ClaudeTrading/tree/main/.claude/skills/state_persistence_v2
Command: npx skills add https://github.com/khoks/ClaudeTrading --skill state-persistence-v2

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jq, and includes scripts (resource) components.

What problem does it solve?

This Skill eliminates the manual effort of saving, rolling up, and pruning trading state snapshots for the ClaudeTrading paper trading system, ensuring consistent, local record-keeping of all trading activity without user intervention.

Core Features & Use Cases

  • Automated Tick Snapshots: Captures a full record of every trading tick, including account equity, open positions, executed strategy actions, and equity delta from the prior tick, to a timestamped local file.
  • Conditional Daily/Weekly Rollups: Automatically aggregates per-tick data into end-of-day summary snapshots (with opening/closing equity, daily P/L, all actions, and final positions) and end-of-week aggregates for performance tracking, only firing when the relevant market calendar condition is met.
  • Automatic Pruning: Removes per-tick snapshots older than the configurable 7-day retention window by default, while retaining daily and weekly snapshots indefinitely to avoid unnecessary disk bloat.
  • Use Case: For paper traders using ClaudeTrading, this Skill ensures all trading state is persistently stored locally without manual work, with built-in performance rollups and automatic cleanup of outdated tick data.

Quick Start

Use the state_persistence_v2 skill to automatically save trading state snapshots, generate daily and weekly performance summaries, and prune old tick records as part of your ClaudeTrading paper trading workflow.

Frequently Asked Questions about state_persistence_v2

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

FAQPage Schema
How do I automatically save trading state snapshots for paper trading?

Automated trading state snapshots are captured per-tick to timestamped local files, recording account equity, open positions, and executed actions without manual intervention.

How does conditional rollup work for daily and weekly trading performance?

Conditional rollup automatically aggregates per-tick data into end-of-day and end-of-week summary snapshots, firing only when relevant market calendar conditions are met.

What's the best way to prune outdated per-tick trading data locally?

Automatic pruning removes per-tick snapshot files older than a configurable 7-day retention window by default, while retaining daily and weekly snapshots indefinitely to prevent disk bloat.

Do I need jq to run trading state persistence and rollup scripts?

Yes, jq is required as a dependency to execute the deterministic conditional rollup logic and manage local, gitignored trading state storage with atomic snapshot writes.

Can I use automated snapshot persistence for scheduled master trading runs?

Yes, automated snapshot persistence applies to every scheduled and manual master trading run to capture per-tick account and position data deterministically without relying on AI interpretation.

Why use deterministic conditional rollup logic instead of AI interpretation for trading state?

Deterministic conditional rollup logic executes correctly without AI interpretation, ensuring consistent end-of-day and end-of-week performance aggregates are generated based on market calendar conditions.