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,088 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: Claude Code plugin machinery. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 5,088 This file is loaded in full into every session.
When invoked 5,088 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.05088 $0.05088
Opus 5 $0.02544 $0.02544
Sonnet 5 $0.01018 $0.01018
Haiku 4.5 $0.00509 $0.00509

Measured 8d ago against content hash 9c01f8adf4e7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-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 8d 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.

18. **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 · 154 lines

How it starts

The opening of the file, as written. The whole thing — 154 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 · 154 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. 8d 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 (154 stars, last pushed 9d ago), licensed MIT. It adds 5,088 tokens to every session, about $0.0254 per session on Opus 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

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens