cc-clip: Instructions file for Claude Code

CLAUDE.md

cc-clip CLAUDE.md is an instructions file for Claude Code from ShunmeiCho/cc-clip. It costs 5,905 tokens per session, scanned C, original, MIT.

Project instructions for cc-clip, a tool that sends clipboard images and notifications between a local computer and a remote Linux server over SSH. They explain separate clipboard paths for Claude Code and Codex CLI.

In plain words
What is it for?
Use them when working on clipboard transfer, remote image pasting, X11 bridges, SSH forwarding, Claude Code hooks, or native notifications.
Why use it?
They help a coding agent understand the project's data flow and architecture before changing the clipboard, SSH, notification, or remote-session code.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: reads .claude/ paths; mentions .claude-plugin; mentions CLAUDE.md.

This is ShunmeiCho/cc-clip's own configuration. It tells Claude Code how to work on cc-clip itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything cc-clip configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ShunmeiCho/cc-clip. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ShunmeiCho/cc-clip/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/ShunmeiCho/cc-clip

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cc-clip CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/shunmeicho/cc-clip/claude-md/github.svg)](https://agentmods.dev/instructions/shunmeicho/cc-clip/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/shunmeicho/cc-clip/claude-md"><img src="https://agentmods.dev/badge/instructions/shunmeicho/cc-clip/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cc-clip CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/shunmeicho/cc-clip/claude-md"><img src="https://agentmods.dev/badge/instructions/shunmeicho/cc-clip/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 5,905 This file is loaded in full into every session.
When invoked 5,905 The same file — it is already loaded in full.
Security scan C 3 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.05905 $0.05905
Opus 5.5 $0.02362 $0.02362
Sonnet 5.5 $0.01181 $0.01181
Haiku 4.5 $0.00590 $0.00590

Measured 27d ago against content hash 1207b4cf0988, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

cc-clip CLAUDE.md scanned grade C with 3 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 27d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

`token.Manager` holds the session in memory. `LoadOrGenerate(ttl)` reuses an unexpired token from disk, or generates a new one. Token file at `~/.cache/cc-clip/session.token` (chmod 600) stores `token\nexpires_at_rfc3339

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

19. **claude settings hooks** (`internal/shim/settings.go`) — `connect` merges managed Stop and Notification hooks into remote `~/.claude/settings.json` and cleans up legacy wrappers to avoid double delivery. The `~/.loc

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

3. **shim** (`internal/shim/template.go`) — Bash script templates for xclip and wl-paste. Intercepts two specific invocation patterns Claude Code uses, fetches via curl through tunnel, falls back to real binary on any fa
CLAUDE.md · 160 lines

How it starts

The opening of the file, as written. The whole thing — 160 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

What This Project Does

cc-clip bridges your local Mac/Windows clipboard to a remote Linux server over SSH, so Ctrl+V image paste works in remote Claude Code and Codex CLI sessions. It uses an xclip/wl-paste shim that transparently intercepts only Claude Code's clipboard calls, an X11 selection owner bridge for Codex CLI which reads the clipboard via X11 directly, and an SSH notification bridge that forwards Claude Code hook events (stop, permission prompt, idle) back to the local machine as native notifications.

Claude Code path:
  Local Mac clipboard → pngpaste → HTTP daemon (127.0.0.1:18339) → SSH RemoteForward → xclip shim → Claude Code

Codex CLI path (--codex):
  Local Mac clipboard → pngpaste → HTTP daemon (127.0.0.1:18339) → SSH RemoteForward → x11-bridge → Xvfb CLIPBOARD → arboard → Codex CLI

Notification path:
  Claude Code hook → cc-clip plugin run claude-notify (stdin JSON) → POST /notify via tunnel → classifier → dedup → DeliveryChain → native notification
  (fallback when the settings.json merge fails: Claude Code hook → cc-clip-hook → same POST /notify)

Build & Test Commands

make build                          # Build binary with version from git tags
make test                           # Run all tests (go test ./... -count=1)
make vet                            # Run go vet
go test ./internal/tunnel/ -v -run TestFetchImageRoundTrip  # Single test
make release-local                  # Build bare binaries for all platforms (dist/), local testing only

Version is injected via -X main.version=$(VERSION) ldflags. The version variable in cmd/cc-clip/main.go defaults to "dev".

Release Process

Production releases use goreleaser via GitHub Actions (.github/workflows/release.yml). Push a version tag to trigger:

git tag v0.6.0
git push origin v0.6.0
# CI runs: test → contract check → goreleaser → published release with tar.gz + checksums

Read the full file on GitHub · 160 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 27d ago Changed · +4 lines · +314 tokens per session 1207b4cf0988
  2. 1mo ago Changed · +2 lines · +503 tokens per session b9aec2078a69
  3. 1mo ago First seen · 154 lines · 5,088 tokens per session scan C 9c01f8adf4e7

Subscribe to this mod's changes

cc-clip CLAUDE.md is an instructions file published in the GitHub repository ShunmeiCho/cc-clip (180 stars, last pushed 27d ago), licensed MIT. It adds 5,905 tokens to every session, about $0.0236 per session on Opus 5.5. A static security scan graded it C with 3 findings (asks for root, reads agent configuration directories, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories