authgear-server AGENTS.md

A repository guide for working on Authgear Server, covering its AGENTS.md instructions, folder layout, documentation, common commands, and local development setup. Authgear Server is the codebase described by these instructions.

In plain words
What is it for?
Use it when navigating or changing the Authgear Server repository, starting local development, reading its documentation map, or choosing commands for common tasks.
Why use it?
It gives a coding agent the project-specific context needed to find the right files and follow the repository's normal development process.

Instructions file for CodexOpenCode

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/authgear/authgear-server/agents-md
Clone the repo
git clone --depth 1 https://github.com/authgear/authgear-server

Made for: Codex, OpenCode.

Per session 2,719 This file is loaded in full into every session.
When invoked 2,719 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.02719 $0.02719
Opus 5 $0.01359 $0.01359
Sonnet 5 $0.00544 $0.00544
Haiku 4.5 $0.00272 $0.00272

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

Security

Grade A, and why

authgear-server AGENTS.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 2d 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.

AGENTS.md · 193 lines

How it starts

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

AGENTS.md

This repository is Authgear Server. Use the repo docs and skills below as the source of truth for agentic work.

Repository layout

authgear-server/
├── cmd/                        # Entry points (main packages)
│   ├── authgear/               # Core auth server binary
│   │   ├── main.go
│   │   ├── server/             # HTTP server wiring
│   │   ├── background/         # Background worker (cron jobs, queues)
│   │   ├── adminapi/           # Admin API server
│   │   ├── config/             # Config commands (validate, migrate)
│   │   └── images/             # Docker image utilities
│   ├── portal/                 # Portal backend binary
│   │   └── main.go
│   └── once/                   # One-shot migration / setup commands
│
├── pkg/                        # Shared Go packages
│   ├── lib/                    # Core business logic (auth flows, OAuth,
│   │   │                         sessions, SAML, OIDC, webhooks, etc.)
│   ├── auth/                   # AuthUI HTTP handlers & webapp routes
│   │   ├── handler/            # Request handlers
│   │   └── webapp/             # Server-side rendered web-app views
│   ├── admin/                  # Admin API GraphQL layer
│   │   └── graphql/
│   ├── portal/                 # Portal backend GraphQL layer
│   │   └── graphql/
│   ├── siteadmin/              # Site-admin API (global administration)
│   ├── api/                    # Shared API types / transport helpers
│   ├── resolver/               # Request resolver middleware
│   ├── util/                   # General-purpose utilities
│   └── images/                 # Image-processing helpers
│
├── authui/                     # AuthUI frontend (React/TypeScript)
│   │                             Compiled output is embedded into the binary.
│   └── src/
│
├── portal/                     # Portal frontend (React/TypeScript)
│   │                             The portal lets tenant admins manage their apps.
│   └── src/
│
├── resources/                  # Static resources embedded into binaries
│   ├── authgear/               # AuthUI templates, translations, assets
│   └── portal/                 # Portal static assets
│
├── e2e/                        # End-to-end test suite
│   └── tests/
│
├── docs/                       # Specs and design documents
│   ├── specs/                  # Feature and API specifications
│   └── api/                    # OpenAPI / schema definitions
│
├── hack/                       # Developer scripts and tooling
├── devtools/                   # Local development helpers
└── scripts/                    # CI / release scripts

Read the full file on GitHub · 193 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. 2d ago First seen · 193 lines · 2,719 tokens per session scan A b3cba3145b4f

Subscribe to this mod's changes

authgear-server AGENTS.md is an instructions file published in the GitHub repository authgear/authgear-server (2,017 stars, last pushed today), licensed Apache-2.0. It adds 2,719 tokens to every session, about $0.0136 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.