pbdeuchler/llm-plugins/session-persistence

Claude Code and agent skill by pbdeuchler/llm-plugins

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Manage autoresearch.jsonl logging, session initialization, segment tracking, and session recovery. Use when starting, resuming, or recording experiments.

Install

npx vskill@latest install pbdeuchler/llm-plugins/session-persistence

SKILL.md

The same SKILL.md was published earlier as pbdeuchler/llm-plugins/session-persistence.

Session Persistence

All experiment data is persisted to autoresearch.jsonl in JSONL format (one JSON object per line). This file survives across discards, crashes, and context resets — it is the canonical record of everything tried.

JSONL Record Types

Config Header

Written once at session init (and again on re-initialization when the optimization target changes):

json
{"type":"config","name":"<session name>","metricName":"<primary metric>","metricUnit":"<unit>","bestDirection":"<lower|higher>"}
FieldTypeDescription
type"config"Distinguishes from experiment records
namestringHuman-readable session name
metricNamestringPrimary metric name (must match METRIC output)
metricUnitstringDisplay unit (inferred or explicit)
bestDirection"lower" or "higher"Optimization direction
Experiment Record

Written after every experiment (keep, discard, crash, or checks_failed):

json
{"run":5,"commit":"a1b2c3d","metric":14600,"metrics":{"compile_µs":4100},"status":"keep","description":"Inline hot loop","timestamp":1699564800000,"segment":0,"confidence":2.3,"asi":{"hypothesis":"inlining reduces call overhead"}}
FieldTypeDescription
runnumberSequential experiment number (1-indexed)
commitstringGit short hash (7 chars) for keep; empty string for others
metricnumberPrimary metric value (0 for crashes)
metricsobjectSecondary metric name→value pairs
statusstring"keep", "discard", "crash", or "checks_failed"
descriptionstringWhat was tried this run
timestampnumberMilliseconds since epoch (date +%s000 in bash)
segmentnumberCurrent segment index (0-indexed)
confidencenumber or nullConfidence score (null if < 3 runs)
asiobject or nullAgent-supplied intelligence (free-form key-value)

Segments

A segment groups experiments under a single baseline and config. Segments increment when init_experiment is called again (e.g., when the optimization target changes mid-session).

  • Segment 0: experiments from initial setup
  • Segment 1+: experiments after re-initialization

Confidence scoring and baseline comparisons only consider experiments within the current segment.

Session Recovery

When resuming (context reset, crash, or explicit resume):

  1. Read `autoresearch.jsonl` line by line.
  2. Parse config headers: Each "type":"config" line starts a new segment. Extract metricName, metricUnit, bestDirection.
  3. Parse experiment records: Reconstruct the results list with all fields. Track which segment each belongs to.
  4. Rebuild secondary metrics: Collect all unique keys from metrics objects across the current segment.
  5. Find baseline: First experiment record in the current segment.
  6. Find best kept: Best keep-status metric in the current segment (respecting direction).
  7. Compute run count: Total experiment records (to set the next run number).
  8. Resume looping from where the session left off.

Also read autoresearch.md and autoresearch.ideas.md for context on what was tried and what ideas remain.

Writing Records

When logging an experiment:

  1. Compute all fields (including confidence via the confidence-scoring skill).
  2. Serialize as a single JSON line (no pretty-printing, no trailing newline between records).
  3. Append to autoresearch.jsonl — never overwrite the file.
  4. The JSONL file is the only record that survives discarded/crashed experiments. Every run must be logged before any git revert happens.

Reporting

After logging, print a one-line summary:

Run #5: keep | total_µs: 14,600 (-3.8%) | confidence: 2.3× | "Inline hot loop"

Components:

  • Run number and status
  • Primary metric with delta % vs baseline
  • Confidence score (if available)
  • Description (truncated if long)

After every 5 runs or on shutdown, print an expanded summary showing all runs in the current segment with their status, metrics, and descriptions.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
13
7-day trend score
0

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/pbdeuchler/llm-plugins/session-persistence/badge)](https://verified-skill.com/skills/pbdeuchler/llm-plugins/session-persistence)

Something wrong with this skill or its page? Tell us.