Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/zhinjs/zhin/zhin-packagesgit clone --depth 1 https://github.com/zhinjs/zhinWrote 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/zhinjs/zhin/zhin-packages)<a href="https://agentmods.dev/instructions/zhinjs/zhin/zhin-packages"><img src="https://agentmods.dev/badge/instructions/zhinjs/zhin/zhin-packages.svg" alt="Measured on agentmods" 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 | $0.00477 | $0.00477 |
| Opus 5 | $0.00238 | $0.00238 |
| Sonnet 5 | $0.00095 | $0.00095 |
| Haiku 4.5 | $0.00048 | $0.00048 |
Grade A, and why
zhin zhin-packages.instructions.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 5d 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.
What it actually says
Zhin 核心包默认开发习惯
在 basic 和 packages 目录下编辑代码时自动生效。
分层边界
- 依赖方向保持单向:basic → kernel → ai → core → agent → zhin。
- kernel 和 ai 不应引入 IM 概念,如 Adapter、Bot、Message。
目录语义
- Node 侧源码放 src/,构建产物放 lib/。
- 浏览器侧源码放 client/,构建产物放 dist/。
- 不要把仅浏览器代码混进 src/,也不要把服务端实现放进 client/。
导入与导出
- TypeScript 本地导入通常必须带 .js 扩展名。
- 包的 public surface 应与真实构建产物一致;不要新增指向不存在文件的 exports。
- 变更聚合导出时,优先检查 packages/im/zhin/src/index.ts 是否需要同步。
运行时不变量
- 如果改动涉及 Plugin 上下文,usePlugin() 只能在模块顶层调用。
- 如果改动涉及 IM 出站消息,必须保留统一链路:Message.$reply 或 Adapter.sendMessage → renderSendMessage → before.sendMessage → 平台 Endpoint。
- 不要新增绕过 before.sendMessage 的发送捷径。
变更落点
- Plugin、Adapter、Dispatcher、消息链:packages/im/core。
- AI 引擎、Session、Memory、Compaction、Provider:packages/im/ai。
- AI 编排、工具发现、安全策略、MCP client:packages/im/agent。
- 应用入口与聚合 re-export:packages/im/zhin。
- 底层通用能力:basic/* 和 packages/im/kernel。
验证习惯
- 优先运行最小范围验证:pnpm --filter build、pnpm --filter test。
- 跨包类型改动再运行 pnpm type-check。
- 如果改动影响架构边界、目录约定或包导出,检查 docs/architecture-overview.md 和 docs/contributing/repo-structure.md 是否需要同步。
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.
- 5d ago First seen · 44 lines · 477 tokens per session scan A 14ff214b525a
zhin zhin-packages.instructions.md is an instructions file published in the GitHub repository zhinjs/zhin (135 stars, last pushed yesterday), licensed MIT. It adds 477 tokens to every session, about $0.0024 per session on Opus 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.
Other instructions, from other repositories
AgentEval maf-upgrade-preparation.instructions.md
Instructions for analyzing a new MAF version and producing an upgrade plan BEFORE updating the NuGet package.
AgentEval copilot-instructions.md
Copilot instructions for AgentEvalHQ/AgentEval, covering agenteval - ai coding agent instructions, architecture overview, environment setup, optional: secondary models for comparison and build & test commands.
AgentEval tracing.instructions.md
Guidelines for implementing trace recording and replay.
lobu AGENTS.md
AGENTS.md instructions for lobu-ai/lobu, covering repo map, unrecoverable — never do these, facts you cannot derive, ship a change and how to work.
api2mcp4j CLAUDE.md
Claude Code instructions for TheEterna/api2mcp4j, covering claude.md, 项目概述, 顶层授权框架(必读), 开发心法与规范导航 and 通用心法(docs/rules/global/,所有会话默认生效).
skill-based-architecture AGENTS.md
Instructions for WoJiSama/skill-based-architecture, covering agents.md, quick routing (survives context truncation), auto-triggers and red flags — stop.