agent-identity

agent-identity is a skill for Claude Code, Codex from openonion/connectonion. It costs 33 tokens per session (1,002 once invoked), scanned A, original, Apache-2.0.

An agent-diagnostics guide for checking which live service and billing account an agent is using. An agent is a software service that can act on a user’s behalf.

In plain words
What is it for?
Use it before sharing a chat link, investigating a deployment mismatch, or checking the service address, signing identity, and selected account.
Why use it?
It helps explain mismatched identities between hosts and prevents stale environment settings from being trusted. It also keeps tokens, private keys, and recovery phrases out of diagnostic output.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it before sharing a chat link, investigating a deployment mismatch, or checking the service address, signing identity, and selected account.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/openonion/connectonion/agent-identity
About the project

ConnectOnion is an open-source, template-first toolkit for building, debugging, deploying, and operating AI agents. Developers use its command-line tools and Python runtime to create agents, add tools, connect services, deploy them, and make them callable by other agents, while the catalogue entries are related agents, skills, and instructions.

openonion/connectonion · 1,480 stars · on GitHub · docs.connectonion.com

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.

Any agent
npx skills add openonion/connectonion --skill agent-identity
Clone the repo
git clone --depth 1 https://github.com/openonion/connectonion

Made for: Claude Code, Codex.

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 agent-identity

README.md
[![agentmods](https://agentmods.dev/badge/skills/openonion/connectonion/agent-identity/github.svg)](https://agentmods.dev/skills/openonion/connectonion/agent-identity)
Your own site
<a href="https://agentmods.dev/skills/openonion/connectonion/agent-identity"><img src="https://agentmods.dev/badge/skills/openonion/connectonion/agent-identity/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for agent-identity

Your own site · 80×15
<a href="https://agentmods.dev/skills/openonion/connectonion/agent-identity"><img src="https://agentmods.dev/badge/skills/openonion/connectonion/agent-identity.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,002 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00033 $0.01002
Opus 5 $0.00016 $0.00501
Sonnet 5 $0.00007 $0.00200
Haiku 4.5 $0.00003 $0.00100

Measured today against content hash dc42737fc7a0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

agent-identity scanned grade A with 1 finding 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 today.

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.

Makes network callslowCapability

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

curl --fail --silent --show-error http://localhost:8000/info \
connectonion/useful_skills/agent-identity/SKILL.md · 106 lines

How it starts

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

Agent identity

Read the signing identity, model payer, and env metadata from their own sources. Never print tokens, private keys, or recovery phrases in diagnostics.

1. Verify the live agent

Query the configured Host /info endpoint and read address. Use the actual service port, not an assumed hostname or a copied AGENT_ADDRESS value.

curl --fail --silent --show-error http://localhost:8000/info \
  | python3 -c 'import json,sys; print(json.load(sys.stdin)["address"])'

The key determines the address. AGENT_EMAIL and IS_EMAIL_ACTIVE are email metadata. Env address notes, server inventories, and DNS names can be stale.

2. Check the selected account

All env settings default to $AGENT_CONFIG_PATH/keys.env, normally ~/.co/keys.env. Entering a project never loads its .env. co --env-file /path/to/app.env … explicitly selects a different file; inherited process settings win. With explicit selection, CLI identity readers use an existing key in the file's adjacent .co/, falling back to the global key when it has none. co init initializes global configuration; project creation requires co create or an explicit co init ./.

Run this diagnostic in the target process's environment. Decoding alone does not verify a JWT. The GET checks the same backend used by auth and models, refuses redirects, and prints only the account and balance.

import base64
import json
import os
from pathlib import Path
import requests
from connectonion.backend import backend_url
from connectonion.environment import load_environment, select_env_file

# Optional explicit selection, equivalent to co --env-file /path/to/app.env:
# select_env_file(Path("/path/to/app.env"))
load_environment()
token = os.environ.get("OPENONION_API_KEY")
if not token:
    raise SystemExit("No managed-model token in the selected environment")
try:
    payload = token.split(".")[1]
    claims = json.loads(base64.urlsafe_b64decode(payload + "=" * (-len(payload) % 4)))
    print("Token account (unverified claim):", claims["public_key"])
except (IndexError, KeyError, ValueError, UnicodeError):
    raise SystemExit("Token is not a decodable account JWT; do not print it") from None

# Resolve the same backend as auth/models. Never put a token in shell arguments.
response = requests.get(
    f"{backend_url()}/api/v1/auth/me",
    headers={"Authorization": f"Bearer {token}"},
    timeout=15,
    allow_redirects=False,
)
if response.status_code != 200:
    raise SystemExit(f"Account lookup failed (HTTP {response.status_code})")
account = response.json()
print("Verified account:", account.get("public_key"))
print("Balance:", account.get("balance_usd"))

Read the full file on GitHub · 106 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. today First seen · 106 lines · 33 tokens per session scan A dc42737fc7a0

Subscribe to this mod's changes

agent-identity is a skill published in the GitHub repository openonion/connectonion (1,480 stars, last pushed today), licensed Apache-2.0. It adds 33 tokens to every session and 1,002 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-08.

Related

Other skills, from other repositories

data-fetching

Use when implementing or debugging ANY network request, API call, or data fetching. Covers fetch API, axios, React Query, SWR, error handling, caching strategies, offline support.

Intelligent-Internet/ii-agent · 41 tokens

code-search

Search a codebase efficiently with ripgrep regular expressions, file globs, and git history search. Use to locate symbols, usages, and definitions instead of reading whole files.

agentscope-ai/agentscope-java · 38 tokens

review

Review code changes, pull requests, patches, or a scoped code area for actionable correctness, security, compatibility, and test risks with file and line evidence. Use for review or audit requests; do not use for general proofreading, feature implementation, or debugging a reported failure when the user wants a fix.

bigduu/Bamboo-agent · 62 tokens

debug

Diagnose a concrete failure, regression, crash, hang, flaky test, or incorrect runtime behavior by reproducing it, testing hypotheses, and identifying the evidence-backed root cause. Use when symptoms or failing output exist; do not use for feature implementation without a failure, general code review, or a conceptual…

bigduu/Bamboo-agent · 64 tokens

simplify

Reduce unnecessary code complexity, duplication, indirection, or abstraction while preserving observable behavior and validating equivalence. Use for simplify, cleanup, or behavior-preserving refactor requests; do not use for adding features, diagnosing an unexplained failure, broad code review without a…

bigduu/Bamboo-agent · 68 tokens

Docker Management

Manage Docker containers, images, volumes, networks, and Compose stacks — lifecycle ops, debugging, cleanup, and Dockerfile optimization.

agentic-in/elephant-agent · 29 tokens