ZackEyes: Instructions file for Claude Code

AGENTS.md

ZackEyes AGENTS.md is an instructions file for Claude Code, Codex, OpenCode from yangshiqi/ZackEyes. It costs 2,041 tokens per session, scanned B, original, MIT.

A project guide for developing ZackEyes, a Swift desktop app with components for hooks, sockets, panels, and session storage. It describes the required development, testing, and checking process.

In plain words
What is it for?
Use it when changing ZackEyes code, running its Swift build and tests, assembling the app, checking hook events, testing socket connections, or updating hook installation logic.
Why use it?
It gives an agent project-specific rules so changes are made in the right component, tested, compiled, and checked for side effects. It also documents safe behavior when the app or its background connections are unavailable.

Instructions file for Claude CodeCodexOpenCode

Written for Claude Code and Codex and OpenCode: SessionStart hook event, but also the file is AGENTS.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

This is yangshiqi/ZackEyes's own configuration. It tells Claude Code, Codex and OpenCode how to work on ZackEyes 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 ZackEyes configures →

Reuse

Borrowing it

Nothing to install: this file belongs to yangshiqi/ZackEyes. 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/yangshiqi/ZackEyes/master/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/yangshiqi/ZackEyes

Made for: Claude Code, Codex, OpenCode.

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 ZackEyes AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/yangshiqi/zackeyes/agents-md/github.svg)](https://agentmods.dev/instructions/yangshiqi/zackeyes/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/yangshiqi/zackeyes/agents-md"><img src="https://agentmods.dev/badge/instructions/yangshiqi/zackeyes/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.

agentmods 80×15 button for ZackEyes AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/yangshiqi/zackeyes/agents-md"><img src="https://agentmods.dev/badge/instructions/yangshiqi/zackeyes/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,041 This file is loaded in full into every session.
When invoked 2,041 The same file — it is already loaded in full.
Security scan B 1 finding. 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.02041 $0.02041
Opus 5.5 $0.00816 $0.00816
Sonnet 5.5 $0.00408 $0.00408
Haiku 4.5 $0.00204 $0.00204

Measured 2mo ago against content hash d8efa147201b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

ZackEyes AGENTS.md scanned grade B with 1 finding 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.

Reads agent configuration directoriesmediumAgent snooping

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

diff ~/.claude/settings.json ~/.claude/settings.json.backup.* # 确认只改了 hooks key
AGENTS.md · 143 lines

How it starts

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

AGENTS.md

Agent 操作手册 — 开发流程、反馈循环、变更检查清单。

开发流程

每个任务按以下步骤执行:

  1. 理解任务 — 读 ARCHITECTURE.md 确认影响的组件(Bridge / SocketServer / NotchPanel / HookInstaller / SessionStore)
  2. 检查进度 — 读 memory + git log 了解前序工作,避免重复
  3. 制定计划 — 复杂任务先 brainstorm 输出 spec(docs/superpowers/specs/),简单任务直接开始
  4. 增量实现 — 一次只做一个组件/功能,不混合无关变更
  5. 测试验证 — 编译通过 + 跑相关测试,确认不破坏现有功能(见反馈循环)
  6. 提交 — conventional commit,scope 对应组件(见提交规范)

反馈循环

编译验证

# 编译全部
swift build 2>&1 | tail -5

# 全量测试
swift test 2>&1 | tail -20

# 组装 .app bundle
make app 2>&1 | tail -3

手动验证(编码过程中)

# Bridge 功能验证 — 模拟各种 hook 事件
echo '{"hook_event_name":"SessionStart","session_id":"test-123","cwd":"/tmp"}' | \
  $(swift build --show-bin-path)/bridge --event SessionStart
echo $?  # 应该是 0(App 运行中)或 1(App 未运行,静默失败)

# Socket 连通性测试
ls -la /tmp/zackeyes.sock  # App 运行时应该存在

# Hook 注入安全性验证
diff ~/.claude/settings.json ~/.claude/settings.json.backup.*  # 确认只改了 hooks key

硬性规则

  • 编译错误 → 先修再继续,不注释掉代码绕过
  • Bridge 任何代码路径 → 受控失败时 exit(0) 静默;永不 exit(2)(旧版文档写的 exit(1) 已失效,Claude Code 新版会把它显示成 hook error)
  • NSPanel 相关变更 → 手动验证不抢焦点、不挡菜单栏点击
  • HookInstaller 变更 → 先备份一份 settings.json,测完恢复
  • 新代码应有测试覆盖(Swift Testing 为主:import Testing / @Test / #expect;个别既有文件用 XCTest,跟随同目录约定)

进度追踪

场景 方式
单会话任务 Claude Code task 系统
跨会话决策记录 .claude/memory/
大型 feature spec docs/superpowers/specs/YYYY-MM-DD-<topic>.md
实现计划 docs/superpowers/plans/YYYY-MM-DD-<topic>.md

跨会话恢复: 新对话开始时,先读 memory + git log 了解之前做到哪了,再继续。不要从头开始。

变更检查清单

提交前逐项确认:

  • 影响范围确认(哪些组件受影响:Bridge / Socket / Notch / Hooks / Session)
  • 编译通过(两个 target 都能 build)
  • 新代码有测试覆盖
  • 相关测试通过
  • 不引入安全风险(见下方额外检查)
  • 文档更新:ARCHITECTURE.md(架构变了)、CLAUDE.md(约束变了)

安全相关变更额外检查

当修改以下组件时,额外确认:

HookInstaller / CodexHookInstaller:

  • 写入前备份 settings.json.backup.{timestamp} / hooks.json.backup.{timestamp}
  • 只追加 hooks key(Claude 还有 statusLine),不修改 permissions / enabledPlugins / defaultMode / theme / Codex 任何其它字段
  • JSON 解析失败时不修改原文件
  • hook command 路径包含 zackeyes 标识 + 显式 --agent claude|codex flag
  • 卸载逻辑只移除包含 zackeyes 的条目
  • 永远不读不写 ~/.codex/config.toml(codex 默认开 hooks,碰它会引入 TOML 解析依赖 / 用户配置损坏风险)

Read the full file on GitHub · 143 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. 2mo ago First seen · 143 lines · 2,041 tokens per session scan B d8efa147201b

Subscribe to this mod's changes

ZackEyes AGENTS.md is an instructions file published in the GitHub repository yangshiqi/ZackEyes (2 stars, last pushed 2d ago), licensed MIT. It adds 2,041 tokens to every session, about $0.0082 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

awesome-ai-rules copilot-instructions.md

Instructions for Lay4U/awesome-ai-rules, covering github copilot instructions: go, inline completion priorities, go api conventions, interfaces and error patterns.

Lay4U/awesome-ai-rules · 396 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 · 9,715 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,461 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, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 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,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,750 tokens