pi2dsh: Instructions file for Claude Code

CLAUDE.md

pi2dsh CLAUDE.md is an instructions file for Claude Code from weijiafu14/pi2dsh. It costs 19,281 tokens per session, scanned C, original, MIT.

Repository instructions for MiniMind Notes, a learning project with teaching modules, documentation, runnable experiments, model code, training code, and datasets. They describe its folders, package manager, documentation commands, and experiment setup.

In plain words
What is it for?
Use them when editing lessons or notes, running the VitePress documentation site, building a preview, or running Python experiments and training-related code.
Why use it?
They show where educational content, notes, experiments, and machine-learning code belong. They also provide the commands needed to run the documentation site and example programs.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions subagents; mentions AGENTS.md.

This is weijiafu14/pi2dsh's own configuration. It tells Claude Code how to work on pi2dsh 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 pi2dsh configures →

Reuse

Borrowing it

Nothing to install: this file belongs to weijiafu14/pi2dsh. 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/weijiafu14/pi2dsh/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/weijiafu14/pi2dsh

Made for: Claude Code.

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 pi2dsh CLAUDE.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/weijiafu14/pi2dsh/claude-md"><img src="https://agentmods.dev/badge/instructions/weijiafu14/pi2dsh/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19,281 This file is loaded in full into every session.
When invoked 19,281 The same file — it is already loaded in full.
Security scan C 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.19281 $0.19281
Opus 5.5 $0.07712 $0.07712
Sonnet 5.5 $0.03856 $0.03856
Haiku 4.5 $0.01928 $0.01928

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

Security

Grade C, and why

pi2dsh CLAUDE.md scanned grade C 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 yesterday.

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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

手动 `rm -rf <profile>/node_modules/pi2dsh/dist && cp -R dist ...`。
CLAUDE.md · 781 lines

How it starts

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

CLAUDE.md — pi2dsh 工作准则

pi2dsh:通用 Pi Host ABI 兼容层,让 Pi 生态插件原样跑在 DeepSeek Harness (DSH) 上。本文件是本仓库一切工作的标准,任何新 session 开工前先读完。 违反任何一条 = 返工。每条标准背后的真实事故记录在 docs/STANDARDS.md——改标准前先读事故。

总纲一句话:对用户,一切是 DSH;对插件,一切是 Pi;中间层是唯一的 翻译官,且能借 DSH 官方的力就绝不自己造。

当前宿主基线(2026-10-19 用户确认,优先于下文历史双代说明)

  • 2026-10-26:0.27.1 同时验收 DSH 0.2.1-rc.2 与 0.2.1-rc.3, 对外 peers 使用已验证精确版本的有限并集;开发依赖与每轮测试图仍只允许一个精确版本。 不能把开发图的单版本约束误用于对外兼容范围,也不放行未来未知版本。
  • 0.27.0 对齐 DSH 0.2.1-rc.2;peer 与开发依赖锁定验收版本, Pi 公开 ABI 仍为 0.84.1。升级宿主先验收,再放宽版本声明。
  • 0.26.0 对应 DSH 0.2.0-rc.2,保留发布检查点,不把旧代分支带进新主线。
  • 旧版以 v0.25.2 等发布 tag 为检查点。有具体故障再从对应检查点分支修复, 不在新主线堆叠旧 DSH 运行时分支;这不删除用户数据,格式迁移继续归 DSH。
  • DSH 已串行等待 agent/created:直接返回逐 Agent 的挂载 promise, 不再用首次 assembly 补快照或 pre-execute 门模拟初始化等待。
  • 工具结果使用 V4 原生 role: 'tool';消息、事件和 Pi 导出保持同一语义。
  • 子代理完成必须关联实际领取的 prompt 与 turn;错误、取消、token 上限必须 进入 Pi 终态,不能把任何 turn/end 都投影成成功空结果。
  • 新版尚在验收时文档明确写开发中;契约通过不替代真实 CLI/Web 功能回归。

