onesub: Instructions file for Codex

AGENTS.md

onesub AGENTS.md is an instructions file for Codex, OpenCode from jeonghwanko/onesub. It costs 7,323 tokens per session, scanned D, original, MIT.

A repository guide for OneSub, a self-hosted service that manages in-app purchases and subscriptions for Apple, Google Play, React Native, and Unity.

In plain words
What is it for?
Use it when changing the OneSub codebase, especially for tasks involving receipts, subscriptions, webhooks, APIs, clients, or coordinated changes across files.
Why use it?
It tells coding agents where the code lives, which project rules matter, and what checks to run before calling a task complete.

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 jeonghwanko/onesub's own configuration. It tells Codex and OpenCode how to work on onesub 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 onesub configures →

Reuse

Borrowing it

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

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 onesub AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/jeonghwanko/onesub/agents-md"><img src="https://agentmods.dev/badge/instructions/jeonghwanko/onesub/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 7,323 This file is loaded in full into every session.
When invoked 7,323 The same file — it is already loaded in full.
Security scan D 4 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.07323 $0.07323
Opus 5.5 $0.02929 $0.02929
Sonnet 5.5 $0.01465 $0.01465
Haiku 4.5 $0.00732 $0.00732

Measured 26d ago against content hash 35260da5e11f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade D, and why

onesub AGENTS.md scanned grade D 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 26d 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.

Sends data to an external URLmediumData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

`curl -d '{...}'` needs `Invoke-RestMethod` or `curl.exe`. The root `clean` script is a

Asks for rootmediumPrivilege escalation

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

refuses to run as root — so a relocatable build unpacked outside the repo works

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

PowerShell, translate them: `rm -rf` is not available, `\` line continuations must become backticks,

Makes network callslowCapability

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

`curl -d '{...}'` needs `Invoke-RestMethod` or `curl.exe`. The root `clean` script is a
AGENTS.md · 448 lines

How it starts

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

OneSub Repository Guide

This is the canonical repository guide for coding agents. CLAUDE.md imports this file so Codex and Claude share one set of project instructions. Keep durable project knowledge here; keep public setup and API documentation in README.md and docs/.

How to use this guide. Read Build Model and Traps before your first edit — it is the section that prevents silent failures. Then jump: Source Map for where code lives, Start Here by Task for which files a given task touches, Contract Change Checklist for changes that must move several files at once, Change Workflow and Before You Call a Task Done for what to run and report. docs/AI-WORKFLOW.md holds copy-ready prompts; this file holds the rules.

Project Scope

OneSub is a self-hosted in-app purchase backend and client toolkit. It validates Apple StoreKit 2 and Google Play receipts, processes subscription webhooks, stores subscription and one-time purchase state, exposes entitlement/admin/metrics APIs, and provides React Native and Unity clients.

This public repository is the MIT-licensed Core source of truth. Commercial Unity Editor automation and MCP for Unity custom tools live in the separate private onesub-unity-pro repository. Do not copy Pro sources into this repository. See docs/UNITY-PRO.md for the compatibility boundary.

Repository Map

Path Role
packages/shared @onesub/shared: canonical cross-package types, status values, error codes, and route constants
packages/providers @onesub/providers: dependency-free App Store Connect and Google Play product-management wrappers
packages/server @onesub/server: Express middleware/server, receipt validation, webhooks, stores, admin APIs, metrics, OpenAPI, and tracing
packages/sdk @jeonghwanko/onesub-sdk: React Native provider, hook, paywall components, and HTTP client
packages/mcp-server @onesub/mcp-server: stdio MCP tools for setup, product management, diagnostics, and simulation
packages/cli @onesub/cli: onesub init scaffolder, server templates, and the onesub dev fully mocked server used for local and agent testing
packages/dashboard Private npm workspace for the self-hosted Next.js operations dashboard; shipped as a Docker image
packages/unity com.onesub.unity: public Unity 2022.3+ purchasing and server-validation Core package
packages/unity-platform-services Optional Unity sharing, review, leaderboard, and authentication helpers; not part of purchasing Core
examples Runnable server and Expo examples. Not npm workspaces, but inside this checkout they still resolve @onesub/server through the root node_modules symlink to packages/server — so they do exercise your local build. The version pin in their own package.json only applies to a standalone copy
bench k6 status/webhook load tests, run by the scheduled bench workflow
scripts Dependency-free repository checks such as validate-docs.mjs and validate-package-contents.mjs
docs Architecture, security, deployment, migration, receipt-error, and Unity boundary documentation
site Source of the static landing page at onesub.pryzm.gg. One self-contained index.html, no build step. Deliberately not an npm workspace. This repository does not deploy it — the page is copied into findthem/apps/web/onesub/ and shipped by that repository's CI to a shared EC2/nginx host; see site/README.md

Read the full file on GitHub · 448 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. 26d ago Changed · +2 lines · +50 tokens per session 35260da5e11f
  2. 1mo ago First seen · 446 lines · 7,273 tokens per session scan D 45947524bb08

Subscribe to this mod's changes

onesub AGENTS.md is an instructions file published in the GitHub repository jeonghwanko/onesub (15 stars, last pushed 14d ago), licensed MIT. It adds 7,323 tokens to every session, about $0.0293 per session on Opus 5.5. A static security scan graded it D with 4 findings (sends data to an external url, asks for root, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

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,715 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 · 7,461 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, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 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,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens