Borrowing it
Nothing to install: this file belongs to rudraptpsingh/axon. 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/rudraptpsingh/axon/master/CLAUDE.mdgit clone --depth 1 https://github.com/rudraptpsingh/axonWrote 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/rudraptpsingh/axon/claude-md)<a href="https://agentmods.dev/instructions/rudraptpsingh/axon/claude-md"><img src="https://agentmods.dev/badge/instructions/rudraptpsingh/axon/claude-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/rudraptpsingh/axon/claude-md"><img src="https://agentmods.dev/badge/instructions/rudraptpsingh/axon/claude-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.03902 | $0.03902 |
| Opus 5 | $0.01951 | $0.01951 |
| Sonnet 5 | $0.00780 | $0.00780 |
| Haiku 4.5 | $0.00390 | $0.00390 |
Grade A, and why
axon CLAUDE.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 9d 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 — 134 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md -- axon
Project Overview
axon is a zero-cloud, privacy-first MCP (Model Context Protocol) server that gives AI coding agents real-time local hardware awareness. It tells developers what is slowing their machine and how to fix it -- without sending a single byte off-device. Supports macOS, Linux, and Windows.
Architecture
crates/
axon-core/ # Data types, EWMA baseline tracker, impact engine, process grouping, collector loop
axon-server/ # MCP server (7 tools via rmcp #[tool_router])
axon-cli/ # Binary: serve | diagnose | status | setup | query
- axon-core is a library crate. All data types live in
types.rs. The collector loop incollector.rsruns every 2 seconds, refreshing sysinfo and updating per-process EWMA baselines. Process grouping ingrouping.rsaggregates child processes by app name (e.g., Chrome helpers → "Google Chrome"). - axon-server exposes 7 MCP tools over stdio:
hw_snapshot,process_blame,battery_status,system_profile,hardware_trend,session_health,gpu_snapshot. Uses rmcp 1.x with#[tool_router]and#[tool_handler]macros. - axon-cli is the binary entry point (package name
axon). Agent setup is explicit viaaxon setup(supports claude-desktop, claude-code, cursor, vscode).
Key Technical Details
- rmcp quirk:
serve()returns aRunningServicehandle. You MUST call.waiting().awaiton it or the server exits immediately after initialization. This was a hard-won lesson. - rmcp exits on stdin EOF: If the MCP client sends no
initializerequest, rmcp returnsError: connection closed: initialize requestfromserve(). Any code afterserve().await?is never reached. Never put critical logic (e.g. alert persistence) solely insiderun_server— it will be skipped when there is no MCP handshake. - stdio contract: stdout is reserved exclusively for MCP JSON-RPC. All logging goes to stderr via
tracing. Neverprintln!from the server path. - Claude Desktop PATH: Claude Desktop's subprocess PATH is limited to system directories. Always use absolute binary paths in
claude_desktop_config.json. - sysinfo 0.33:
component.temperature()returnsOption<f32>, notf32. - EWMA: Three timescales per process — fast (α=0.4, ~5s), medium (α=0.2, ~10s), slow (α=0.05, ~40s). Each uses an Adaptive EWMA (Capizzi & Masarotto 2003) with Huber score to resist baseline drift during sustained anomalies. Warmup: fast needs 2 samples, medium 3, slow 8. The slow delta drives
ram_growth_gb_per_secandrss_growth_rate_mb_per_hr. Seecrates/axon-core/src/ewma.rs. - Impact / alert thresholds: Tunable in
crates/axon-core/src/thresholds.rs(RAM warn/critical %, thermal °C, anomaly classification, impact score bands, persistence sample count). Lower values trigger sooner. - No network calls: This is a core design constraint. Never add telemetry, analytics, or any outbound network activity.
- Alert dispatch config: Default path is
~/.config/axon/alert-dispatch.json. SetAXON_CONFIG_DIRto a directory to load<dir>/alert-dispatch.jsoninstead, or passaxon serve --config-dir <dir>(CLI wins over the env var).--alert-webhook ID=URLand--alert-filter channel.key=valuemerge into the loaded file config (seeaxon_core::alert_config::apply_cli_overrides). - Alert triggers and consumption: Alerts are edge-triggered (RAM/throttle/impact transitions), not periodic pings. Persistence is in the collector (
collector.rs): alerts are inserted into SQLite the moment they are detected, independent of any MCP connection.alert_senderinaxon-serveronly handles webhook dispatch and MCP logging notifications (dispatch_webhooks_only). Webhooks: add awebhook-type channel inalert-dispatch.json; Axon POSTs JSON (WebhookPayload) to the URL (fire-and-forget). To consume locally, runpython3 scripts/alert_receiver_minimal.pyand paste the printed URL into config, then reload MCP. MCP: eligible alerts also usenotifications/message(logging), which many clients do not surface prominently—prefer webhooks for reliable delivery. Proof of POST + filters:cargo test -p axon-core --test alert_integration. Live machine runs may see zero webhooks if nothing transitions; useALERT_E2E_WAITwithscripts/test_alert_webhooks_live.pyor generate load. - Alert state injection for tests: Set
AXON_TEST_PREV_RAM_PRESSURE,AXON_TEST_PREV_IMPACT_LEVEL,AXON_TEST_PREV_THROTTLINGto inject previous state into the collector (forces a known edge transition on tick 4). SetAXON_TEST_PRESERVE_PREV_DURING_WARMUP=1to hold those injected values through the 3-tick warm-up window. - GPU monitoring: Implemented in
crates/axon-core/src/gpu.rs. macOS readsioreg -r -c IOAccelerator(no sudo). Linux triesnvidia-smifirst, then AMD sysfs (/sys/class/drm/cardN/device/gpu_busy_percent,mem_info_vram_used,mem_info_vram_total). Windows triesnvidia-smifirst (NVIDIA GPUs), then falls back to GPU Engine performance counters (real-time utilization for AMD/Intel/NVIDIA) combined with WMIWin32_VideoController(model name + total VRAM). GPU static info is cached; utilization is refreshed every 5 ticks (~10s) to avoid PowerShell startup overhead.GpuSnapshot.detectedisfalsewhen no GPU is found; the narrative will say "No GPU detected" rather than returning all-null fields silently. The collector always stores the snapshot (never skips it) sodetected=falsereaches the MCP layer. Unit tests for the nvidia-smi CSV parser run on Linux and Windows without hardware; live tests are gated behind--ignored. - Claude/Cursor issue detection signals: The collector detects 20+ failure patterns derived from open GitHub issues in anthropics/claude-code. Signals live in two structs:
ClaudeAgentInfo(per-process) andHwSnapshot(system-wide). Sampling cadence: most signals fire every tick (2s);dot_claude_size_gbandlarge_session_file_mbare sampled every 30 ticks (~60s) to amortize filesystem overhead. Key signals and their issue references:child_churn_rate_per_sec— zombie storm (#34092): parent spawning >20 children/tickio_read_mb_per_sec— polling/re-read loop (#22543): >50 MB/s reads with low CPUidle_cpu_spin_secs— futex/pread busy-wait: CPU >30% with no children and no I/O for >60srss_growth_rate_mb_per_hr— node-pty ArrayBuffer leak (#31511, #33118): EWMA growth >50 MB/hrsystem_fd_pct— inotify watcher exhaustion (#11136):/proc/sys/fs/file-nrpool >85%oom_freeze_risk— Linux hard freeze: MemFree+SwapFree <64MB with SwapFree=0large_session_file_mb— sync load hang (#21022): largest.jsonl>40MBbun_crash_trajectory— mimalloc OOM (#21875, #29192): uptime >4h AND growth >300 MB/hrdot_claude_size_gb— runaway logs/cache (#16093, #26911): ~/.claude/ total sizemcp_server_count— commit charge drain: count of running MCP server processesstale_session_count— invisible wait states: claude PIDs with >24h uptime and >200MB RAMzombie_child_count— per-PID zombie children (complement to churn rate)subagent_orphan_count_total— all PPID=1 claude/bun (broadensorphan_pids)
- Collector helper functions (Linux-only unless noted):
read_system_fd_pct()reads/proc/sys/fs/file-nr;check_oom_freeze_risk()reads/proc/meminfo;read_pid_io_bytes(pid)reads/proc/<pid>/io;read_dot_claude_size_gb()walks~/.claude/(all platforms);count_mcp_servers(sys)scans process cmdlines (all platforms);largest_session_file_mb(session_id)globs~/.claude/projects/**/*.jsonl(all platforms). - Per-tick state maps in collector:
prev_child_counts,prev_io_read_bytes,idle_spin_ticksare evicted each tick alongsideagent_idle_ticksandagent_d_state_ticksusingretain(|pid,_| active_pids.contains(pid)). All are keyed by claude PID and bounded to the live process set. - Memory footprint: Measured on Linux debug build — VmRSS 4.6 MB steady state. RSS does not grow over time because
SnapshotRingusesVecDeque::with_capacity(1800)(pre-allocates the full 1h ring at startup). Breakdown: ring buffer ~750 KB, EWMA store ~43 KB (200 PIDs), sysinfo System ~600 KB, SQLite WAL ~700 KB, Tokio runtime ~750 KB. Comparable to collectd (~5–15 MB); 7–10× lighter than Prometheus node_exporter (~25 MB); 40–80× lighter than Netdata (~100–150 MB). Any Python/Node.js/Bun MCP server alternative carries a 20–43 MB runtime floor before monitoring logic runs.
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.
- 9d ago First seen · 134 lines · 3,902 tokens per session scan A b93750c3d482
axon CLAUDE.md is an instructions file published in the GitHub repository rudraptpsingh/axon (9 stars, last pushed 1mo ago), licensed MIT. It adds 3,902 tokens to every session, about $0.0195 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-31.
Other instructions, from other repositories
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.
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.
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).
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).
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.
deepseek-harness AGENTS.md
AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.