Seed the repo with low-friction Korean live-data skills

KBO, lotto, and Seoul subway arrival are good v1 complements to train booking because they provide obvious Korean-local utility without requiring a thick integration layer. The subway skill still enforces secret injection because the official Open API key should never be handled as plaintext.

Constraint: v1 should prefer thin wrappers over existing packages and official APIs
Rejected: Add SmartStore or Kakao flows in the first pass | auth and policy surfaces are too heavy for a fast v1
Confidence: medium
Scope-risk: narrow
Reversibility: clean
Directive: Keep live-data skills compact and timestamped so answers do not overclaim freshness
Tested: bash scripts/validate-skills.sh
Not-tested: Live upstream responses from kbo-game, korean-lotto, and Seoul Open Data
This commit is contained in:
Jeffrey (Dongkyu) Kim 2026-03-25 00:16:38 +09:00
commit 65c835f6dd
3 changed files with 238 additions and 0 deletions

74
kbo-results/SKILL.md Normal file
View file

@ -0,0 +1,74 @@
---
name: kbo-results
description: Fetch KBO game schedules and results for a specific date with the kbo-game npm package. Use when the user asks for today's KBO games, yesterday's scores, or a date-specific scoreboard.
license: MIT
metadata:
category: sports
locale: ko-KR
phase: v1
---
# KBO Results
## What this skill does
`kbo-game` 패키지로 특정 날짜 KBO 경기 정보를 가져와 경기 일정, 스코어, 상태를 요약한다.
## When to use
- "오늘 KBO 경기 결과 알려줘"
- "어제 한화 경기 스코어 보여줘"
- "2026-04-01 KBO 일정 정리해줘"
## Prerequisites
- Node.js 18+
- `npm install kbo-game`
## Inputs
- 날짜: `YYYY-MM-DD`
- 선택 사항: 특정 팀명
## Workflow
### 1. Fetch the date
```bash
node --input-type=module - <<'JS'
import { getGameInfo } from "kbo-game";
const date = "2026-03-25";
const games = await getGameInfo(date);
console.log(JSON.stringify(games, null, 2));
JS
```
### 2. Normalize for humans
원본 데이터를 그대로 던지지 말고 아래 기준으로 정리한다.
- 홈팀 vs 원정팀
- 진행 상태 또는 경기 종료 여부
- 스코어
- 필요한 경우 특정 팀만 필터링
### 3. Keep the answer compact
사용자가 scoreboard를 원하면 경기별 한 줄 요약부터 준다.
## Done when
- 날짜 기준 전체 경기 요약이 있다
- 팀 필터 요청이면 해당 팀 경기만 남아 있다
- raw JSON이 필요하면 별도로 제공할 수 있다
## Failure modes
- KBO 사이트 변경으로 패키지 응답이 깨질 수 있다
- 비시즌 날짜는 빈 결과가 올 수 있다
## Notes
- 이 스킬은 조회 전용이다
- 사용자 기준 "오늘/어제" 같은 상대 날짜는 항상 절대 날짜로 변환해서 실행한다

77
lotto-results/SKILL.md Normal file
View file

@ -0,0 +1,77 @@
---
name: lotto-results
description: Check Korean Lotto draw results, latest rounds, and ticket matches with the korean-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
## What this skill does
`korean-lotto` 패키지로 동행복권 로또 최신 회차, 특정 회차, 상세 당첨 결과, 번호 대조를 처리한다.
## When to use
- "이번 주 로또 번호 뭐야"
- "1210회 당첨번호 알려줘"
- "내 번호가 몇 등인지 봐줘"
## Prerequisites
- Node.js 18+
- `npm install korean-lotto`
## Inputs
- 회차 번호 또는 "latest"
- 선택 사항: 사용자가 가진 6개 번호
## Workflow
### 1. Get the latest round when needed
```bash
node - <<'JS'
const lotto = require("korean-lotto");
lotto.getLatestRound().then((round) => console.log(round));
JS
```
### 2. Fetch result or detailed payout data
```bash
node - <<'JS'
const lotto = require("korean-lotto");
lotto.getDetailResult(861).then((result) => console.log(JSON.stringify(result, null, 2)));
JS
```
### 3. Check user's numbers when provided
```bash
node - <<'JS'
const lotto = require("korean-lotto");
lotto.checkNumber(862, ["10", "32", "38", "40", "42", "43"])
.then((result) => console.log(JSON.stringify(result, null, 2)));
JS
```
## Done when
- 최신 또는 요청 회차의 번호가 확인되어 있다
- 상세 요청이면 추첨일과 당첨금 분포가 정리되어 있다
- 번호 대조 요청이면 일치 번호와 등수가 확인되어 있다
## Failure modes
- 패키지가 오래되어 upstream HTML 변경에 취약할 수 있다
- 최신 회차 반영이 늦을 수 있다
## Notes
- 사용자 번호를 받아도 영구 저장하지 않는다
- 조회 전용 스킬이다

View file

@ -0,0 +1,87 @@
---
name: seoul-subway-arrival
description: Look up Seoul real-time subway arrival information with the official Seoul Open Data API. Use when the user asks when a train arrives, which trains are approaching a station, or how crowded Seoul subway timing looks right now.
license: MIT
metadata:
category: transit
locale: ko-KR
phase: v1
---
# Seoul Subway Arrival
## What this skill does
서울 열린데이터 광장의 실시간 지하철 도착정보 Open API로 역 기준 도착 예정 열차 정보를 요약한다.
## When to use
- "강남역 지금 몇 분 뒤 도착해?"
- "서울역 1호선 도착 정보 보여줘"
- "잠실역 곧 들어오는 열차 정리해줘"
## Prerequisites
- 서울 열린데이터 광장 API key
- `op` installed and signed in
- secret policy reviewed in `../docs/security-and-secrets.md`
- optional: `jq`
## Required secrets
- `SEOUL_OPEN_API_KEY`
## Inputs
- 역명
- 선택 사항: 가져올 건수
## Workflow
### 1. Load the API key securely
평문 key를 붙여 넣지 않는다.
```bash
op run --env-file=.env.op -- bash -lc 'test -n "$SEOUL_OPEN_API_KEY"'
```
### 2. Query the official station arrival endpoint
서울 실시간 지하철 API는 역명 기준 실시간 도착 정보를 JSON/XML로 제공한다. 기본 질의 예시는 다음 패턴을 쓴다.
```bash
op run --env-file=.env.op -- curl -s \
"http://swopenAPI.seoul.go.kr/api/subway/${SEOUL_OPEN_API_KEY}/json/realtimeStationArrival/0/8/강남"
```
### 3. Summarize the response
가능하면 아래 항목만 먼저 요약한다.
- 호선
- 상/하행 또는 외/내선
- 첫 번째 도착 메시지
- 두 번째 도착 메시지
- 도착 예정 시간(있으면 초 단위)
### 4. Be conservative about live data
실시간 데이터는 몇 초 단위로 바뀔 수 있으므로, 답변에는 조회 시점을 같이 적는다.
## Done when
- 요청 역의 도착 예정 열차가 정리되어 있다
- live data 기준 시점이 명시되어 있다
- key가 노출되지 않았다
## Failure modes
- API key 미설정
- quota 초과
- 역명 표기 불일치
## Notes
- 서울 열린데이터 광장 가이드는 실시간 지하철 Open API에 일일 호출 제한이 있을 수 있다고 안내한다
- endpoint path는 API 버전 변경 가능성이 있으므로 실패 시 dataset console의 최신 샘플 URL을 다시 확인한다