Borrowing it
Nothing to install: this file belongs to zhinjs/zhin. 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/zhinjs/zhin/main/.github/skills/zhin-audit/SKILL.mdgit 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/skills/zhinjs/zhin/zhin-audit)<a href="https://agentmods.dev/skills/zhinjs/zhin/zhin-audit"><img src="https://agentmods.dev/badge/skills/zhinjs/zhin/zhin-audit/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/skills/zhinjs/zhin/zhin-audit"><img src="https://agentmods.dev/badge/skills/zhinjs/zhin/zhin-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00042 | $0.00893 |
| Opus 5.5 | $0.00017 | $0.00357 |
| Sonnet 5.5 | $0.00008 | $0.00179 |
| Haiku 4.5 | $0.00004 | $0.00089 |
Grade A, and why
zhin-audit 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 1mo 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 — 64 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Zhin.js 代码审计
先建立当前分支事实,再给结论。仓库的 AGENTS.md、docs/concepts/architecture.md、目标包
package.json 和现有 harness 是契约来源;不要从旧类名或旧目录推断实现。
1. 固定审计基线
- 读取目标 diff、相关测试和最近的包 README。
- 明确比较基线与未提交改动;变更审计默认看完整 diff,不只看最后一个 commit。
- 先跑与变更对应的最小门禁,再读失败调用链。
- 报告只写有证据的问题:给出触发条件、影响、文件和最小修复方向。
2. 按范围检查
- 安全:按 安全清单 检查 Tool 策略、文件/网络/Shell 边界、Host 鉴权、凭据和输入验证。
- 性能与生命周期:按 性能清单 检查 generation 回滚、listener、timer、socket、缓存和外部请求。
- 架构:按 架构清单 检查依赖方向、Resource ownership、Feature 约定目录、Adapter 与消息链。
根据 diff 选择门禁,常用入口:
pnpm check:architecture
pnpm check:domain-module-boundaries
pnpm check:harness-paths
pnpm check:adapter-endpoint-boundaries
pnpm check:no-removed-plugin-api
pnpm check:runtime-config-boundaries
pnpm check:agent-tool-authoring-boundaries
pnpm check:skill-authoring-boundaries
pnpm check:agent-authoring-boundaries
pnpm check:hook-authoring-boundaries
pnpm check:plugin-capability-publish
包内变更先跑 pnpm --filter <pkg> test / build。发布前再根据影响面扩大到
pnpm check:all;不要用静态搜索代替测试,也不要把环境故障写成代码缺陷。
3. Zhin 当前不变量
- Plugin Runtime:
plugin.tsdefault-exportdefinePlugin();能力位于命名目录的index.ts(x)。已移除的usePlugin/getPlugin不得回归。 - Resource:setup 使用
context.resources;能力执行上下文直接context.use(token)。 generation 状态不能退回模块级 latest-value 单例。 - Tool:声明字段是
requiresApproval: never | on-risk | once | always;权限、审批与 Shell/文件/网络专用策略是不同层。builtin 安全检查统一进入packages/im/agent/src/security/policy-facade.ts的runToolPolicies。 - Adapter:优先
defineAdapter({ capabilities, create })的{ client, connect, activate?, send }契约;WS/SSE 生命周期用createEndpointLifecycle。 - 出站:
Message.$reply/Adapter.sendMessage必须经过renderSendMessage → before.sendMessage → AdapterIndex/Endpoint。 - Console 页面:
pages/<name>/index.tsx默认导出组件并命名导出meta = definePage(...)。
4. 报告格式
问题按 P0–P3 排序。每项包含:触发条件、实际影响、证据位置、建议修复。无问题时明确说明已覆盖
范围与未验证边界。不要粘贴 token、.env、用户 ID 或完整敏感请求。
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 1mo ago Changed · -131 lines · -20 tokens per session c0f078b28b6a
- 2mo ago First seen · 195 lines · 62 tokens per session scan A f1234f6682be
zhin-audit is a skill published in the GitHub repository zhinjs/zhin (136 stars, last pushed today), licensed MIT. It adds 42 tokens to every session and 893 once invoked, about $0.0002 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.
Other skills, from other repositories
review
Comprehensive security and correctness audit. Use for review, deep review, thermo nuclear, or thermonuclear requests and branch or PR diff audits.
ha-code-review
Hope-native review of uncommitted, staged, commit, branch, or PR changes: discover concrete regressions, independently verify candidates, and report actionable findings first without speculative noise.
Smart Code Review
Review a PR diff: triage its severity, then produce a depth-appropriate review with structured findings, fix suggestions, and a merge decision. Use for code review, review PR, and severity triage requests.
code-review
Review local code changes. Uses an isolated sub-agent for unbiased analysis when the main agent wrote the code; reviews directly in fresh review-only sessions. Checks correctness, conventions, performance, tests, security, and tech design compliance. Use when the user wants a code review or says "review the diff" /…
maf-anti-pattern-scanner
Scans a MAF 1.3.0 codebase for known anti-patterns AFTER migration is complete. Prefer the MCP tool MafScanAntiPatterns for one-shot scans; this skill is for understanding the rule taxonomy or contributing new anti-pattern rules. Detects insecure credential usage (DefaultAzureCredential, hard-coded keys), unsafe…
requesting-code-review
Pre-commit verification pipeline — static security scan, baseline-aware quality gates, independent reviewer subagent, and auto-fix loop. Use after code changes and before committing, pushing, or opening a PR.