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/ayuayue/pideck/agents-mdgit clone --depth 1 https://github.com/ayuayue/PiDeckWrote 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/ayuayue/pideck/agents-md)<a href="https://agentmods.dev/instructions/ayuayue/pideck/agents-md"><img src="https://agentmods.dev/badge/instructions/ayuayue/pideck/agents-md.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.07571 | $0.07571 |
| Opus 5 | $0.03785 | $0.03785 |
| Sonnet 5 | $0.01514 | $0.01514 |
| Haiku 4.5 | $0.00757 | $0.00757 |
Grade A, and why
PiDeck 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 3d 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 — 286 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
项目简介
PiDeck 是一个面向本地开发工作的 Electron 桌面应用,用于在多个项目目录之间管理和运行 pi RPC Agent。应用提供多项目工作区、会话时间线、历史会话恢复、文件抽屉、Git 面板、模型选择、工具调用展示、内置浏览器、中文提示词精选、技能/扩展商店以及打包发布能力,目标是让用户可以在桌面端更稳定地管理多个 pi 编码助手会话。
技术栈:Electron 38 + React 19 + TypeScript + Vite。
核心边界(不可逾越):
- pi 负责 Agent 行为、工具调用、会话读写、模型调用 —— pi 的事不要替它做。
- PiDeck 负责窗口管理、进程生命周期、会话浏览/导入、Git 面板、终端、设置 —— UI 框架的事 pi 也不要做。
- 两者通过 stdio JSON-RPC 通信,禁止引入第二条通信通道(如直接 HTTP 到 pi 内部)。
代码结构与跨层契约
本项目只维护项目根目录这一份 AGENTS.md;除非用户明确要求,不要再在子目录生成同名规则文件。docs/开发规范.md 中仍有历史架构表述,若与本文件或实际类型/API 冲突,以本文件和代码为准。
src/shared/是跨进程纯契约层:共享类型按shared/types/*.ts拆分,shared/types.ts仅做兼容导出;IPC 名称只定义在shared/ipc.ts。src/main/是唯一可访问 Node/Electron 主进程能力的业务层。main/<domain>/拥有领域行为,main/ipc/*Ipc.ts只做输入校验和适配,main/index.ts只增装配,不新增业务。src/preload/index.ts通过contextBridge暴露最小PiDesktopApi;新增 IPC 必须同步共享通道、main handler、preload 方法三处,订阅 API 必须返回 unsubscribe。src/renderer/只通过desktopApi/preload 调用桌面能力。跨组件状态使用 Jotai atom,副作用放 hook,视图放 component;不得直接 import Node/Electron 或新增第二种全局状态方案。SessionRecord.id是跨重启的稳定会话身份,agentId仅表示当前 pi 子进程。所有 runtime 命令和事件都必须带sessionId + agentId + runtimeGeneration,拒绝旧 runtime 的迟到结果。- pi 只通过 stdio JSON-RPC 与 PiDeck 通信;PiDeck 不复刻 pi 的 Agent/工具/会话行为,也不为访问 pi 引入第二条通信通道。
- 持久化结构、设置和 session catalog 变更必须兼容旧数据;listener、timer、子进程、terminal 和 watcher 必须在同一模块找到配对清理路径。
src/
├── main/ # Electron 主进程
│ ├── pi/ # pi RPC 进程管理、消息解析
│ ├── sessions/ # 会话扫描、导入、摘要缓存、SessionRuntimeCoordinator
│ ├── git/ # GitService(status/diff/commit/cherry-pick 等)
│ ├── prompts/ # PromptManager(本地模板)+ XuePromptManager(SQLite 中文精选)
│ ├── skills/ # SkillManager
│ ├── extensions/ # ExtensionManager
│ ├── settings/ # SettingsStore + DesktopProxy
│ ├── terminal/ # 终端会话管理(node-pty)
│ ├── pet/ # 桌面宠物
│ ├── feishu/ # 飞书集成(FeishuBridge + FeishuConnection)
│ ├── ipc/ # ★ IPC 域注册(sessionIpc/systemIpc/gitIpc/storeIpc/...)
│ └── web/ # Web 服务管理
├── preload/ # preload 脚本,经 contextBridge 暴露受限 IPC API
├── renderer/
│ └── src/
│ ├── atoms/ # Jotai 状态(session-first)
│ ├── components/
│ │ ├── ui-shadcn/ # 共享 UI 原语(button/dialog/input/select 等)
│ │ ├── session/ # 会话视图族(SessionView/Composer*/Timeline*)
│ │ ├── sidebar/ # 左侧栏
│ │ ├── workspace/ # 右侧抽屉(files/git/browser/editor)
│ │ └── app/ # 业务组件
│ ├── hooks/ # 渲染层 hooks(useWorkspacePanels/useSessionComposerController 等)
│ ├── i18n/ # 文案(zh-CN / en-US,rendererCopy.*.ts)
│ └── styles/ # 按域拆分的样式 + 语义 token
└── shared/ # 主/渲染共享类型(按域拆分)与 IPC 通道定义
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.
- 3d ago First seen · 286 lines · 7,571 tokens per session scan A 651ad5ba2c8f
PiDeck AGENTS.md is an instructions file published in the GitHub repository ayuayue/PiDeck (709 stars, last pushed 3d ago), licensed MIT. It adds 7,571 tokens to every session, about $0.0379 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
cindy AGENTS.md
AGENTS.md instructions for makecindy/cindy, covering cindy 客户端仓:agent 工作入口, 仓库边界, 规则组织, 当前规则索引 and 通用工作流程.
AgentCore AGENTS.md
Instructions for Lawofall/AgentCore, covering agents.md, 先读哪里, docs 与 rules and 开发 / 测试(最短).
Hopet AGENTS.md
Instructions for BinaryFroggy/Hopet, covering hopet · agent 协作规范, 0. 项目, 1. 文档, 2. swift 代码风格 and 2.1 模块组织.
keen-code AGENTS.md
Instructions for mochow13/keen-code, covering keen code, important guidelines, architecture and permission system.
codex-mobile AGENTS.md
Instructions for friuns2/codex-mobile, covering agents.md, git workflow, commits, pr review bots and performance.
P-ai AGENTS.md
AGENTS.md instructions for kawayiYokami/P-ai, covering agents.md, 项目概述, 构建与开发命令, 开发模式(前端热重载 + rust 自动重编译) and 仅启动前端 dev server(端口 1420).