aws-auth: Instructions file for Codex

AGENTS.md

aws-auth AGENTS.md is an instructions file for Codex, OpenCode from N0mansky/aws-auth. It costs 1,278 tokens per session, scanned D, original, MIT.

Repository guidance for an AWS SSO command-line tool and MCP server explains its Python code, packaging, platforms, and design rules. AWS SSO is Amazon's sign-in system for accessing cloud accounts and roles.

In plain words
What is it for?
Use it when working on AWS sign-in, named profile switching, EKS or EC2 integration, the command-line interface, or the MCP server.
Why use it?
It gives an agent the project context needed to change authentication and cloud-infrastructure code without breaking session or profile rules.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

This is N0mansky/aws-auth's own configuration. It tells Codex and OpenCode how to work on aws-auth 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 aws-auth configures โ†’

Reuse

Borrowing it

Nothing to install: this file belongs to N0mansky/aws-auth. 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/N0mansky/aws-auth/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/N0mansky/aws-auth

Made for: Codex, OpenCode.

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 aws-auth AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/n0mansky/aws-auth/agents-md/github.svg)](https://agentmods.dev/instructions/n0mansky/aws-auth/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/n0mansky/aws-auth/agents-md"><img src="https://agentmods.dev/badge/instructions/n0mansky/aws-auth/agents-md/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 aws-auth AGENTS.md

Your own site ยท 80ร—15
<a href="https://agentmods.dev/instructions/n0mansky/aws-auth/agents-md"><img src="https://agentmods.dev/badge/instructions/n0mansky/aws-auth/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,278 This file is loaded in full into every session.
When invoked 1,278 The same file โ€” it is already loaded in full.
Security scan D 2 findings. 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.01278 $0.01278
Opus 5 $0.00639 $0.00639
Sonnet 5 $0.00256 $0.00256
Haiku 4.5 $0.00128 $0.00128

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

Security

Grade D, and why

aws-auth AGENTS.md scanned grade D with 2 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 yesterday.

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.

Strips warnings and disclaimersmediumAnti-refusal

Omitting safety caveats hides risk from the user and is a common jailbreak preamble.

Ensure `make build` (or `./install.sh`) builds and installs cleanly without warnings.

Reaches for credential fileshighPrivilege escalation

SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.

- `credentials_manager.py`: Manages `~/.aws/credentials`, active profile tracking (`~/.aws-auth/current_profile`), and atomic POSIX file writes.
AGENTS.md ยท 86 lines

How it starts

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

AI Agent Development Guidelines: aws-auth

You are an expert Senior Python & Cloud Infrastructure Engineer pair-programming on aws-auth, an open-source, high-performance AWS SSO CLI tool and Model Context Protocol (MCP) server.

Follow these rules and patterns when designing, implementing, refactoring, and testing features.


๐ŸŽฏ Repository Purpose & Tech Stack

  • Purpose: Zero-boilerplate AWS SSO authentication, smart MRU role discovery, session-scoped named profile switching via export AWS_PROFILE, EKS/EC2 DevOps integration, and native MCP stdio server for AI agents.
  • Language: Python 3.10+ (standard library + boto3, requests, mcp).
  • Packaging & Build: pyproject.toml (Setuptools) + PyInstaller single-file standalone binaries (dist/aws-auth, dist/aws-auth.exe).
  • Platforms: Linux (Debian/Ubuntu, RedHat), macOS (Universal), Windows (PowerShell/cmd), WSL2 (with Windows host browser bridge).

๐Ÿ—๏ธ Architecture & Module Map

Maintain Single Responsibility across modules in aws_auth/:

  • cli.py: Argument parsing (argparse), CLI dispatch, and JSON output formatting.
  • auth_manager.py: Orchestrates device authorization flow, token acquisition, role assumption, and profile generation.
  • credentials_manager.py: Manages ~/.aws/credentials, active profile tracking (~/.aws-auth/current_profile), and atomic POSIX file writes.
  • profile_manager.py: Profile listing, interactive switching, and caller identity verification.
  • token_manager.py: OIDC client registration, SSO access token caching, and token expiration safety margins.
  • local_browser_manager.py: Cross-platform browser launcher with WSL2 detection to launch the host Windows browser.
  • sso_client.py: Low-level AWS SSO and OIDC API wrapper (device code flow, account listing, role listing).
  • user_interface.py: ANSI tables, fuzzy substring filters, and interactive CLI prompts.
  • mcp_server.py: Model Context Protocol server exposing AWS tools over stdio for LLM assistants.
  • ec2_manager.py / eks_manager.py: AWS resource discovery, SSM terminal sessions, and kubeconfig updates.
  • scripts/check_credentials.py: Pre-commit, commit-msg, and pre-push policy and secret scanner.
  • install.sh / install.ps1: Automated installers with idempotent shell integration wrappers.

Read the full file on GitHub ยท 86 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. yesterday First seen ยท 86 lines ยท 1,278 tokens per session scan D e68a2840e454

Subscribe to this mod's changes

aws-auth AGENTS.md is an instructions file published in the GitHub repository N0mansky/aws-auth (0 stars, last pushed 2d ago), licensed MIT. It adds 1,278 tokens to every session, about $0.0064 per session on Opus 5. A static security scan graded it D with 2 findings (strips warnings and disclaimers, reaches for credential files). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-18.

Related

Other instructions, from other repositories

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 ยท 9,406 tokens

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 ยท 6,949 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,153 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,259 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

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