melra CLAUDE.md

melra CLAUDE.md is an instructions file for coding agents from XAGI-Lab/melra. It costs 3,392 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for MELRA, an execution layer that manages the effects of an agent’s tool requests, such as authorization, approvals, recording, and recovery.

In plain words
What is it for?
Use them when changing MELRA’s effect lifecycle, schemas, policies, credentials, verification, or execution code.
Why use it?
They define the boundary between model reasoning, loop management, and real-world actions, helping prevent unrelated features from being added to the execution layer.

Instructions file

Install

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.

agentmods
npx agentmods add instructions/xagi-lab/melra/claude-md
Clone the repo
git clone --depth 1 https://github.com/XAGI-Lab/melra

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/xagi-lab/melra/claude-md.svg)](https://agentmods.dev/instructions/xagi-lab/melra/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/xagi-lab/melra/claude-md"><img src="https://agentmods.dev/badge/instructions/xagi-lab/melra/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 3,392 This file is loaded in full into every session.
When invoked 3,392 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 $0.03392 $0.03392
Opus 5 $0.01696 $0.01696
Sonnet 5 $0.00678 $0.00678
Haiku 4.5 $0.00339 $0.00339

Measured 4d ago against content hash 2e78e6206a42, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

melra 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 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.

CLAUDE.md · 214 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

What this is

MELRA is an agent-independent autonomy kernel: the layer an agent asks to change the world through. Three layers, and the split is the whole design — the LLM reasons, the harness manages the loop, MELRA owns the effect lifecycle. MELRA begins where the tool call leaves the model loop. It owns effects, never reasoning — nothing in packages/ may call a model, and no decision in the execution path may depend on model output.

The feature test. Before adding anything, ask: would this feature still make sense if the effect request came from ordinary deterministic software rather than an LLM? Authorization, idempotency, credential isolation, recovery, verification, effect history, capabilities — yes, they belong here. Prompt optimization, LLM memory, model selection, a planner, agent personality — no, they belong to the harness above.

For every effect it does exactly nine things and nothing else: type it against a strict schema, classify it, authorise it against policy, gate it on an exact approval phrase, record it durably before anything runs, deduplicate it by idempotency key, run it under a budget and cancel signal, verify it against declared evidence, and receipt it. Work that is not one of those nine jobs — a model router, a planner, a prompt library, semantic memory about the user — belongs to the agent above and does not go in this repo.

MCP over stdio is one of several interfaces onto the same runtime (MCP stdio, MCP over loopback HTTP, CLI, TypeScript SDK, Python SDK, read-only JSON API); none of them is a shortcut past a stage of the pipeline. Eleven MCP tools sit in front of five reference effect adapters (files, terminal, browser, computer, http) plus operational memory as a kernel service: six task tools (melra_capabilities, melra_plan, melra_execute, melra_task_status, melra_task_cancel, melra_receipt) and five durable-workflow tools (melra_workflow_plan, melra_workflow_advance, melra_workflow_status, melra_workflow_cancel, melra_workflow_control). pnpm workspace of TypeScript packages (Node 22+, ESM, strict tsc), plus two Python projects managed by uv (sdk-py, benchmarks/browser-agent).

Read the full file on GitHub · 214 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. 4d ago First seen · 214 lines · 3,392 tokens per session scan A 2e78e6206a42

Subscribe to this mod's changes

melra CLAUDE.md is an instructions file published in the GitHub repository XAGI-Lab/melra (8 stars, last pushed 3d ago), licensed Apache-2.0. It adds 3,392 tokens to every session, about $0.0170 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.