wu-cli: Instructions file for Codex

AGENTS.md

wu-cli AGENTS.md is an instructions file for Codex, OpenCode from ibrahimhajjaj/wu-cli. It costs 1,280 tokens per session, scanned A, original, MIT.

Instructions for wu, a command-line WhatsApp client whose background service stores messages in SQLite and serves them to the CLI and an MCP server.

In plain words
What is it for?
Building, running, and testing wu; managing its daemon; querying stored messages; and working with its CLI or MCP interface.
Why use it?
They explain the system’s single-login design and prevent starting competing WhatsApp connections that could disrupt the session.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

This is ibrahimhajjaj/wu-cli's own configuration. It tells Codex and OpenCode how to work on wu-cli 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 wu-cli configures →

Reuse

Borrowing it

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

Made for: Codex, OpenCode.

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 wu-cli AGENTS.md

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

agentmods 80×15 button for wu-cli AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/ibrahimhajjaj/wu-cli/agents-md"><img src="https://agentmods.dev/badge/instructions/ibrahimhajjaj/wu-cli/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,280 This file is loaded in full into every session.
When invoked 1,280 The same file — it is already loaded in full.
Security scan A 0 findings. 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.01280 $0.01280
Opus 5.5 $0.00512 $0.00512
Sonnet 5.5 $0.00256 $0.00256
Haiku 4.5 $0.00128 $0.00128

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

Security

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 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.

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.

AGENTS.md · 98 lines

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, uses node:test)
  • Typecheck: no dedicated script yet; use npx tsc --noEmit

Architecture

  • Daemon: wu daemon (persistent) or wu 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_fts virtual 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.ts uses StdioServerTransport; no HTTP transport exists). Tools are registered in src/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 in src/mcp/tools.ts and src/core/remote.ts.
  • Remote: sync of DB and media from a VPS over SSH - sqlite3-rsync when available, rsync (backup+rsync) fallback for the DB, plain rsync for 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 (commit 31ea821). 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 to full or read (src/core/constraints.ts, ConstraintMode in src/config/schema.ts). Respect the resolved mode (full/read/none) in any new read/write path - shouldCollect gates ingestion, assertCanSend/assertCanManage gate 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 dir 0700, and the daemon IPC socket is created 0600. Keep any new sensitive path you add under WU_HOME owner-only too.

Read the full file on GitHub · 98 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. 2mo ago First seen · 98 lines · 1,280 tokens per session scan A cfa4ce14f7a5

Subscribe to this mod's changes

wu-cli AGENTS.md is an instructions file published in the GitHub repository ibrahimhajjaj/wu-cli (14 stars, last pushed 1mo ago), licensed MIT. It adds 1,280 tokens to every session, about $0.0051 per session on Opus 5.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.

Related

wu-cli AGENTS.md compared with instructions from other repositories

wu-cli AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
wu-cli AGENTS.mdibrahimhajjaj/wu-cliInstructions file141mo agoMITA1,280Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode ai-customization.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA1,907GitHub Copilot