onesub AGENTS.md

onesub AGENTS.md is an instructions file for Codex, OpenCode from jeonghwanko/onesub. It costs 7,273 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

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/jeonghwanko/onesub/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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 7,273 This file is loaded in full into every session.
When invoked 7,273 The same file — it is already loaded in full.
Security scan D 4 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.07273 $0.07273
Opus 5 $0.03637 $0.03637
Sonnet 5 $0.01455 $0.01455
Haiku 4.5 $0.00727 $0.00727

Measured 5d ago against content hash 45947524bb08, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 5d 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 · 446 lines

How it starts

The opening of the file, as written. The whole thing — 446 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 · 446 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. 5d 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 (11 stars, last pushed 9d ago), licensed MIT. It adds 7,273 tokens to every session, about $0.0364 per session on Opus 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.