Borrowing it
Nothing to install: this file belongs to hua-hua3321/shardnest. 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/hua-hua3321/shardnest/main/AGENTS.mdgit clone --depth 1 https://github.com/hua-hua3321/shardnestWrote 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/hua-hua3321/shardnest/agents-md)<a href="https://agentmods.dev/instructions/hua-hua3321/shardnest/agents-md"><img src="https://agentmods.dev/badge/instructions/hua-hua3321/shardnest/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/hua-hua3321/shardnest/agents-md"><img src="https://agentmods.dev/badge/instructions/hua-hua3321/shardnest/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.01819 | $0.01819 |
| Opus 5 | $0.00910 | $0.00910 |
| Sonnet 5 | $0.00364 | $0.00364 |
| Haiku 4.5 | $0.00182 | $0.00182 |
Grade A, and why
shardnest 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 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.
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 — 103 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
This file provides guidance to Lingma (lingma.aliyun.com) when working with code in this repository.
项目概览
shardnest(钱包服务)——开源、自托管、非托管的钱包基础设施。用户本地部署 MCP server 管理密钥,平台零密钥材料。钱包密钥生成、Shamir 2-of-3 分片、签名、恢复全部在用户本地完成;任何符合 signed_request v1 协议的平台均可接入。完整设计见 docs/DES-016-self-custodial-wallet-service.md,安全模型见 docs/SECURITY.md。
常用命令
# 安装依赖(workspace,改动任意 package.json 后必须执行)
bun install
# 单包测试(开发主循环)
cd packages/<pkg> && bun test
# 单个测试文件 / 单个用例
cd packages/<pkg> && bun test ./test/commands.test.ts
cd packages/<pkg> && bun test -t "用例名关键词"
# 全量测试(6 包:core signer cli verify-sdk protocol mcp-server)
for p in core signer cli verify-sdk protocol mcp-server; do (cd packages/$p && bun test); done
# 类型检查
bunx tsc --noEmit
# CLI 冒烟(临时目录隔离,不污染真实钱包)
SHARDNEST_HOME=$(mktemp -d) bun packages/cli/src/index.ts init
架构大图
包分层与依赖方向(严格单向)
core(纯密码学,无 IO)
├─ shamir.ts GF(2^8) SSS(生成元 3 建表;split/combine/reshare)
└─ keys.ts CSPRNG 熵(根)、BIP-39/44 派生私钥、keccak 地址、EIP-55、scrypt KEK
└─ mnemonic.ts 熵↔24 词标准编码(@scure/bip39)、seed、BIP-32 m/44'/60'/0'/0/0 派生
signvault.ts WalletVault:注入已派生私钥→EIP-191 签名→wipe(O4A:组合/派生在命令层)n_message)
└─ unlock-session.ts 令牌会话:unlock(私钥)/passphrase(口令)两型,
0600 加密落盘 + 5min TTL + rename 原子消费(单次)
cli(命令实现,MCP 的库 API 经 src/api.ts 的 exports 字段暴露)
├─ commands.ts init/restore/sign/unlock/地址校验/恢复码 CRC(sn1-<idx>-<hex>-<crc>)
├─ mailer.ts SMTP 备份分片(片③)发送(SHARDNEST_SMTP_* 环境变量)
└─ index.ts CLI 入口(掩码输入 promptSecret)
verify-sdk(平台侧验签,verify-only 零密钥)
protocol(signed_request v1:平台背书签发/钱包验签;canonicalBytes length-prefixed 二进制)
mcp-server(薄壳:凭证不进 LLM,6 工具 + 双闸门接线;独立无密钥进程为路线图 P0-3)
凭证隔离(本仓库最核心的安全架构,勿破坏)
口令与恢复码永不经 LLM 上下文。三条通道:
| 凭证 | 通道 | 机制 |
|---|---|---|
| 口令 | passphrase_token |
CLI passphrase-token 本地输入 → unlock/passphrase-* 文件(0600/5min/单次)→ MCP 消费 |
| 恢复码输入 | recovery_file_path |
只传本地文件路径,内容由 MCP 进程从 recovery-codes.txt 读取 |
| 恢复码输出 | recovery_codes_file |
MCP 响应只含文件路径 + 邮箱状态,绝不含明文 |
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.
- 8d ago First seen · 103 lines · 1,819 tokens per session scan A 33cab4de9f21
shardnest AGENTS.md is an instructions file published in the GitHub repository hua-hua3321/shardnest (0 stars, last pushed 26d ago), licensed MIT. It adds 1,819 tokens to every session, about $0.0091 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-31.
Other instructions, from other repositories
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.
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.
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).
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).
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.
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.