一、用户安装使用标准

用户只用 DSH 官方命令,装一次引擎,之后装谁用谁,全程没有我们发明的步骤。

  • 姿势:dsh plugin add pi2dsh 装一次引擎;之后 dsh plugin add <Pi插件原包> 直装 npm 原包。零转换、零生成产物;装了才挂、卸了就没。 代码里没有第二条路:convert/host 命令、generateBundle/generateHostBundle 导出、src/generator.ts 已整体删除(2026-08-16)。留着它们的真实代价不是 "多一个特例",而是验证会架在错的路上 —— 主集成测试和真机端到端都曾 在装转换产物,跑得再绿也证明不了用户那条路。开发和测试必须同一条路。
  • 一份引擎实例挂所有插件:一个模型目录、一个 /login、一个凭证存储、 一个升级单元。禁止多份桥拷贝各自为政(事故:/login-2 自撞)。host 级 资源(provider 目录/catalog/伴生映射/登录/凭证存储)经 SharedHostState 跨包单份共享;包级资源(tools/commands/events)各归各。零个社区 Pi 包 也必须挂 host 级运行时:内建 OAuth provider、/login、凭证恢复和伴生路由 属于引擎,不得因插件发现结果为空而跳过。零包 profile 还是最快挂载路径, 对组合服务的挂载期立即探测在这里必挂(2026-08-30 事故:凭证恢复用 optionalService 立即探测 credentials,零包时服务未组合、存量登录路由全丢 MISSING_CREDENTIAL,装任意包就"碰巧"好——对组合服务一律 ctx.inject 等到位, 且零包 profile 是必测回归形状,契约测试在 tests/dsh-runtime.spec.ts)。
  • 升级解耦:升引擎不动插件、升插件不动引擎;lockfile 锁死,只有显式 add <pkg>@latest 才动;pi2dsh inspect <pkg>@<版本> 是升级预检门。
  • 发现机制 = 读 profile 依赖清单(每项都是用户显式 add 的)+ Pi 官方 pi 字段/目录约定判定包身份;绝不扫 node_modules(Prettier 3 弃用 目录扫描的公开教训)。config packages/exclude 显式收窄兜底。
  • 引擎自身依赖必须干净:不带任何安装脚本(pnpm 对传递依赖的安装脚本 报错性拦截,用户第一条命令就会炸——事故:pi-ai→genai→protobufjs)、 不拖 CLI-only 大件(事故:typescript 23MB 白下载;现为 optional peer + 懒加载分包,改依赖后必须验证引擎 chunk 的加载路径)。
  • 撞上宿主安全门(pnpm 构建脚本审批)不绕:那是用户拍板的权利。文档 写清应对即可(allowBuilds 设 true / approve-builds)。
  • 加/卸插件后要重启 dsh(挂载在启动时);先卸插件再卸引擎;伴生路由等 引擎配置是 per-profile 的,每个用到的 profile 配一份。

Read the full file on GitHub · 781 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. yesterday Changed · +12 lines · +318 tokens per session bac79cbe5e06
  2. 2d ago Changed · +3 lines · +101 tokens per session dc87308f9bdd
  3. 9d ago Changed · +1 lines · +38 tokens per session 43baabf7d85c
  4. 15d ago Changed · +13 lines · +301 tokens per session fca9e4d1a4a3
  5. 1mo ago Changed · +21 lines · +707 tokens per session b8f4128e3aaf
  6. 1mo ago Changed · +117 lines · +3,352 tokens per session c574ffecbe11
  7. 2mo ago First seen · 614 lines · 14,464 tokens per session scan C de6a3912b15f

Subscribe to this mod's changes

pi2dsh CLAUDE.md is an instructions file published in the GitHub repository weijiafu14/pi2dsh (214 stars, last pushed 2d ago), licensed MIT. It adds 19,281 tokens to every session, about $0.0771 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

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,731 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 4,261 tokens