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 rules/saynaai/sayna/axumgit clone --depth 1 https://github.com/SaynaAI/saynaWrote 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/rules/saynaai/sayna/axum)<a href="https://agentmods.dev/rules/saynaai/sayna/axum"><img src="https://agentmods.dev/badge/rules/saynaai/sayna/axum.svg" alt="Measured on agentmods" 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 | $0.02160 | $0.02160 |
| Opus 5 | $0.01080 | $0.01080 |
| Sonnet 5 | $0.00432 | $0.00432 |
| Haiku 4.5 | $0.00216 | $0.00216 |
Grade A, and why
axum 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 5d 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 — 172 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Axum Best Practices: A Comprehensive Guide (0.8+)
This guide provides best practices for developing applications using the Axum framework in Rust, enhanced with WebSocket support for building atomic web services. It covers code organization, common patterns, performance, security, WebSocket specifics, testing, pitfalls, and tooling.
Note: This project uses Axum 0.8.x (released January 2025). Minimum Rust version: 1.75.
1. Code Organization and Structure
A clear project layout improves maintainability and scalability. Consider the following structure:
project_root/
├── src/
│ ├── main.rs # Application entry point (sets up Router + server)
│ ├── lib.rs # Shared library for core logic
│ ├── routes/ # Route definitions
│ │ ├── mod.rs
│ │ ├── api.rs # REST endpoints
│ │ ├── ws.rs # WebSocket routes and upgrade handlers
│ ├── handlers/ # Request handlers and WebSocket message handlers
│ │ ├── mod.rs
│ │ ├── api_handlers.rs
│ │ ├── ws_handlers.rs
│ ├── services/ # Business logic services
│ │ ├── mod.rs
│ │ ├── user_service.rs
│ │ ├── chat_service.rs # WebSocket message routing
│ ├── middleware/ # Tower middleware layers
│ │ ├── mod.rs
│ │ ├── auth.rs
│ │ ├── logging.rs
│ ├── state/ # Shared application state
│ │ ├── mod.rs # Defines AppState struct (use `State<AppState>` extractor)
│ ├── errors/ # Error types and conversion to responses
│ │ ├── mod.rs
│ │ ├── app_error.rs # Implements `IntoResponse`
│ ├── utils/ # Utility functions (e.g., DB pool setup)
│ │ ├── mod.rs
│ │ ├── db.rs
├── tests/ # Integration tests
│ ├── api_tests.rs # Tests for HTTP endpoints
│ └── ws_tests.rs # WebSocket integration tests
├── Dockerfile # Containerization
├── Cargo.toml
└── .env
1.1 Naming Conventions
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.
- 5d ago First seen · 172 lines · 2,160 tokens per session scan A daa95ecbc879
axum is a cursor rule published in the GitHub repository SaynaAI/sayna (311 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 2,160 tokens to every session, about $0.0108 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 cursor rules, from other repositories
cursorrules
You have access to the fleet voice gateway: TTS (windows/gemini/hume/elevenlabs/gemma), local STT (FunASR), offline wake word, RAG over speech docs, and a Voice Command Bus into fleet-agent.
rust-module-refactor
Use when splitting Rust modules, moving tests, tightening visibility, or preserving facades during refactors.
rust-architect
PoolAI — Rust Architect workflow: runtime stack, MSYS2, target/ disk, pre-push checks, docs sync.
table-of-contents-standard
Standard section ordering and TOC format for Verus source files.
arc-deref-pattern
When implementing parallel (Mt) algorithms in Verus, do NOT assume.
wrap-vs-specify
When to use externaltypespecification vs wrapper struct for Verus specs.