Borrowing it
Nothing to install: this file belongs to wavever/Clipth. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/wavever/Clipth/main/AGENTS.mdgit clone --depth 1 https://github.com/wavever/ClipthWrote 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.
[](https://agentmods.dev/instructions/wavever/clipth/agents-md)<a href="https://agentmods.dev/instructions/wavever/clipth/agents-md"><img src="https://agentmods.dev/badge/instructions/wavever/clipth/agents-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.
<a href="https://agentmods.dev/instructions/wavever/clipth/agents-md"><img src="https://agentmods.dev/badge/instructions/wavever/clipth/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.02683 | $0.02683 |
| Opus 5.5 | $0.01073 | $0.01073 |
| Sonnet 5.5 | $0.00537 | $0.00537 |
| Haiku 4.5 | $0.00268 | $0.00268 |
Grade A, and why
Clipth AGENTS.md scanned grade A with 0 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 2mo 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 166 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENT.md
给 AI 助手(以及人类)在本仓库工作时的指引。构建、发布、改 UI 之前先读这份。
这是什么
剪迹 / Clipth —— 原生 macOS 菜单栏剪贴板管理器。
- SwiftUI + SwiftData (SQLite),macOS 14.0+,Swift 5(Xcode 16)。
- Bundle id
com.wavever.clipth;仓库wavever/Clipth。 - 默认本地 / 离线:语义搜索用 Apple
NLEmbedding,OCR 用Vision,本地 MCP 服务走 stdio。无遥测;网络仅用于 Sparkle 更新检查和用户主动配置的端到端加密同步 (iCloud 云盘 / WebDAV / 本地同步文件夹)。 - 依赖(SPM):Sparkle(自动更新)、KeyboardShortcuts(全局快捷键)。
目录结构
Clipth/
Models/ SwiftData @Model 类型 + 偏好存储(AppearancePreferences 等)
ViewModels/ ClipboardViewModel(列表/搜索/选择的核心)
Views/ SwiftUI 视图 + Theme.swift(设计系统)
Services/ 单例:ClipboardMonitor、QuickPasteController、AutoPasteService、
ToastCenter、Localization、MCPServer、UpdaterService 等
scripts/ generate-signing-cert.sh(一次性签名配置)
.github/workflows/ ci.yml(PR 构建)、release.yml(按 tag 发布)
约定:UI 与服务单例都是 @MainActor,以 .shared 暴露。SwiftData 统一走
AppContainer.shared 这唯一一个 ModelContainer(见 QuickPasteController.swift),
保证浮动面板和主窗口读写同一份数据。代码注释解释为什么而非做了什么——改代码时
保持同样的注释密度。
本地构建运行
xcodebuild -project Clipth.xcodeproj -scheme Clipth -configuration Debug \
-derivedDataPath build build
open build/Build/Products/Debug/Clipth.app
准则:开发阶段,每次完成代码开发后都必须构建并把 App 运行起来。 不要只报告编译通过;
构建失败就先修复,不算“完成”。构建成功后先杀掉旧实例,再启动刚生成的 .app,在真实
App 里验证:
pkill -f "Clipth.app/Contents/MacOS/Clipth" || true
open build/Build/Products/Debug/Clipth.app
若本次构建使用了不同的 -derivedDataPath 或 Xcode 默认 DerivedData,必须启动对应路径下
最新生成的 Clipth.app,不要启动旧产物。
本地构建会自动用 Clipth Self-Signed 身份签名(见下)。若该身份不在钥匙串里,构建会
失败——要么运行一次 scripts/generate-signing-cert.sh,要么用 CODE_SIGNING_ALLOWED=NO
做无签名构建。
代码签名(动签名相关的任何东西前必读)
App 使用固定的自签名证书(CN = Clipth Self-Signed)签名,而不是 ad-hoc。
这是关键,不能退回 ad-hoc:
- macOS 把**辅助功能(TCC)**授权绑定在 bundle 的代码签名*指定要求(designated
requirement)*上。ad-hoc 签名会让这个要求退化成每次构建都变的 cdhash,于是每次
重建/更新都会静默作废授权,而系统设置里的开关还亮着 → App 不断弹「想要使用辅助功能
控制这台电脑」。固定证书让要求变成
identifier + 证书指纹,在重建、更新、换机器后都 保持不变,授权得以保留。 ENABLE_HARDENED_RUNTIME = NO。真实签名(不同于 ad-hoc)会真正启用硬化运行时,进而 打开库校验,导致启动崩溃(Xcode 16 的*.debug.dylib/ 框架 Team-ID 不匹配)。硬化 运行时只有公证才需要,而免费自签名阶段并不公证。只有在升级到 Developer ID + 公证时 才重新开启它。
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.
- 2mo ago First seen · 166 lines · 2,683 tokens per session scan A 256060f96156
Clipth AGENTS.md is an instructions file published in the GitHub repository wavever/Clipth (29 stars, last pushed 3d ago), licensed MIT. It adds 2,683 tokens to every session, about $0.0107 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Clipth AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| Clipth AGENTS.mdwavever/Clipth | Instructions file | 29 | 3d ago | MIT | A | 2,683 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |