instruction.md
# Lotto Results
## What this skill does
`k-lotto` 패키지로 동행복권 로또 최신 회차, 특정 회차, 상세 당첨 결과, 번호 대조를 처리한다.
## When to use
- "이번 주 로또 번호 뭐야"
- "1210회 당첨번호 알려줘"
- "내 번호가 몇 등인지 봐줘"
## Prerequisites
- Node.js 18+
- 배포 후: `npm install -g k-lotto`
- 실행 전: `export NODE_PATH="$(npm root -g)"`
- 이 저장소에서 개발할 때: 루트에서 `npm install`
## Inputs
- 회차 번호 또는 "latest"
- 선택 사항: 사용자가 가진 6개 번호
## Workflow
### 0. Install the package globally when missing
`node -e 'require("k-lotto")'` 가 실패하면 다른 구현으로 우회하지 말고 전역 Node 패키지 설치를 먼저 시도한다.
```bash
npm install -g k-lotto
export NODE_PATH="$(npm root -g)"
```
패키지가 없다는 이유로 HTML 파서를 다시 짜거나 다른 비공식 소스를 찾지 않는다.
### 1. Get the latest round when needed
```bash
NODE_PATH="$(npm root -g)" node - <<'JS'
const lotto = require("k-lotto");
lotto.getLatestRound().then((round) => console.log(round));
JS
```
### 2. Fetch result or detailed payout data
```bash
NODE_PATH="$(npm root -g)" node - <<'JS'
const lotto = require("k-lotto");
lotto.getDetailResult(1216).then((result) => console.log(JSON.stringify(result, null, 2)));
JS
```
### 3. Check user's numbers when provided
```bash
NODE_PATH="$(npm root -g)" node - <<'JS'
const lotto = require("k-lotto");
lotto.checkNumber(1216, ["3", "10", "14", "15", "23", "24"])
.then((result) => console.log(JSON.stringify(result, null, 2)));
JS
```
## Done when
- 최신 또는 요청 회차의 번호가 확인되어 있다
- 상세 요청이면 추첨일과 당첨금 분포가 정리되어 있다
- 번호 대조 요청이면 일치 번호와 등수가 확인되어 있다
## Failure modes
- 최신 회차는 결과 페이지 HTML에서 읽기 때문에 upstream HTML 변경의 영향을 받을 수 있다
- 상세 회차 정보는 동행복권 JSON 응답 스키마 변경의 영향을 받을 수 있다
## Notes
- 사용자 번호를 받아도 영구 저장하지 않는다
- 조회 전용 스킬이다
references/DISCLAIMER.md
# DISCLAIMER — `lotto-results`
이 스킬은 동행복권 또는 복권 운영기관의 공식 기능 또는 공식 지원 도구가 아니며, 공식 제휴·후원·승인·인증 또는 협업한 사실이 전혀 없습니다. 상표와 서비스명은 당첨결과 조회 기능과 대상을 설명하기 위해서만 사용합니다.
대법원 2005. 6. 10. 선고 [2005도1637 판결](https://www.law.go.kr/LSW/precInfoP.do?precSeq=83920)(소니용 리모컨 사건)은 기능 설명용 표장과 출처표시를 구별했습니다. [상표법 제2조](https://www.law.go.kr/법령/상표법/제2조), [제89조](https://www.law.go.kr/법령/상표법/제89조), [제90조](https://www.law.go.kr/법령/상표법/제90조), [제108조](https://www.law.go.kr/법령/상표법/제108조)에 따른 출처 혼동 판단은 별도입니다.
대법원 2022. 5. 12. 선고 [2021도1533 판결](https://www.law.go.kr/LSW/precInfoP.do?precSeq=221765)은 공개정보 수집만으로 곧바로 [정보통신망법 제48조](https://www.law.go.kr/법령/정보통신망이용촉진및정보보호등에관한법률/제48조) 위반이 되는 것은 아닌 사정을 제시했지만, [저작권법 제93조](https://www.law.go.kr/법령/저작권법/제93조)의 데이터베이스 권리와 [형법 제314조 제2항](https://www.law.go.kr/법령/형법/제314조)은 별도입니다.
- 공개 당첨정보 자동 수집은 반드시 개인의 정보 조회용으로만 사용하고 조직적·대량 크롤링이나 별도 DB 구축을 하지 않습니다.
- 사용자 번호를 불필요하게 보관·공유하지 않고 복권 구매·대리행위를 수행하지 않습니다.
- 접근통제·차단·rate limit을 우회하거나 정상 서비스를 방해하지 않습니다.
이 문서는 적법성을 보증하는 법률 자문이 아닙니다.
references/TRADEMARK-LEGAL-STATEMENT.md
# 상표 사용 법적 고지 — `lotto-results`
이 스킬에서 `로또 6/45` 및 `Lotto` 명칭은 회차별 당첨번호·당첨금·일치 여부 조회의 **대상 복권 상품**을 식별하기 위해 사용한다. k-skill의 출처나 복권 발행·수탁 주체를 해당 운영기관으로 표시하려는 사용이 아니다.
대법원 2005. 6. 10. 선고 [2005도1637 판결](https://www.law.go.kr/LSW/precInfoP.do?precSeq=83920)은 타인의 표장을 출처표시가 아니라 상품 기능 또는 적용 기종을 밝히기 위해 사용하고 상표 사용으로 인식될 수 없는 경우 침해가 아니라고 판시했다. [상표법 제2조](https://www.law.go.kr/법령/상표법/제2조), [제89조](https://www.law.go.kr/법령/상표법/제89조), [제90조](https://www.law.go.kr/법령/상표법/제90조), [제108조](https://www.law.go.kr/법령/상표법/제108조)와 대법원 [2011다18802](https://www.law.go.kr/LSW/precInfoP.do?precSeq=167457), [2019후10418](https://law.go.kr/LSW/precInfoP.do?mode=0&precSeq=230725) 판결에 따라 실제 거래계에서 출처표시로 기능하는지는 표시 태양과 사용 경위 등을 종합해 판단해야 한다.
따라서 이 명칭은 필요한 범위의 평문으로만 사용하고, 별도 근거 없이 로고, 공식·제휴·후원·인증·파트너 표현을 사용하지 않는다. 각 상표의 권리는 해당 권리자에게 있다. 이 문서는 복권 판매·구매 권한, 게임 규칙, 데이터 권리, 약관·계약 또는 접근 방식의 적법성을 판단하지 않는다.
전체 검토: [제3자 상표의 기능 설명·호환 대상 표시 검토](https://github.com/NomaDamas/k-skill/blob/dev/docs/legal/trademark-use-review.md)
skill.json
{
"name": "lotto-results",
"description": "Check Korean Lotto draw results, latest rounds, and ticket matches with the k-lotto npm package. Use when the user asks for winning numbers, payout details, or whether their numbers matched.",
"profiles": [
"lookup"
],
"frontmatter": "name: lotto-results\ndescription: Check Korean Lotto draw results, latest rounds, and ticket matches with the k-lotto npm package. Use when the user asks for winning numbers, payout details, or whether their numbers matched.\nlicense: MIT\nmetadata:\n category: utility\n locale: ko-KR\n phase: v1"
}
SKILL.md
---
name: lotto-results
description: Check Korean Lotto draw results, latest rounds, and ticket matches with the k-lotto npm package. Use when the user asks for winning numbers, payout details, or whether their numbers matched.
license: MIT
metadata:
category: utility
locale: ko-KR
phase: v1
---
# lotto-results
<!-- k-skill:cli-stub — generated by scripts/generate-skill-stubs.js; edit skill.json / instruction.md instead -->
## Get the full instructions (required first step)
Run this and follow its output as the primary instructions for this skill:
```bash
npx -y @nomadamas/k-skill@0 instruct lotto-results
```
The CLI detects the current runtime (Dolshoi vault/CloakBrowser vs generic) and prints only the applicable instructions, always up to date. Helper files bundled with the CLI are listed by:
```bash
npx -y @nomadamas/k-skill@0 files lotto-results
```
Keep the CLI and every coding-agent skill install current (including Vercel Agent Skills) with:
```bash
npx -y @nomadamas/k-skill@0 update
```
If `npx` is unavailable, install Node.js 18+ or follow https://github.com/NomaDamas/k-skill#readme, or read the source instructions at https://github.com/NomaDamas/k-skill/blob/main/lotto-results/instruction.md.
## Legal disclaimer (required)
This skill is not an official feature of, officially supported by, affiliated with, sponsored by, approved by, or developed in collaboration with any third-party trademark owner or service operator it identifies. Third-party names are used only to describe the skill's function, lookup target, or compatibility.
Any automated collection of publicly accessible information must be limited to personal, non-organizational lookup. Do not use this skill for systematic or bulk crawling, database building, access-control or block circumvention, or conduct that interferes with a third party's business or service.
Read the full Korean legal disclaimer, including the cited Korean Supreme Court precedents and statutory limits, before use:
```bash
npx -y @nomadamas/k-skill@0 read lotto-results references/DISCLAIMER.md
```
## Hard rules even without the CLI
- Never execute payment, message/email delivery, final submission, cancellation, or public posting without the user's explicit approval immediately beforehand.
- Never ask for, print, or store plaintext credentials in chat, files, or shell arguments.
- Never bypass legal, physical-presence, CAPTCHA, identity-proofing, or electronic-signature boundaries.