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/ibrahimhajjaj/wu-cli/agents-mdgit clone --depth 1 https://github.com/ibrahimhajjaj/wu-cliWhat 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.01280 | $0.01280 |
| Opus 5 | $0.00640 | $0.00640 |
| Sonnet 5 | $0.00256 | $0.00256 |
| Haiku 4.5 | $0.00128 | $0.00128 |
Grade A, and why
wu-cli 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 — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
Orientation for anyone (human or assistant) working in this repo.
What this is
WhatsApp CLI ("wu"), built on @whiskeysockets/baileys. A daemon collects
messages into SQLite; the CLI and an MCP server read/act through it.
Commands
- Build:
npm run build(tsc && chmod +x dist/cli/index.js) - Dev (run from source):
npm run dev -- <args>(tsx src/cli/index.ts) - Test:
npm test(tsx --test tests/*.test.ts, usesnode:test) - Typecheck: no dedicated script yet; use
npx tsc --noEmit
Architecture
- Daemon:
wu daemon(persistent) orwu listen(foreground) holds the only live WhatsApp socket and ingests messages into SQLite + FTS5. Both commands take the same lock file (src/core/lock.ts), so only one can run at a time. Source:src/core/listener.ts,src/core/store.ts,src/db/schema.ts(messages_ftsvirtual table),src/db/database.ts. - IPC: CLI and MCP reach a running daemon over a Unix domain socket
(
src/core/ipc.ts, newline-delimited JSON) to reuse the single login. Never open a second WhatsApp login while the daemon runs - Baileys treats a second socket as a competing session and can drop both. - MCP: stdio-only server (
src/mcp/server.tsusesStdioServerTransport; no HTTP transport exists). Tools are registered insrc/mcp/tools.ts- 35 tools as of this writing (grep -c 'server.tool(' src/mcp/tools.ts). - Run-mode ladder for write/media tools: in-process socket (
getSock()) → daemon IPC (daemonIpcAvailable/daemonRequest) → remote SSH (sshWuExec). See the per-tool fallbacks insrc/mcp/tools.tsandsrc/core/remote.ts. - Remote: sync of DB and media from a VPS over SSH -
sqlite3-rsyncwhen available,rsync(backup+rsync) fallback for the DB, plainrsyncfor media. Source:src/core/remote.ts.
Invariants (do not violate)
- Baileys is pinned EXACT (
7.0.0-rc13) on purpose - deterministic deploys of a reverse-engineered library (commit31ea821). Do not widen the range; bump only deliberately and test against a real session. - Opt-in constraint model: the default constraint mode is
none, meaning nothing is collected until a chat is explicitly set tofullorread(src/core/constraints.ts,ConstraintModeinsrc/config/schema.ts). Respect the resolved mode (full/read/none) in any new read/write path -shouldCollectgates ingestion,assertCanSend/assertCanManagegate writes. - MCP is stdio-only. Do not add an HTTP transport without a reason.
- Message content off the wire is untrusted data (a prompt-injection surface for MCP consumers reading chat history). Do not let it drive tool calls implicitly.
~/.wu(WU_HOME) holds auth credentials, the message DB, and media - all sensitive.ensureWuHome(src/config/paths.ts) creates it and the auth dir0700, and the daemon IPC socket is created0600. Keep any new sensitive path you add underWU_HOMEowner-only too.
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 · 98 lines · 1,280 tokens per session scan A cfa4ce14f7a5
wu-cli AGENTS.md is an instructions file published in the GitHub repository ibrahimhajjaj/wu-cli (14 stars, last pushed 21d ago), licensed MIT. It adds 1,280 tokens to every session, about $0.0064 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
gemini-cli GEMINI.md
Gemini CLI instructions for google-gemini/gemini-cli, covering gemini cli project context, project overview, building and running, testing and quality and development conventions.
java-sdk AGENTS.md
AGENTS.md instructions for modelcontextprotocol/java-sdk, covering mcp java sdk, modules, prerequisites, build & test and evolving mcpschema records.
go-whatsapp-web-multidevice AGENTS.md
Instructions for aldinokemal/go-whatsapp-web-multidevice, covering project knowledge base, structure, where to look, code map and conventions.
studio AGENTS.md
AGENTS.md instructions for decocms/studio, covering repository guidelines, documentation philosophy, commands, development and start full dev environment (migrations + client + server).
open-bsp-api CLAUDE.md
Claude Code instructions for matiasbattocchia/open-bsp-api, covering claude.md, project overview, local checks must match ci (deno), debugging production edge functions and timestamps.
agent CLAUDE.md
Instructions for 1mcp-app/agent, covering claude.md, repository information, development commands, setup and build & run.