cli AGENTS.md

Repository instructions for the inboxapi CLI, a command-line tool whose project includes JavaScript/Node.js code, an MCP connection, packaging, and agent installation logic.

In plain words
What is it for?
Use them when changing the CLI, its Node.js subprocess handling, Rust build and test workflow, npm packaging, or agent-installation code.
Why use it?
They call out safety and reliability issues such as shell injection, lost buffered input, hanging I/O, and incorrectly parsed streamed data.

Instructions file for CodexOpenCode

Install

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.

agentmods
npx agentmods add instructions/inboxapi/cli/agents-md
Clone the repo
git clone --depth 1 https://github.com/inboxapi/cli

Made for: Codex, OpenCode.

Per session 545 This file is loaded in full into every session.
When invoked 545 The same file — it is already loaded in full.
Security scan A 1 finding. Scan, not verified.
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 $0.00545 $0.00545
Opus 5 $0.00272 $0.00272
Sonnet 5 $0.00109 $0.00109
Haiku 4.5 $0.00055 $0.00055

Measured 2d ago against content hash f368cc4f5e4a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cli 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 2d 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.

- Never use `execSync` / `execFileSync` with string interpolation — pass arguments as arrays to avoid shell injection
AGENTS.md · 40 lines

How it starts

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

CLI Agent Stub

Canonical workflow lives in ../AGENTS.md.

Repo-local notes:

  • Verification flow: cargo fmt, cargo clippy -- -D warnings, cargo test, cargo build
  • This repo owns the CLI binary, npm packaging, and agent-install setup logic
  • Canonical service docs live in ../docs/services/cli/
  • Never re-create buffered readers (BufReader) in a loop or per-call; store them in the struct so buffered data is not lost
  • Use iterators (iter().take(n)) instead of index-based for i in 0..n loops when only indexing a single collection
  • Add timeouts to any blocking I/O (network, subprocess reads) — tests and tools must not hang indefinitely
  • Include descriptive messages in all assert! / assert_eq! macros

JavaScript / Node.js

  • Never use execSync / execFileSync with string interpolation — pass arguments as arrays to avoid shell injection
  • Do not mark synchronous functions async — it is misleading and wraps the return in an unnecessary Promise
  • Handle chunked data events from child process stdout with line-based parsing (e.g. readline.createInterface), not raw JSON.parse on each chunk
  • When communicating with a subprocess over its lifetime, spawn it once and reuse the connection — do not spawn a new process per request
  • Validate all user input (bounds checks, type checks) before using it to index arrays or build commands
  • Centralize model identifiers in a single constant or environment variable; avoid scattering hardcoded dated model version strings throughout the code

MCP Protocol

  • After sending initialize, always send notifications/initialized before any other requests — skipping this violates the MCP handshake and may cause server rejection

Pre-completion Checklist

Before declaring work done, run these in order:

  1. cargo fmt — format code
  2. cargo clippy -- -D warnings — lint with zero warnings
  3. cargo test — all unit tests pass
  4. cargo build — clean compilation
  5. Test each new CLI subcommand — after building, run each new or modified subcommand against the live API to verify it works end-to-end (e.g. cargo run -- get-emails --limit 3 --human)

Read the full file on GitHub · 40 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. 2d ago First seen · 40 lines · 545 tokens per session scan A f368cc4f5e4a

Subscribe to this mod's changes

cli AGENTS.md is an instructions file published in the GitHub repository inboxapi/cli (12 stars, last pushed 2mo ago), licensed MIT. It adds 545 tokens to every session, about $0.0027 per session on Opus 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.