Claude 同步
- 作者仓库星标 1,187
- 叉子 185
- 作者更新于 2026年6月14日 10:01
- 作者仓库 claude-code-skills
- 领域
- 通用
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @daymade · 未声明 license
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 即装即用
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 底层运行要求
- Python >=3.10
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- 网络行为
- 仅限本地
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: fixing-claude-export-conversations
description: > Reconstruct broken line wrapping in Claude Code exported .txt files. uv run <skill-path>/scrip…
category: 通用
runtime: Python
---
# fixing-claude-export-conversations 输出预览
## PART A: 任务判断
- 适用问题:通用任务拆解、检查和交付。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Quick Start / Workflow / What Gets Fixed”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于通用任务拆解、检查和交付,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Quick Start / Workflow / What Gets Fixed”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、主要在本地完成、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件;主要在本地完成;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文没有稳定的斜杠命令要求。安装验证后通常全局生效,直接在对话里点名这个 Skill 并描述任务即可。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件。
先用一个小任务确认它会围绕“Quick Start / Workflow / What Gets Fixed”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: fixing-claude-export-conversations
description: > Reconstruct broken line wrapping in Claude Code exported .txt files. uv run <skill-path>/scrip…
category: 通用
source: daymade/claude-code-skills
---
# fixing-claude-export-conversations
## 什么时候使用
- fixing-claude-export-conversations 是一个通用扩展技能,按 SKILL 适合处理通用任务拆解、检查、交付和复盘,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务…
- 面向通用任务拆解、检查和交付,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Quick Start / Workflow / What Gets Fixed」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件;主要在本地完成;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "fixing-claude-export-conversations" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Quick Start / Workflow / What Gets Fixed
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> Python | 读取文件、写入/修改文件 | 主要在本地完成
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} 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).
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核