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.
curl -O https://raw.githubusercontent.com/qhkm/zeptoclaw/main/AGENTS.mdgit clone --depth 1 https://github.com/qhkm/zeptoclawWrote 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/qhkm/zeptoclaw/agents-md)<a href="https://agentmods.dev/instructions/qhkm/zeptoclaw/agents-md"><img src="https://agentmods.dev/badge/instructions/qhkm/zeptoclaw/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/qhkm/zeptoclaw/agents-md"><img src="https://agentmods.dev/badge/instructions/qhkm/zeptoclaw/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.04007 | $0.04007 |
| Opus 5.5 | $0.01603 | $0.01603 |
| Sonnet 5.5 | $0.00801 | $0.00801 |
| Haiku 4.5 | $0.00401 | $0.00401 |
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 4d 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 — 182 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.rsthin entrypoint; CLI handlers insrc/cli/); stripped release size budgets are 11MB on linux-x86_64 and 7MB on aarch64, checked locally when relevant; 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
rumqttcno longer pins the vulnerablerustls-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; honorsproviders.fallback.provider; can wrap chain withRetryProviderviaproviders.retry.* - Provider introspection CLI:
zeptoclaw provider statusprints 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 viaGET /models - Model discoverability hardening: gateway-style slash IDs (for example
anthropic/...) only infer OpenRouter when that provider is actually available, and live/model fetchnow honorsapi_versionwhile normalizing Azure deployment bases to/openai/models - OpenAI-compatible serve tool calling:
/v1/chat/completionsforwards request tools to providers, returns assistant/tool messages plus tool-call payloads in OpenAI format, streams tool-call deltas even for providers using the defaultchat_stream()adapter, and rejects unsupportedtool_choicevalues instead of silently ignoring them - Channel dispatch: avoids holding the channels map
RwLockacross asyncsend()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_unwindand 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_identityis an explicit legacy escape hatch); WhatsApp Cloud verifiesX-Hub-Signature-256whenapp_secretis configured - Telegram allowlist hardening: numeric user IDs are the safe default for new setups; legacy username matching remains available only through
channels.telegram.allow_usernamesfor compatibility and emits warnings when non-numeric allowlist entries are present - Telegram config compatibility:
channels.telegramaccepts legacybot_token,allowed_senders, andallowed_chatskeys, and auto-enables whenenabledis omitted but a Telegram token is present - Email allowlist limitation surfaced:
channels.email.allowed_sendersmatches the parsedFromheader 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.streamingroutes 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_*) inOutboundMessage - Cron scheduling hardening: dispatch timeout + exponential error backoff + one-shot delete-after-run only on success
- Model switching: Telegram
/modelsupports per-chat overrides (in-memory + long-term) - Persona switching:
/personacommand 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
/trustoverride for local use,/modeland/personaoverrides,/tools,/template, and/clear - Memory injection: per-message query-matched injection via shared LTM on
AgentLoop(startup static injection removed) - Prompt envelope (#661): the system prompt is byte-stable (no live clock, no query memory);
ContextBuilder::build_turn_context()renders the clock + memory once per turn into a<turn-context>block prepended to a request copy of the latest user message (persisted history stays clean).ToolRegistryis aBTreeMap, so tool definitions are name-sorted. The Claude provider adds up to 4cache_controlbreakpoints (system or last tool, plus trailing messages) to the serialized request copy and debug-logs cache read/write tokens; only the firstSystemmessage becomes Claude'ssystemfield, later notices ride as user-turn text after tool results.Usage.prompt_tokensincludes cache reads/writes (folded in viaUsage::with_cache(), split kept incache_read_tokens/cache_creation_tokens), so token budgets and metrics see the full prompt;utils::cost::estimate_usage_cost()bills cache reads at 0.1x and writes at 1.25x the input rate (#711). - Long-term memory tool guidance:
longterm_memorynow 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
ZeptoAgentfacade all route throughkernel::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:
grepnow surfaces subprocess failures instead of silently returning "No matches";shelltruncates output at 2,000 lines / 50KB;edit_filerejects emptyold_textand supports optionalexpected_replacementsfor 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_injectioncarve-out instead of skipping content wholesale - Secret storage hardening: config and panel token writes use user-only permissions on Unix (0600 files and 0700 ZeptoClaw directories) and repair permissions left by older versions
- Panel auth hardening: static bearer tokens use constant-time comparison, WebSocket connections exchange them for bounded 30-second single-use tickets, and CLI output points to the token file instead of printing the secret
- Safer default execution posture: fresh configs now start in
agent_mode = "assistant"with approvals enabled under therequire_for_dangerouspolicy - 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.rsappends SHA-256-linked entries (record_audit_chain_event,verify_audit_chain_integrity,recent_audit_entries,audit_tip_hash), andkernel::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_messageandprocess_message_streamingtooljoin_allpaths - Runtime subprocess hardening: Native, Docker, Apple Container, Landlock, Firejail, and Bubblewrap scrub secret-like inherited environment variables by default;
runtime.env_passthroughexplicitly 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 checkrecognizes top-leveltunnelandr8r_bridge, plus agent defaults such astimezone,tool_timeout_secs, andsystem_prompt - Validation runs locally; GitHub Actions CI, E2E, and PR hygiene workflows are removed. Optional feature paths require local checks when changed; tag-triggered release and Docker publishing remain enabled
- Dependency audit baseline:
cargo deny checkpasses with patchedanyhow1.0.103,bcrypt0.19.2,chacha200.10.2,crossbeam-epoch0.9.20,h20.4.19,quinn-proto0.11.15,quick-xml0.41,lopdf0.42, andrustls0.23.45 (RUSTSEC-2026-0285) - Tool-schema repair:
utils::tool_schemasanitizes outbound schemas inToolRegistry::definitions*()(illegal property keys,typearrays, bare-string schemas,$refsiblings, top-level combinators,propertieson bare object schemas for llama.cpp GBNF) and repairs inbound args at every nesting depth inkernel::execute_tool()viaunrename_tool_args()+coerce_tool_args(); never rewrites a string the schema already permits, so"07030"survives a["string","integer"]union - Reasoning models:
reasoning_content(non-stream + stream delta) andfinish_reasonare parsed on the OpenAI-compatible path;resolve_assistant_text()falls back to reasoning only when there is no content and no tool calls, warning withfinish_reason. Reasoning deltas never stream as reply text.ChatOptions::with_reasoning_effort()setsreasoning_effort, omitted when unset - MCP transport: supports both HTTP and stdio MCP servers (
urlorcommand+ args/env) with tool registration duringcreate_agent() - Hands-lite:
HAND.toml+ bundled hands (researcher,coder,monitor) +handCLI - Panel CLI fallback: feature-disabled builds still parse
zeptoclaw panel ...and return explicit--features panelguidance instead of a raw unknown-subcommand error - Uninstall CLI:
zeptoclaw uninstallremoves~/.zeptoclaw;--remove-binarydeletes direct installs in~/.local/binor/usr/local/binand defers Homebrew/Cargo binaries to their package managers - Process exit codes: explicit
mainmapping 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(3531 passed, 6 skipped), andcargo test --doc(128 passed, 27 ignored)
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.
- 4d ago Changed · +1 lines · +225 tokens per session 04b6431a0491
- 1mo ago Changed · +2 lines · +206 tokens per session 68cc0cf2fbc4
- 1mo ago Changed · -80 tokens per session b600d2953281
- 1mo ago Changed · +1 lines · +42 tokens per session dcf29695f972
- 1mo ago Changed · +1 lines · +62 tokens per session f3837cc09361
- 1mo ago Changed · +2 lines · +145 tokens per session 9a9172200726
- 1mo ago First seen · 175 lines · 3,407 tokens per session scan A 682101b549e9
zeptoclaw AGENTS.md is an instructions file published in the GitHub repository qhkm/zeptoclaw (650 stars, last pushed 5d ago), licensed Apache-2.0. It adds 4,007 tokens to every session, about $0.0160 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.
Other instructions, from other repositories
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).
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.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
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.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).
deno copilot-instructions.md
Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.