k-lottery: Instructions file for Codex

AGENTS.md

k-lottery AGENTS.md is an instructions file for Codex, OpenCode from rajephon/k-lottery. It costs 2,488 tokens per session, scanned A, original, MIT.

Repository-specific instructions for rajephon/k-lottery, a personal tool for buying South Korean 6/45 lottery tickets, checking balances, adding funds, and checking winnings. They define required commands, project rules, and the official site specification to follow.

In plain words
What is it for?
Use them when changing or running this repository, checking its lottery integration, managing dependencies, running tests and checks, or consulting the required API specification.
Why use it?
They reduce the risk of using outdated lottery-site endpoints or incorrect automation details and keep development commands consistent with the repository.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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 k-lottery AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/rajephon/k-lottery/agents-md.svg)](https://agentmods.dev/instructions/rajephon/k-lottery/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/rajephon/k-lottery/agents-md"><img src="https://agentmods.dev/badge/instructions/rajephon/k-lottery/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,488 This file is loaded in full into every session.
When invoked 2,488 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.02488 $0.02488
Opus 5 $0.01244 $0.01244
Sonnet 5 $0.00498 $0.00498
Haiku 4.5 $0.00249 $0.00249

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

Security

Grade A, and why

k-lottery 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 8d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

AGENTS.md · 144 lines

How it starts

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

CLAUDE.md

동행복권 로또 6/45 구매 · 잔액 확인 · 예치금 충전 · 당첨 확인 자동화. 소유자 본인 계정을 대상으로 하는 개인용 도구다.

배포명은 k-lottery, import 는 klottery 다 (python-dotenvdotenv 와 같은 관례). 앞으로 이 저장소에 MCP 서버가 추가된다.

명령어

목적 명령
스크립트 실행 uv run scripts/<name>.py [옵션]
의존성 추가 uv add <pkg> (개발용은 uv add --dev <pkg>)
환경 동기화 uv sync
린트 uv run ruff check --fix .
포맷 uv run ruff format .
타입 검사 uv run ty check
테스트 uv run pytest
훅 설치 (최초 1회) uv run pre-commit install
훅 전체 실행 uv run pre-commit run --all-files
  • pip / python 을 직접 호출하지 않는다. 실행은 항상 uv run 을 거친다.
  • pyproject.tomldependencies 를 손으로 편집하지 않는다. uv add / uv remove 를 쓴다 (uv.lock 이 함께 갱신되어야 한다).
  • .venv/ 를 직접 수정하지 않는다. uv sync 가 유일한 기준이다.
  • Python 은 .python-version 의 3.13 을 따른다.

사이트 스펙 — 먼저 읽을 것

docs/dhlottery-api-spec.md 가 유일한 진실이다. 실제 로그인 세션에서 캡처해 검증한 URL·필드·응답 구조가 들어 있다. 사이트 관련 코드를 쓰거나 고치기 전에 반드시 확인한다.

  • 동행복권은 2026년에 개편됐다. 인터넷의 기존 봇 코드와 블로그는 대부분 죽은 엔드포인트(common.do?method=..., userSsl.do?method=login)를 쓴다. 베끼지 마라.
  • 참조 구현(techinpark/lottery-bot, roeniss/dhlottery-api)도 각각 틀린 값이 있다. 실측 스펙과 어긋나면 실측을 따른다.
  • 스펙에 없는 엔드포인트가 필요해지면 추측하지 말고 DevTools 로 캡처해 스펙 문서에 먼저 기록한 뒤 구현한다.
  • 구매 응답에 자동화 탐지(isAllowed=="N")가 있다. 이 분기를 절대 삼키지 않는다.

구조

src/klottery/      공용 로직 — 두 곳 이상에서 쓰이는 코드만 올린다
src/klottery/mcp/  MCP 서버 배선 — 도메인 로직을 두지 않는다
scripts/           자동화 진입점 — 얇게 유지한다 (인자 파싱 → 공용 로직 호출 → 출력)
tests/             pytest. 네트워크를 타지 않는다
data/              수집 결과·쿠키. gitignore 대상 (.gitkeep 만 추적)
docs/              API 스펙, 설계 계획

src/klottery/endpoints.py 가 사이트에 붙는 유일한 지점이다. URL·폼 필드명·매직값은 전부 거기 두고, 다른 모듈은 참조만 한다. 사이트가 또 개편되면 그 파일만 고치면 된다.

uv sync 가 프로젝트 자체를 venv 에 설치하므로 scripts/ 에서 from klottery.x import y 가 그대로 동작한다. sys.path 조작이나 상대 경로 import 를 넣지 않는다.

새 자동화를 추가할 때:

  1. scripts/<동사>.py 로 진입점을 만든다 (예: buy.py, deposit.py, results.py).
  2. 로직이 다른 스크립트와 겹치기 시작하면 그때 src/klottery/ 로 올린다. 미리 올리지 않는다.
  3. 사이트에 직접 붙는 코드(엔드포인트·셀렉터·폼 필드)는 src/klottery/ 의 한 모듈에 모은다. 사이트 개편 시 수정 지점이 하나여야 한다.

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

Subscribe to this mod's changes

k-lottery AGENTS.md is an instructions file published in the GitHub repository rajephon/k-lottery (2 stars, last pushed 1mo ago), licensed MIT. It adds 2,488 tokens to every session, about $0.0124 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-31.

Related

Other instructions, from other repositories

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,296 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

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 · 6,785 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

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

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,104 tokens