kindtree

AI Clean Copy — AI skill for Claude Code

AI community

CJK-aware clipboard cleaner for AI agent TUIs (Claude Code, Codex CLI) on macOS.

How to install AI Clean Copy

This entry records only its repository, not the path inside it, so there is no exact command to give. Open kindtree/ai-clean-copy and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What AI Clean Copy does

CJK-aware clipboard cleaner for AI agent TUIs (Claude Code, Codex CLI) on macOS. Fork of andersmyrmel/claude-copy with display-width heuristics, marker cleanup, and list reflow.

Alternatives in AI

  • Humanizer-zh: 去除 AI 写作痕迹 — 你是一位文字编辑,专门识别和去除 AI 生成文本的痕迹,使文字听起来更自然、更有人味 5k ★
  • Agentboard — Web GUI for tmux optimized for AI agent TUIs, with support for iOS safari and mac w/ keyboard shortcuts 410 ★
  • Ralph Loop — A long-running AI agent loop 292 ★

README

ai-clean-copy

**English** · [简体中文](README.zh-CN.md)

**Copy from the [Claude Code](https://claude.com/claude-code) or [Codex CLI](https://github.com/openai/codex) terminal UI. Paste clean text. Every time.**

The clipboard cleaner that understands CJK — 中文 / 日本語 / 한국어 wraps rejoin perfectly, `修改` never becomes `修 改`.

![platform](https://img.shields.io/badge/platform-macOS-black?logo=apple) ![license](https://img.shields.io/badge/license-MIT-green) ![tests](https://img.shields.io/badge/tests-83%20passing-brightgreen) ![powered by](https://img.shields.io/badge/powered%20by-Hammerspoon-8A2BE2) ![CJK](https://img.shields.io/badge/CJK-first--class-orange)

Before: margins, ⏺ markers, spinner lines, torn CJK words. After: clean flush-left paragraphs with 修改 intact.

Select text in an agent TUI, hit `⌘C`, and your clipboard fills with rendering junk: 2-space margins on every line, `⏺` `❯` `⎿` (Claude Code) or `•` `›` (Codex) markers, `✻ Worked for 11s` spinner lines, and hard line breaks at the terminal width that shred your paragraphs.

**ai-clean-copy** is a tiny [Hammerspoon](https://www.hammerspoon.org/) interceptor that catches `⌘C` in your terminal, scores how agent-TUI-like the copied text is, and cleans it *before you paste* — conservatively, so code, tables, and everything non-agent pass through untouched.

Plain copy vs ai-clean-copy: a terminal reply pasted with margins, stray ●/✻ symbols and a paragraph chopped into broken lines, versus one clean flush-left paragraph.

The junk above is plain English — margins, stray markers, a paragraph shredded across lines. CJK gets a whole extra failure mode on top (see [below](#why-cjk-needs-its-own-fork)); a CJK before/after:

- ⏺ 修复方案如下:
-
-   这个方案的关键在于我们可以直接复用 Hammerspoon 提供的 eventtap 机制来拦截快捷键,不需要修
-   改任何系统设置就能生效。
-
- ✻ Worked for 11s
+ 修复方案如下:
+
+