copy-session-to-zai

Copy Claude Code session JSONL files between config directories with conflict handling.

4|Updated Jan 12, 2017
One-click install
npx skills add https://github.com/brandon-fryslie/dotfiles --skill copy-session-to-zai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: copy-session-to-zai
Source: https://github.com/brandon-fryslie/dotfiles/tree/main/config/claude.zai/skills/copy-session-to-zai
Command: npx skills add https://github.com/brandon-fryslie/dotfiles --skill copy-session-to-zai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires json, jsonschema, shutil, sys, re, os, hashlib, textwrap, json, argparse, datetime, json, jsonschema, shutil, sys, re, os, hashlib, textwrap, and includes scripts (resource) components.

What problem does it solve?

This Skill simplifies the process of copying Claude Code session transcripts between different config directories, ensuring seamless transition between environments.

Core Features & Use Cases

  • Session Copy: Automatically copy Claude Code session JSONL files from the source to the target config directory.
  • Conflict Handling: Detect and handle potential conflicts such as file size mismatches or existing target files.
  • Selective Copying: Allows users to select specific sessions to copy, based on their content or timestamp.

Quick Start

Copy the most recent Claude Code session from the current project into the z.ai Claude config directory by running the command: python3 session_copy.py copy /path/to/project <session-id>

Frequently Asked Questions about copy-session-to-zai

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

FAQPage Schema
How do I copy Claude Code session transcripts between config directories?

To copy Claude Code session transcripts, use a Python script to transfer JSONL files from a source directory to a target config directory. The process handles file conflicts and allows selective session copying based on timestamps.

What happens when copying Claude Code sessions to a directory with existing files?

When copying Claude Code sessions to a directory with existing files, the script detects conflicts such as file size mismatches or existing target files, enabling conflict resolution before the JSONL transfer completes.

Can I selectively copy specific Claude Code sessions instead of all files?

Yes, you can selectively copy specific Claude Code sessions by passing a session ID to the script. This targeted transfer allows you to move individual JSONL session files based on their content or timestamp.

Do I need Python to transfer Claude Code session files to a new config directory?

Yes, transferring Claude Code session files requires Python because the script uses libraries like json, jsonschema, shutil, and os to read, validate, and copy JSONL configuration data between directories.

What's the best way to move a Claude Code session to the z.ai config directory?

The best way to move a Claude Code session to the z.ai config directory is running the session copy script with the project path and session ID, automating JSONL file transfer with built-in conflict detection.