Claude Export Conversation Fixer
Fixes broken line wrapping in Claude Code exported conversation files (.txt), reconstructing tables, paragraphs, paths, and tool calls that were hard-wrapped at fixed column widths. Includes an automated validation suite (generic, file-agnostic checks). Triggers when the user has a Claude Code export file with broken formatting, mentions "fix export", "fix conversation", "exported conversation", "make export readable", references a file matching YYYY-MM-DD-HHMMSS-*.txt, or has a .txt file with broken tables, split paths, or mangled tool output from Claude Code.
Installation
- Make sure Claude is on your device and in your terminal.
Skills load from
~/.claude/skills/when Claude Code starts up — so you need it on your machine first. If you don't have it yet, install it once with the command below, then runclaudein any terminal to verify.One-time setupnpm i -g @anthropic-ai/claude-codeAlready have it? Skip ahead.
- Paste into Claude Code or into your terminal.Install
git clone https://github.com/daymade/claude-code-skills.git /tmp/daymade__claude-code-skills && mkdir -p ~/.claude/skills/fixing-claude-export-conversations-daymade && cp -r /tmp/daymade__claude-code-skills/daymade-claude-code/claude-export-txt-better/. ~/.claude/skills/fixing-claude-export-conversations-daymade/This copies the whole skill folder into
~/.claude/skills/fixing-claude-export-conversations-daymade/— the SKILL.md plus any scripts, reference docs, or templates the skill ships with. Safe default: works for every skill.Faster alternative (instruction-only skills)
Skips the clone and grabs only the SKILL.md file. Don't use this if the skill ships Python scripts, reference markdowns, or asset templates — they won't be downloaded and the skill will fail when it tries to load them.
Quick install (SKILL.md only)mkdir -p ~/.claude/skills/fixing-claude-export-conversations-daymade && curl -fsSL https://raw.githubusercontent.com/daymade/claude-code-skills/main/daymade-claude-code/claude-export-txt-better/SKILL.md -o ~/.claude/skills/fixing-claude-export-conversations-daymade/SKILL.md - Restart Claude Code.
Quit and reopen Claude Code (or any other agent that loads from
~/.claude/skills/). New skills are picked up on startup. - Just ask Claude.
Skills auto-activate when your request matches the skill's description — no slash command needed. Trigger phrases live in the skill's own frontmatter; you can read them in the “What this skill does” section above.
Prefer to read the source first? Open on GitHub.
When Claude uses it
Fixes broken line wrapping in Claude Code exported conversation files (.txt), reconstructing tables, paragraphs, paths, and tool calls that were hard-wrapped at fixed column widths. Includes an automated validation suite (generic, file-agnostic checks). Triggers when the user has a Claude Code export file with broken formatting, mentions "fix export", "fix conversation", "exported conversation", "make export readable", references a file matching YYYY-MM-DD-HHMMSS-*.txt, or has a .txt file with broken tables, split paths, or mangled tool output from Claude Code.
What this skill does
Fixing Claude Code Export Conversations
Reconstruct broken line wrapping in Claude Code exported .txt files.
Quick Start
# Fix and show stats
uv run <skill-path>/scripts/fix-claude-export.py <export.txt> --stats
# Custom output
uv run <skill-path>/scripts/fix-claude-export.py <export.txt> -o fixed.txt
# Validate the result (53 automated checks)
uv run <skill-path>/scripts/validate-claude-export-fix.py <export.txt> fixed.txt
Replace <skill-path> with the resolved path to this skill's directory. Find it with:
find ~/.claude -path "*/fixing-claude-export-conversations/scripts" -type d 2>/dev/null
Workflow
Copy this checklist and track progress:
- [ ] Step 1: Locate the exported .txt file
- [ ] Step 2: Run fix script with --stats
- [ ] Step 3: Run validation suite
- [ ] Step 4: Spot-check output (tables, CJK paragraphs, tool results)
- [ ] Step 5: Deliver fixed file to user
Step 1: Locate the file. Claude Code exports use the naming pattern YYYY-MM-DD-HHMMSS-<slug>.txt.
Step 2: Run the fix script.
uv run <skill-path>/scripts/fix-claude-export.py <input.txt> -o <output.txt> --stats
Review the stats output — typical results: 20-25% line reduction, 80+ table borders fixed, 160+ table cells fixed.
Step 3: Run the validation suite.
uv run <skill-path>/scripts/validate-claude-export-fix.py <input.txt> <output.txt>
All checks must pass. If any fail, investigate before delivering. Use --verbose for full details on passing checks too.
Step 4: Spot-check. Open the output and verify:
- Tables have intact borders (box-drawing characters on single lines)
- CJK/English mixed text has pangu spacing (
Portal 都需要, notPortal都需要) - Tool result blocks (
⎿) have complete content on joined lines - Diff output within tool results has each line number on its own line
Step 5: Deliver the fixed file to the user.
What Gets Fixed
The script handles 10 content types using a state-machine with next-line look-ahead:
- User prompts (
❯prefix, dw=76 padding) — paragraph joins with pangu spacing - Claude responses (
●prefix) — narrative, bullet, and numbered list joins - Claude paragraphs (2-space indent) — next-line look-ahead via
_is_continuation_fragment - Tables — border reconstruction, cell re-padding with pipe-count tracking
- Tool calls (
● Bash(etc.) — path and argument reconstruction - Tool results (
⎿prefix) — continuation joins including deeper-indented fragments - Plan text (5-space indent) — next-line look-ahead via
_is_plan_continuation_fragment - Agent tree (
├─/└─) — preserved structure - Separators (
────,---) — never joined - Tree connectors (standalone
│) — preserved
Key Design Decisions
Next-line look-ahead (not dw thresholds): Instead of asking "was this line wrapped?" (fragile threshold), the script asks "does the next line look like a continuation?" by examining its content patterns — lowercase start, CJK ideograph start, opening bracket, hyphen/slash/underscore continuation.
Pangu spacing: Inserts spaces between ASCII alphanumeric characters and CJK ideographs at join boundaries. Also triggers for %, #, +, : adjacent to CJK.
Mid-token detection: Joins without space when boundaries indicate identifiers (BASE_ + URL), paths (documents + /05-team), or hyphenated names (ready + -together). Exception: -- prefix gets a space (run + --headed).
Safety
- Never modifies the original file
- Marker counts verified:
❯,●,✻,⎿,…must match input/output - Runaway join detection: warns if any line exceeds 500 display-width
- Strict UTF-8 encoding — no silent fallbacks
Dependencies
Python 3.10+ via uv run — zero external packages (stdlib only: unicodedata, argparse, re, pathlib, dataclasses).
Related skills
Skill Builder & Optimizer
anthropics
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
Org Change Management
alirezarezvani
Framework for rolling out organizational changes without chaos. Covers the ADKAR model adapted for startups, communication templates, resistance patterns, and change fatigue management. Handles process changes, org restructures, strategy pivots, and culture changes. Use when announcing a reorg, switching tools, pivoting strategy, killing a product, changing leadership, or when user mentions change management, change rollout, managing resistance, org change, reorg, or pivot communication.
Audio/Video Transcription
daymade
Transcribes audio and video files to text using Qwen3-ASR. Supports two modes — local MLX inference on macOS Apple Silicon (no API key, 15-27x realtime) and remote API via vLLM/OpenAI-compatible endpoints. Auto-detects platform and recommends the best path. Triggers when the user wants to transcribe recordings, convert audio/video to text, do speech-to-text, or mentions ASR, Qwen ASR, 转录, 语音转文字, 录音转文字. Also triggers for meeting recordings, lectures, interviews, podcasts, screen recordings, or any audio/video file the user wants converted to text.
Claude Skills Troubleshooter
daymade
Diagnose and resolve Claude Code plugin and skill issues. This skill should be used when plugins are installed but not showing in available skills list, skills are not activating as expected, or when troubleshooting enabledPlugins configuration in settings.json. Triggers include "plugin not working", "skill not showing", "installed but disabled", or "enabledPlugins" issues.