zeptoclaw: Instructions file for Codex

AGENTS.md

zeptoclaw AGENTS.md is an instructions file for Codex, OpenCode from qhkm/zeptoclaw. It costs 3,552 tokens per session, scanned A, original, Apache-2.0.

Project instructions for coding agents working on zeptoclaw, a Rust codebase with command-line tools, integrations, benchmarks, tests, and strict file and process rules.

In plain words
What is it for?
Use them to understand the codebase, follow its commands and ownership rules, respect binary-size limits, and complete the required checks after implementation.
Why use it?
They give agents the project facts and working constraints needed to make compatible changes without breaking repository practices.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions CLAUDE.md; mentions AGENTS.md; built for openclaw.

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

Reuse

Borrowing it

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

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 zeptoclaw AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/qhkm/zeptoclaw/agents-md.svg)](https://agentmods.dev/instructions/qhkm/zeptoclaw/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/qhkm/zeptoclaw/agents-md"><img src="https://agentmods.dev/badge/instructions/qhkm/zeptoclaw/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 3,552 This file is loaded in full into every session.
When invoked 3,552 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.03552 $0.03552
Opus 5 $0.01776 $0.01776
Sonnet 5 $0.00710 $0.00710
Haiku 4.5 $0.00355 $0.00355

Measured yesterday against content hash 9a9172200726, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

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

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 · 177 lines

How it starts

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

AGENTS.md

Project-level guidance for coding agents working in this repository.

Project Snapshot

  • Language: Rust (edition 2021)
  • Core binary: zeptoclaw (src/main.rs thin entrypoint; CLI handlers in src/cli/); stripped release size is gated at 11MB on linux-x86_64 by the binary-size CI job (runs on every PR); the "fits on a robot" 6MB moat is the aarch64 target where the binary is ~7MB — follow-up issue adds aarch64 to CI with a 7MB gate; escape valve for genuine new heavy deps is feature-gating, not bumping the budget
  • Extra binary: benchmark (src/bin/benchmark.rs)
  • Benchmarks: benches/message_bus.rs
  • Integration tests: tests/integration.rs
  • Agent coding benchmark fixture: test-coding/ with intentionally buggy Python code and stdlib verification tests
  • Pristine agent comparison fixture: test-coding-pristine/ preserves the original failing state for repeatable head-to-head runs
  • Codebase: ~154,000 lines of Rust under src/
  • Channels: 10 active built-ins (Telegram, Slack, Discord, WhatsApp Web, WhatsApp Cloud, Lark, Email, Webhook, Serial, ACP); MQTT code is present but the Cargo feature is parked until rumqttc no longer pins the vulnerable rustls-webpki
  • Runtimes: 6 (Native, Docker, Apple Container, Landlock, Firejail, Bubblewrap)
  • Peripherals: 4 boards (ESP32, RPi, Arduino, Nucleo) with GPIO, I2C, NVS, Serial
  • Skills: OpenClaw-compatible (reads metadata.zeptoclaw > metadata.openclaw > raw)
  • Plugins: Command-mode (shell template) + Binary-mode (JSON-RPC 2.0 stdin/stdout)
  • Library facade: ZeptoAgent::builder() for embedding as a crate (Tauri, GUI apps)
  • Runtime provider resolution: builds chain in registry order only when providers.fallback.enabled; honors providers.fallback.provider; can wrap chain with RetryProvider via providers.retry.*
  • Provider introspection CLI: zeptoclaw provider status prints resolved providers, wrapper config (retry/fallback), and quota usage snapshot
  • Provider onboarding validation: Anthropic uses GET /v1/models; OpenAI-compatible presets validate keys with read-only endpoint checks, including Zhipu/GLM via GET /models
  • Model discoverability hardening: gateway-style slash IDs (for example anthropic/...) only infer OpenRouter when that provider is actually available, and live /model fetch now honors api_version while normalizing Azure deployment bases to /openai/models
  • OpenAI-compatible serve tool calling: /v1/chat/completions forwards request tools to providers, returns assistant/tool messages plus tool-call payloads in OpenAI format, streams tool-call deltas even for providers using the default chat_stream() adapter, and rejects unsupported tool_choice values instead of silently ignoring them
  • Channel dispatch: avoids holding the channels map RwLock across async send() awaits
  • Channel supervisor: polling (15s) detects dead channels, restarts with 60s cooldown, max 5 restarts
  • Channel panic isolation: Slack/Discord/Webhook/WhatsApp/WhatsApp Web/WhatsApp Cloud/Lark/Email/Serial spawned tasks are wrapped with catch_unwind and panic logging; MQTT code remains present while its Cargo feature is parked
  • Webhook auth hardening: generic webhook supports optional HMAC-SHA256 body signatures plus fixed server-side sender/chat identity by default (trust_payload_identity is an explicit legacy escape hatch); WhatsApp Cloud verifies X-Hub-Signature-256 when app_secret is configured
  • Telegram allowlist hardening: numeric user IDs are the safe default for new setups; legacy username matching remains available only through channels.telegram.allow_usernames for compatibility and emits warnings when non-numeric allowlist entries are present
  • Telegram config compatibility: channels.telegram accepts legacy bot_token, allowed_senders, and allowed_chats keys, and auto-enables when enabled is omitted but a Telegram token is present
  • Email allowlist limitation surfaced: channels.email.allowed_senders matches the parsed From header only and now emits config/runtime warnings so authenticated-mail enforcement is pushed upstream
  • Telegram outbound formatting: sends HTML parse mode with ||spoiler||<tg-spoiler> conversion
  • Telegram response streaming: opt-in channels.telegram.streaming routes provider deltas through cumulative outbound stream phases, edits UTF-16-safe previews at a bounded cadence, preserves reply/topic routing, and falls back to a fresh final HTML message after preview failures
  • Discord outbound delivery: supports reply references and thread-create metadata (discord_thread_*) in OutboundMessage
  • Cron scheduling hardening: dispatch timeout + exponential error backoff + one-shot delete-after-run only on success
  • Model switching: Telegram /model supports per-chat overrides (in-memory + long-term)
  • Persona switching: /persona command with presets and custom text, LTM persistence per chat
  • CLI interactive mode: TTY-gated local slash commands with rustyline tab completion when available, persisted REPL history, inline tool approval prompts, session-scoped /trust override for local use, /model and /persona overrides, /tools, /template, and /clear
  • Memory injection: per-message query-matched injection via shared LTM on AgentLoop (startup static injection removed)
  • Long-term memory tool guidance: longterm_memory now advertises explicit use/counter-use trigger phrases so agents persist durable corrections and preferences without duplicating repo docs or task-scoped context
  • Tool execution convergence: agent loop, MCP server, and embedded ZeptoAgent facade all route through kernel::execute_tool() (shared safety scan + taint checks + single metrics recording); the facade also enforces per-tool timeout, panic capture, and optional approval handling for embedded coding backends
  • Coding tool hardening: grep now surfaces subprocess failures instead of silently returning "No matches"; shell truncates output at 2,000 lines / 50KB; edit_file rejects empty old_text and supports optional expected_replacements for safer surgical edits
  • Tool composition: natural language tool creation with {{param}} template interpolation
  • Filesystem hardening: filesystem write/edit tools now create parent directories one component at a time inside the workspace and use secure no-follow writes; mount validation rejects Unix regular-file mounts with multiple hard links in both blocked-path and allowlist flows; safety pre-scan keeps full path scanning while scanning file bodies with a narrow shell_injection carve-out instead of skipping content wholesale
  • Safer default execution posture: fresh configs now start in agent_mode = "assistant" with approvals enabled under the require_for_dangerous policy
  • Gateway startup guard: degrade after N crashes to prevent crash loops
  • Loop guard: SHA256 tool-call repetition detection with warn + circuit-breaker stop
  • In-memory audit hash-chain: src/audit.rs appends SHA-256-linked entries (record_audit_chain_event, verify_audit_chain_integrity, recent_audit_entries, audit_tip_hash), and kernel::execute_tool() now emits tool execution chain events with shell/network/spawn classification
  • Tool execution hardening: per-tool-call timeout + panic capture in both process_message and process_message_streaming tool join_all paths
  • Runtime subprocess hardening: Native, Docker, Apple Container, Landlock, Firejail, and Bubblewrap scrub secret-like inherited environment variables by default; runtime.env_passthrough explicitly opts names back in, Unix timeouts terminate/reap the process group, and timed-out Docker containers are force-removed
  • Streaming tool parity: process_message_streaming() now mirrors non-streaming hook callbacks, usage-metric accounting, success/failure logging, thinking/response feedback, and malformed tool-argument parse preservation
  • Context trimming: normal/emergency/critical compaction tiers (70%/90%/95%)
  • Session repair: auto-fixes orphan tool results, empty/duplicate messages, alternation issues
  • r8r bridge: optional WebSocket client for workflow approvals, health updates, and replay-safe duplicate-event acknowledgments
  • Config hot-reload: gateway polls config mtime every 30s and applies provider/channel/safety updates
  • Config validation: zeptoclaw config check recognizes top-level tunnel and r8r_bridge, plus agent defaults such as timezone, tool_timeout_secs, and system_prompt
  • CI feature gates now compile memory-embedding, screenshot, channel-email, google, provider-vertex, whatsapp-web, hardware, peripheral-rpi, probe, android, sandbox-landlock, sandbox-firejail, and sandbox-bubblewrap in addition to the lighter baseline feature matrix; memory-bm25 and peripheral-esp32 stay covered by dedicated test/clippy jobs
  • Dependency audit baseline: cargo deny check passes with patched anyhow 1.0.103, bcrypt 0.19.2, crossbeam-epoch 0.9.20, quinn-proto 0.11.15, quick-xml 0.41, and lopdf 0.42
  • MCP transport: supports both HTTP and stdio MCP servers (url or command + args/env) with tool registration during create_agent()
  • Hands-lite: HAND.toml + bundled hands (researcher, coder, monitor) + hand CLI
  • Panel CLI fallback: feature-disabled builds still parse zeptoclaw panel ... and return explicit --features panel guidance instead of a raw unknown-subcommand error
  • Uninstall CLI: zeptoclaw uninstall removes ~/.zeptoclaw; --remove-binary deletes direct installs in ~/.local/bin or /usr/local/bin and defers Homebrew/Cargo binaries to their package managers
  • Process exit codes: explicit main mapping for success (0) and error (1); uncaught panic/crash remains Rust default (101)
  • Tests: current local validation passes cargo fmt -- --check, cargo clippy -- -D warnings, cargo nextest run --lib (3519 passed, 6 skipped), and cargo test --doc (128 passed, 27 ignored)

Read the full file on GitHub · 177 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. yesterday Changed · +2 lines · +145 tokens per session 9a9172200726
  2. 8d ago First seen · 175 lines · 3,407 tokens per session scan A 682101b549e9

Subscribe to this mod's changes

zeptoclaw AGENTS.md is an instructions file published in the GitHub repository qhkm/zeptoclaw (649 stars, last pushed yesterday), licensed Apache-2.0. It adds 3,552 tokens to every session, about $0.0178 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.

Related

Other instructions, from other repositories

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens