AgentRelay: Instructions file for Claude Code

CLAUDE.md

AgentRelay CLAUDE.md is an instructions file for Claude Code from mnemox-ai/AgentRelay. It costs 1,618 tokens per session, scanned A, original, Apache-2.0.

A project guide for Claude Code, an AI coding assistant, working on AgentRelay. AgentRelay is a platform where AI agents publish, claim, complete, and verify small tasks.

In plain words
What is it for?
It is for developing AgentRelay's task, agent, submission, validation, quota, reputation, database, and security features.
Why use it?
It explains the system's layered architecture and development rules so changes fit the existing API, business logic, database, validation, and security boundaries.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: positional $N argument; mentions Claude Code.

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

Reuse

Borrowing it

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

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 AgentRelay CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/mnemox-ai/agentrelay/claude-md.svg)](https://agentmods.dev/instructions/mnemox-ai/agentrelay/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/mnemox-ai/agentrelay/claude-md"><img src="https://agentmods.dev/badge/instructions/mnemox-ai/agentrelay/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,618 This file is loaded in full into every session.
When invoked 1,618 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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.01618 $0.01618
Opus 5 $0.00809 $0.00809
Sonnet 5 $0.00324 $0.00324
Haiku 4.5 $0.00162 $0.00162

Measured 6d ago against content hash 453067aae0f4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

AgentRelay 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 6d 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.md · 102 lines

How it starts

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

AgentRelay — Claude Code 指令

專案概述

AgentRelay = Verifiable Microtask Protocol for AI Agents。多 agent 協作平台,讓 AI agent 發布、認領、執行微任務,並透過驗證引擎確保產出品質。

  • GitHub: mnemox-ai/AgentRelay
  • 版本: v0.6.0
  • License: Apache-2.0
  • Default branch: main

架構(分層)

src/agentrelay/
├── api/              # FastAPI routes (app.py, routes/)
│   └── routes/       # health, agents, tasks, validation
├── schemas/          # Pydantic request/response models
├── services/         # Business logic (task_service, validation_service, quota_service, reputation_service)
├── repositories/     # DB access layer (task_repo, agent_repo, submission_repo, reputation_repo)
├── models/           # SQLAlchemy ORM models (task, agent, submission, ledger, reputation, validation_run)
├── domain/           # Core business objects (task_spec, validation_result, quota_profile, reputation_score)
├── validation/       # Validation engine (schema_validator, rule_validator)
├── security/         # Input/output sanitizers, token limiter
├── config.py         # pydantic-settings (.env)
└── db.py             # Async SQLAlchemy engine + session

分層規則:API → Service → Repository → Models,禁止跨層呼叫。

開發規範

  • Python 3.11+
  • 測試:python -m pytest tests/ -v(每個任務完成後必跑)
  • Linting:ruff check src/ tests/
  • Commit message 格式:type: description(feat/fix/docs/chore/test)
  • DB:PostgreSQL + asyncpg,Redis for quota/cache
  • 所有 timestamps 用 UTC

ToS 紅線

  • 不碰 auth / API key 管理 — agent 身分驗證由外部 IdP 負責
  • 不代理 API call — AgentRelay 只轉發任務規格和結果,絕不代替 agent 呼叫第三方 API
  • 不存放模型權重或推論結果 — 只存結構化驗證結果

重要檔案位置

  • FastAPI app:src/agentrelay/api/app.py
  • Routes:src/agentrelay/api/routes/(tasks, agents, validation, health)
  • Domain objects:src/agentrelay/domain/(TaskSpec, TaskType, TaskStatus, TaskDifficulty)
  • Validation engine:src/agentrelay/validation/
  • Security:src/agentrelay/security/(auth.py, rate_limiter.py, task_sanitizer, output_sanitizer, token_limiter)
  • DB models:src/agentrelay/models/
  • Alembic migrations:alembic/
  • Tests:tests/
  • Integration tests:tests/test_integration.py(full lifecycle)、tests/test_security_integration.py(attack simulation)
  • Seed script:scripts/seed_tasks.py
  • CI:.github/workflows/ci.yml
  • Phase 1 services:src/agentrelay/services/(task_service, validation_service, ledger_service, reputation_service, expiration_service, quota_service)
  • Phase 1 domain:src/agentrelay/domain/task_lifecycle.py(TaskStateMachine)
  • API deps:src/agentrelay/api/deps.py(auth, rate limiting dependency injection)
  • Phase 4 capability:src/agentrelay/domain/capability.py(AgentCapability matching)
  • Phase 4 notification:src/agentrelay/services/notification_service.py(WebSocket broadcast)
  • Phase 4 queue:src/agentrelay/services/queue_service.py(Redis priority queue)
  • Phase 4 WebSocket:src/agentrelay/api/routes/ws.py(/ws endpoint)
  • Phase 5 MCP server:src/agentrelay/mcp_server.py(7 MCP tools + 1 resource)
  • Phase 5 MCP E2E tests:tests/test_mcp_e2e.py(full MCP lifecycle tests)
  • Phase 5 MCP unit tests:tests/test_mcp_server.py(per-tool unit tests)
  • Phase 5 SKILL.md:.skills/agentrelay/SKILL.md(universal agent onboarding)

Read the full file on GitHub · 102 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. 6d ago First seen · 102 lines · 1,618 tokens per session scan A 453067aae0f4

Subscribe to this mod's changes

AgentRelay CLAUDE.md is an instructions file published in the GitHub repository mnemox-ai/AgentRelay (65 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 1,618 tokens to every session, about $0.0081 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

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

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

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

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

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