agent-identity CLAUDE.md

Repository instructions for Agent Identity, a Bash-based system that lets AI agents authenticate with OAuth 2.0 and Ed25519 cryptographic identities.

In plain words
What is it for?
Use it when editing the Bash scripts, installing the command-line tools, or working with the Claude Code plugin and remote installer.
Why use it?
It explains how the repository is structured and how to work with it without guessing its commands or delivery formats.

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/agentmessaging/agent-identity/claude-md
Clone the repo
git clone --depth 1 https://github.com/agentmessaging/agent-identity
Per session 2,551 This file is loaded in full into every session.
When invoked 2,551 The same file — it is already loaded in full.
Security scan E 4 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.02551 $0.02551
Opus 5 $0.01275 $0.01275
Sonnet 5 $0.00510 $0.00510
Haiku 4.5 $0.00255 $0.00255

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

Security

Grade E, and why

agent-identity CLAUDE.md scanned grade E with 4 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 3d 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

keys/private.pem # Ed25519 private key (chmod 600)

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

3. **Remote `curl | bash`** — `install.sh` falls back to downloading scripts from `raw.githubusercontent.com/agentmessaging/agent-identity/main/scripts/` when its sibling `scripts/` dir is absent.

Unrestricted tool accessmediumExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

# Run any command directly from the repo without installing

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

3. **Remote `curl | bash`** — `install.sh` falls back to downloading scripts from `raw.githubusercontent.com/agentmessaging/agent-identity/main/scripts/` when its sibling `scripts/` dir is absent.
CLAUDE.md · 123 lines

How it starts

The opening of the file, as written. The whole thing — 123 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 repo is

A pure-Bash reference client for the Agent Identity (AID) protocol — OAuth 2.0 authentication for AI agents using Ed25519 cryptographic identities. It is distributed three ways from this single repo:

  1. Standalone CLIinstall.sh copies the scripts/aid-*.sh files to ~/.local/bin.
  2. Claude Code plugin — see .claude-plugin/plugin.json and the agent-identity skill at skills/agent-identity/SKILL.md.
  3. Remote curl | bashinstall.sh falls back to downloading scripts from raw.githubusercontent.com/agentmessaging/agent-identity/main/scripts/ when its sibling scripts/ dir is absent.

There is no compiled artifact, no package manager, no test suite, no linter. Edits to scripts/*.sh are the deliverable.

Common commands

# Install locally after edits (also the user-facing install command)
./install.sh                  # → ~/.local/bin
./install.sh /custom/path     # → custom location

# Run any command directly from the repo without installing
./scripts/aid-init.sh --auto
./scripts/aid-request.sh --auth https://auth.example.com/tenant
./scripts/aid-token.sh -a https://auth.example.com/tenant -q

# Worked examples (each is a runnable shell script demonstrating a flow)
./examples/basic-usage.sh
./examples/multi-server.sh
./examples/scoped-tokens.sh

There is no make test, npm test, or equivalent. Validation is by running the example scripts against a live auth server, or by manually exercising the flows described in README.md.

Architecture

The seven scripts

All scripts under scripts/ follow the same pattern: set -e, source ./aid-helper.sh, parse flags, then call helper functions. aid-helper.sh is the only shared module — do not duplicate its logic into the command scripts.

Script Role
aid-helper.sh Sourced by every other script. Provides OpenSSL detection, agent-directory resolution, config loading, Ed25519 signing, keypair generation, and RFC 9728/8414 discovery helpers (fetch_protected_resource_metadata, fetch_authorization_server_metadata, discover_from_resource).
aid-init.sh Generates the Ed25519 keypair and config.json for a new agent.
aid-discover.sh Walks RFC 9728 → RFC 8414 to find the AID-enabled auth server for a resource URL. Validates urn:aid:agent-identity is advertised and reads the aid_grant block.
aid-request.sh Agent-initiated registration. Submits a pending request, polls with --poll. Accepts --resource as an alternative to --auth.
aid-register.sh Admin-initiated registration. Requires an admin JWT to immediately bind the agent to a role.
aid-token.sh Exchanges the Agent Identity + proof-of-possession for an RS256 JWT. Caches tokens. Accepts --resource as an alternative to --auth.
aid-status.sh Inspects local identity, registrations, and cached tokens.

Read the full file on GitHub · 123 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. 3d ago First seen · 123 lines · 2,551 tokens per session scan E ae2c5447ac77

Subscribe to this mod's changes

agent-identity CLAUDE.md is an instructions file published in the GitHub repository agentmessaging/agent-identity (4 stars, last pushed 1mo ago), licensed MIT. It adds 2,551 tokens to every session, about $0.0128 per session on Opus 5. A static security scan graded it E with 4 findings (asks for root, downloads and executes remote code, unrestricted tool access). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.