pragma-stack: Instructions file for Codex

AGENTS.md

pragma-stack AGENTS.md is an instructions file for Codex, OpenCode from cardosofelipe/pragma-stack. It costs 2,927 tokens per session, scanned A, original, MIT.

A project guide for a full-stack application with a Python FastAPI backend and a Next.js frontend. It explains how to install, run, test, and understand the main parts of the project.

In plain words
What is it for?
Use it to start the application, run backend and frontend tests, generate an API client, open API documentation, or find the code for authentication, users, organizations, and administration.
Why use it?
It saves developers from guessing which tools, commands, URLs, and folders the project uses. It also provides important setup details, including a default administrator account that should be changed before production use.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions CLAUDE.md; mentions Claude Code; mentions AGENTS.md.

This is cardosofelipe/pragma-stack's own configuration. It tells Codex and OpenCode how to work on pragma-stack 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 pragma-stack configures →

Reuse

Borrowing it

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

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 pragma-stack AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/cardosofelipe/pragma-stack/agents-md"><img src="https://agentmods.dev/badge/instructions/cardosofelipe/pragma-stack/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,927 This file is loaded in full into every session.
When invoked 2,927 The same file — it is already loaded in full.
Security scan A 0 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.02927 $0.02927
Opus 5.5 $0.01171 $0.01171
Sonnet 5.5 $0.00585 $0.00585
Haiku 4.5 $0.00293 $0.00293

Measured 2mo ago against content hash 95b87df88923, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

pragma-stack 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 2mo 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 · 316 lines

How it starts

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

AGENTS.md

AI coding assistant context for FastAPI + Next.js Full-Stack Template.

Quick Start

# Backend (Python with uv)
cd backend
make install-dev              # Install dependencies
make test                     # Run tests
uv run uvicorn app.main:app --reload  # Start dev server

# Frontend (Node.js)
cd frontend
bun install                   # Install dependencies
bun run dev                   # Start dev server
bun run generate:api          # Generate API client from OpenAPI
bun run test:e2e              # Run E2E tests

Access points:

Default superuser (change in production):

Project Architecture

Full-stack TypeScript/Python application:

├── backend/                 # FastAPI backend
│   ├── app/
│   │   ├── api/            # API routes (auth, users, organizations, admin)
│   │   ├── core/           # Core functionality (auth, config, database)
│   │   ├── repositories/   # Repository pattern (database operations)
│   │   ├── models/         # SQLAlchemy ORM models
│   │   ├── schemas/        # Pydantic request/response schemas
│   │   ├── services/       # Business logic layer
│   │   └── utils/          # Utilities (security, device detection)
│   ├── tests/              # 96% coverage, 987 tests
│   └── alembic/            # Database migrations
│
└── frontend/               # Next.js 16 frontend
    ├── src/
    │   ├── app/           # App Router pages (Next.js 16)
    │   ├── components/    # React components
    │   ├── lib/
    │   │   ├── api/       # Auto-generated API client
    │   │   └── stores/    # Zustand state management
    │   └── hooks/         # Custom React hooks
    └── e2e/               # Playwright E2E tests (56 passing)

Critical Implementation Notes

Authentication Flow

  • JWT-based: Access tokens (15 min) + refresh tokens (7 days)
  • OAuth/Social Login: Google and GitHub with PKCE support
  • Session tracking: Database-backed with device info, IP, user agent
  • Token refresh: Validates JTI in database, not just JWT signature
  • Authorization: FastAPI dependencies in api/dependencies/auth.py
    • get_current_user: Requires valid access token
    • get_current_active_user: Requires active account
    • get_optional_current_user: Accepts authenticated or anonymous
    • get_current_superuser: Requires superuser flag

Read the full file on GitHub · 316 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. 2mo ago First seen · 316 lines · 2,927 tokens per session scan A 95b87df88923

Subscribe to this mod's changes

pragma-stack AGENTS.md is an instructions file published in the GitHub repository cardosofelipe/pragma-stack (11 stars, last pushed 8mo ago), licensed MIT. It adds 2,927 tokens to every session, about $0.0117 per session on Opus 5.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.

Related

pragma-stack AGENTS.md compared with instructions from other repositories

pragma-stack AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
pragma-stack AGENTS.mdcardosofelipe/pragma-stackInstructions file118mo agoMITA2,927Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode ai-customization.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA1,907GitHub Copilot