Borrowing it
Nothing to install: this file belongs to pithings/zigpty. 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/pithings/zigpty/main/AGENTS.mdgit clone --depth 1 https://github.com/pithings/zigptyWrote 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/pithings/zigpty/agents-md)<a href="https://agentmods.dev/instructions/pithings/zigpty/agents-md"><img src="https://agentmods.dev/badge/instructions/pithings/zigpty/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/pithings/zigpty/agents-md"><img src="https://agentmods.dev/badge/instructions/pithings/zigpty/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.07359 | $0.07359 |
| Opus 5.5 | $0.02944 | $0.02944 |
| Sonnet 5.5 | $0.01472 | $0.01472 |
| Haiku 4.5 | $0.00736 | $0.00736 |
Grade A, and why
zigpty AGENTS.md scanned grade A 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 2mo 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.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
└── PipePty (src/pty/pipe.ts) — pure-TS fallback (child_process pipes) How it starts
The opening of the file, as written. The whole thing — 345 lines — stays where its author put it; the contents beside it link to each section on GitHub.
zigpty
Zig-based PTY library. Dual-use: standalone Zig package and Node.js NAPI addon.
Goals
- Smallest build (19KB ReleaseSmall vs node-pty's ~500KB+ with C++ runtime)
- Pure Zig PTY library with no NAPI dependency (
lib.zig) - Thin NAPI wrapper layer for Node.js (
pty.zig+pty_unix.zig+win/napi.zig+root.zig) - Raw NAPI — no third-party Zig NAPI bindings, no node-gyp
- Cross-platform (Linux + macOS + Windows)
- Statically linked via Zig
Architecture
zigpty/
├── build.zig # Zig build: exposes "zigpty" module + NAPI shared libs
├── build.zig.zon # Zig package metadata (min Zig 0.16.0)
├── build.config.ts # obuild config (bundle src/ → dist/)
├── zig/ # Zig sources (two layers)
│ ├── lib.zig # Pure Zig PTY library — platform dispatcher + shared code
│ ├── root.zig # NAPI module entry: exports platform-specific functions
│ ├── napi.zig # Raw NAPI bindings (~240 lines, extern declarations)
│ ├── pty.zig # NAPI shared helpers + platform dispatch (re-exports)
│ ├── pty_unix.zig # NAPI↔lib.zig bridge for Unix (fork, open, resize, process)
│ ├── termios.zig # Default terminal config (Linux + macOS)
│ ├── pty_linux.zig # Linux-specific: execvpe, ptsname_r, /proc, close_range
│ ├── pty_darwin.zig # macOS-specific: execvp+environ, sysctl, FD close loop
│ ├── pty_windows.zig # Windows-specific: ConPTY (CreatePseudoConsole + pipes)
│ ├── errno_shim.c # Android errno compat (__errno_location → __errno)
│ └── win/
│ ├── napi.zig # NAPI↔lib.zig bridge for Windows (spawn, write, resize, kill, close)
│ └── node_api.def # NAPI import definitions (→ .lib via zig dlltool)
├── src/ # TypeScript wrapper + tests
│ ├── index.ts # Public API: spawn(), open() — platform dispatch
│ ├── napi.ts # Native module loader (platform-aware, INativeUnix/INativeWindows)
│ ├── terminal.ts # Terminal class (Bun-compatible) + TerminalOptions type
│ ├── pty/ # PTY class hierarchy
│ │ ├── _base.ts # BasePty abstract class — shared state, events, waitFor, buildEnvPairs
│ │ ├── types.ts # IPty, IPtyOptions, IDisposable, IEvent interfaces
│ │ ├── unix.ts # UnixPty: tty.ReadStream + async fs.write
│ │ ├── windows.ts # WindowsPty: native callbacks + deferred init
│ │ └── pipe.ts # PipePty: pure-TS fallback when native bindings unavailable
│ ├── spawn.test.ts # E2E tests (platform-conditional)
│ ├── pipe.test.ts # PipePty fallback tests
│ └── terminal.test.ts # Terminal class tests
├── dist/ # Built output (obuild → .mjs + .d.mts)
├── prebuilds/ # Zig build output (8 binaries, see below)
├── scripts/
│ └── cross-platform.sh # Docker-based cross-platform smoke tests
└── .github/workflows/
└── ci.yml # PR/push: build + test (Linux, macOS, Windows)
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.
- 2mo ago First seen · 345 lines · 7,359 tokens per session scan A 35b37a90cd88
zigpty AGENTS.md is an instructions file published in the GitHub repository pithings/zigpty (127 stars, last pushed 4mo ago), licensed MIT. It adds 7,359 tokens to every session, about $0.0294 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
zigpty AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| zigpty AGENTS.mdpithings/zigpty | Instructions file | 127 | 4mo ago | MIT | A | 7,359 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 9,719 | GitHub Copilot |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 5,516 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | today | MIT | A | 4,680 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 3,093 | GitHub Copilot |
| vscode model-prompts.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 2,022 | GitHub Copilot |