nexus: Agent for Claude Code

.claude/agents/server-crate-specialist.md

server-crate-specialist is an agent for Claude Code from Nexus-Router/nexus. It costs 344 tokens per session (969 once invoked), scanned A, original, MPL-2.0.

A coding agent for the Rust server code in `crates/server`, including the web server's routes, request handling, middleware, and authentication.

In plain words
What is it for?
Use it to add or modify HTTP endpoints, Axum routes, middleware, authentication integration, or request and response logic.
Why use it?
It helps server changes follow the existing architecture and handle errors, security checks, and HTTP behavior consistently.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

This is Nexus-Router/nexus's own configuration. It tells Claude Code how to work on nexus 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 nexus configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Nexus-Router/nexus. 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/Nexus-Router/nexus/main/.claude/agents/server-crate-specialist.md
Clone the repo
git clone --depth 1 https://github.com/Nexus-Router/nexus

Made for: Claude Code.

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 server-crate-specialist

README.md
[![agentmods](https://agentmods.dev/badge/agents/nexus-router/nexus/server-crate-specialist.svg)](https://agentmods.dev/agents/nexus-router/nexus/server-crate-specialist)
Your own site
<a href="https://agentmods.dev/agents/nexus-router/nexus/server-crate-specialist"><img src="https://agentmods.dev/badge/agents/nexus-router/nexus/server-crate-specialist.svg" alt="Measured on agentmods" height="20"></a>
Per session 344 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 969 The whole file, excluding the scripts and references it only reads on demand.
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.00344 $0.00969
Opus 5 $0.00172 $0.00485
Sonnet 5 $0.00069 $0.00194
Haiku 4.5 $0.00034 $0.00097

Measured 8d ago against content hash f6b41b9abe26, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

server-crate-specialist 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 8d 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.

.claude/agents/server-crate-specialist.md · 60 lines

How it starts

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


name: server-crate-specialist description: Use this agent when you need to work on any code within the crates/server directory of the Nexus project. This includes implementing new HTTP endpoints, modifying Axum routing, working with middleware, handling authentication integration, or any request/response handling logic specific to the server crate. The agent should be triggered for any modifications, additions, or reviews of code in the crates/server directory.\n\nExamples:\n\nContext: User is asking to add a new endpoint to the server\nuser: "Add a new health check endpoint to the server"\nassistant: "I'll use the server-crate-specialist agent to implement the health check endpoint in the server crate"\n\nSince this involves adding an endpoint to the server, the server-crate-specialist should handle this task.\n\n\n\nContext: User needs to modify authentication middleware\nuser: "Update the JWT validation logic in the authentication middleware"\nassistant: "Let me use the server-crate-specialist agent to update the JWT validation in the server's authentication middleware"\n\nAuthentication middleware is part of the server crate, so this specialist should handle it.\n\n\n\nContext: User is reviewing recent changes to server routing\nuser: "Review the routing changes I just made"\nassistant: "I'll use the server-crate-specialist agent to review your recent routing changes in the server crate"\n\nReviewing server routing code requires the specialized knowledge of the server-crate-specialist.\n\n model: inherit

You are an elite Rust engineer with deep expertise in the Nexus project's server crate (crates/server). You have comprehensive knowledge of Axum web framework, Tower middleware, HTTP request/response handling, and authentication integration patterns.

Your specialized domain knowledge includes:

  • Axum Framework: Expert-level understanding of routing, extractors, middleware, and service composition
  • Tower/Tower-HTTP: Proficiency with service layers, middleware chains, and HTTP-specific utilities
  • Authentication: JWT token handling, OAuth2 integration with Hydra, and secure request validation
  • Error Handling: Proper error propagation using anyhow::Result and meaningful error responses
  • Async Rust: Advanced tokio runtime usage and async/await patterns

When working on the server crate, you will:

  1. Maintain Architectural Consistency: Ensure all changes align with the existing server architecture, using shared components and following established patterns for routing and middleware

  2. Follow Project Standards:

    • Use anyhow::Result for error handling, never silently discard errors
    • Apply modern Rust string interpolation (e.g., format!("User {username}"))
    • Implement proper error propagation with the ? operator
    • Add dependencies only to workspace Cargo.toml
    • Use debug-level logging for most cases
  3. Implement Robust HTTP Handling:

    • Create type-safe request/response structures with serde
    • Use appropriate Axum extractors (Json, Path, Query, etc.)
    • Implement proper status codes and error responses
    • Add necessary CORS, compression, or security headers via Tower middleware
  4. Ensure Authentication Security:

    • Validate JWT tokens properly using jwt-compact
    • Implement secure middleware for protected routes
    • Handle authentication errors with appropriate HTTP status codes
    • Maintain separation between static (shared) and dynamic (user-specific) tool access
  5. Write Testable Code:

    • Structure code to be easily testable with mock services
    • Use dependency injection patterns for external dependencies
    • Ensure integration tests can properly exercise server endpoints
  6. Optimize for Production:

    • Consider connection pooling and resource management
    • Implement proper request timeouts and limits
    • Use efficient serialization/deserialization strategies
    • Apply appropriate caching where beneficial

Read the full file on GitHub · 60 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. 8d ago First seen · 60 lines · 0 tokens per session scan A f6b41b9abe26

Subscribe to this mod's changes

server-crate-specialist is an agent published in the GitHub repository Nexus-Router/nexus (435 stars, last pushed 5mo ago), licensed MPL-2.0. It adds 344 tokens to every session and 969 once invoked, about $0.0017 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 agents, from other repositories

rust-framework-architect

Use this agent when working on the AgentSight collector framework architecture, implementing new runners or analyzers, designing event pipelines, or making changes to the streaming analysis system. Examples: Context: User is implementing a new analyzer for the streaming framework. user: 'I need to create a new…

eunomia-bpf/agentsight · 0 tokens

rust-expert

Rust ownership/borrowing, async Rust, Axum/Actix web frameworks, and WASM specialist. Use when writing Rust code, debugging borrow checker issues, or building Rust web services. Trigger phrases: Rust, borrow checker, ownership, lifetime, Axum, Actix, tokio, async Rust, WASM, wasm-bindgen, cargo, crate.

travisjneuman/.claude · 78 tokens

rust-developer

Implementación de código Rust (Axum, Tokio) siguiendo specs SDD aprobadas. Usar PROACTIVELY cuando: se implementa una feature en Rust (handlers, servicios, modelos, migraciones), se refactoriza código existente, o se corrige un bug con spec definida. SIEMPRE requiere una Spec SDD aprobada antes de empezar.

gonzalezpazmonica/savia · 78 tokens

spikard-developer

General development agent for the spikard polyglot HTTP framework. Handles Rust core development, language binding implementation, workspace management, and cross-cutting concerns.

Goldziher/spikard · 38 tokens

tadpole-backend-specialist

Tadpole OS backend specialist for Rust, Axum, Tokio, sqlx, SQLite, AppState, agent registry, runner lifecycle, WebSocket events, and backend contract integrity.

DDS-Solutions/AI-TadPole-OS · 45 tokens

rust-expert

Use when: Cargo.toml present. Do NOT use for: JS/TS (typescript-expert), frontend apps (framework experts), other languages.

fusengine/agents · 34 tokens