[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CND2QZ0ZFEQYQRFTAQSD8F":3,"skill-same:01M7CND2QZ0ZFEQYQRFTAQSD8F":56},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":31,"repositoryHtmlUrl":32,"repositoryHomepageUrl":6,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":34,"updatedAt":35,"install":36,"resources":49},"01M7CND2QZ0ZFEQYQRFTAQSD8F","delivery-tracking",null,"Track CJ대한통운 and 우체국 parcels by invoice number with official carrier endpoints, and structure the workflow around a carrier adapter that can grow to more couriers later.","om-scogo\u002Fskillsh-scraper","om-scogo","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F160466840?v=4","01M79AWB6DFVCQ7RK70CS34B96","Om Achrekar","01M79AWB6ZM9SKR8KDH1WSSM22",0,"MIT","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fnomadamas-k-skill\u002Fdelivery-tracking\u002FSkill.md",[],[],"2026-11-15 14:19:17",false,"---\nname: delivery-tracking\ndescription: Track CJ대한통운 and 우체국 parcels by invoice number with official carrier endpoints, and structure the workflow around a carrier adapter that can grow to more couriers later.\nlicense: MIT\nmetadata:\n  category: logistics\n  locale: ko-KR\n  phase: v1\n---\n\n# Delivery Tracking\n\n## What this skill does\n\nCJ대한통운과 우체국 공식 조회 표면을 사용해 송장 번호로 현재 배송 상태를 조회한다.\n\n- **CJ대한통운**: 공식 배송조회 페이지가 노출하는 JSON endpoint 사용\n- **우체국**: 공식 배송조회 페이지가 사용하는 HTML endpoint 사용\n- 결과는 공통 포맷(택배사 \u002F 송장번호 \u002F 현재 상태 \u002F 최근 이벤트들)으로 짧게 정리\n\n## When to use\n\n- \"CJ대한통운 송장 조회해줘\"\n- \"우체국 택배 지금 어디야\"\n- \"이 송장번호 배송완료인지 확인해줘\"\n- \"택배사별 조회 로직을 나중에 더 붙일 수 있게 정리해줘\"\n\n## When not to use\n\n- 주문번호만 있고 송장번호가 없는 경우\n- 택배 예약\u002F반품 접수까지 바로 해야 하는 경우\n- 비공식 통합 배송조회 서비스로 우회하고 싶은 경우\n\n## Prerequisites\n\n- 인터넷 연결\n- `python3`\n- `curl`\n- 선택 사항: `jq`\n\n## Inputs\n\n- 택배사 식별자: `cj` 또는 `epost`\n- 송장번호\n  - CJ대한통운: 숫자 10자리 또는 12자리\n  - 우체국: 숫자 13자리\n\n## Carrier adapter rule\n\n이 스킬은 택배사별 로직을 **carrier adapter** 단위로 나눈다.\n\n새 택배사를 붙일 때는 아래 필드를 먼저 정한다.\n\n- `carrier id`: 예) `cj`, `epost`\n- `validator`: 송장번호 자리수\u002F패턴\n- `entrypoint`: 공식 조회 진입 URL\n- `transport`: JSON API \u002F HTML form \u002F CLI 중 무엇을 쓰는지\n- `parser`: 어떤 필드나 테이블에서 상태를 뽑는지\n- `status map`: 각 택배사의 원본 상태 코드를 공통 상태로 어떻게 줄일지\n- `retry policy`: timeout\u002Fretry 규칙\n\n현재 어댑터는 아래 둘이다.\n\n| carrier adapter | official entry | transport | validator | parser focus |\n| --- | --- | --- | --- | --- |\n| `cj` | `https:\u002F\u002Fwww.cjlogistics.com\u002Fko\u002Ftool\u002Fparcel\u002Ftracking` | page GET + `tracking-detail` POST JSON | 10자리 또는 12자리 숫자 | `parcelDetailResultMap.resultList` |\n| `epost` | `https:\u002F\u002Fservice.epost.go.kr\u002Ftrace.RetrieveRegiPrclDeliv.postal?sid1=` | form POST HTML | 13자리 숫자 | 기본정보 `table_col` + 상세 `processTable` |\n\n## Workflow\n\n### 0. Normalize the input first\n\n- 택배사 이름을 `cj` \u002F `epost` 둘 중 하나로 정규화한다.\n- 송장번호에서 공백과 `-` 를 제거한다.\n- 자리수 검증이 먼저 실패하면 조회를 보내지 않는다.\n\n### 1. CJ대한통운: official JSON flow\n\n공식 진입 페이지에서 `_csrf` 를 읽고, 그 값을 `tracking-detail` POST에 같이 보낸다.\n\n- 진입 페이지: `https:\u002F\u002Fwww.cjlogistics.com\u002Fko\u002Ftool\u002Fparcel\u002Ftracking`\n- 상세 endpoint: `https:\u002F\u002Fwww.cjlogistics.com\u002Fko\u002Ftool\u002Fparcel\u002Ftracking-detail`\n- 필수 필드: `_csrf`, `paramInvcNo`\n\n기본 예시는 `curl` 로 `_csrf` 와 cookie를 유지하고, Python은 JSON 정리에만 쓴다.\n\n```bash\ntmp_body=\"$(mktemp)\"\ntmp_cookie=\"$(mktemp)\"\ntmp_json=\"$(mktemp)\"\ninvoice=\"1234567890\"  # 공식 페이지 placeholder 성격의 smoke-test 값\n\ncurl -sS -L -c \"$tmp_cookie\" \\\n  \"https:\u002F\u002Fwww.cjlogistics.com\u002Fko\u002Ftool\u002Fparcel\u002Ftracking\" \\\n  -o \"$tmp_body\"\n\ncsrf=\"$(python3 - \u003C\u003C'PY' \"$tmp_body\"\nimport re\nimport sys\n\ntext = open(sys.argv[1], encoding=\"utf-8\", errors=\"ignore\").read()\nprint(re.search(r'name=\"_csrf\" value=\"([^\"]+)\"', text).group(1))\nPY\n)\"\n\ncurl -sS -L -b \"$tmp_cookie\" \\\n  -H \"Content-Type: application\u002Fx-www-form-urlencoded; charset=UTF-8\" \\\n  --data-urlencode \"_csrf=$csrf\" \\\n  --data-urlencode \"paramInvcNo=$invoice\" \\\n  \"https:\u002F\u002Fwww.cjlogistics.com\u002Fko\u002Ftool\u002Fparcel\u002Ftracking-detail\" \\\n  -o \"$tmp_json\"\n\npython3 - \u003C\u003C'PY' \"$tmp_json\"\nimport json\nimport sys\n\npayload = json.load(open(sys.argv[1], encoding=\"utf-8\"))\nevents = payload[\"parcelDetailResultMap\"][\"resultList\"]\nif not events:\n    raise SystemExit(\"조회 결과가 없습니다.\")\n\nstatus_map = {\n    \"11\": \"상품인수\",\n    \"21\": \"상품이동중\",\n    \"41\": \"상품이동중\",\n    \"42\": \"배송지도착\",\n    \"44\": \"상품이동중\",\n    \"82\": \"배송출발\",\n    \"91\": \"배달완료\",\n}\n\nlatest = events[-1]\nnormalized_events = [\n    {\n        \"timestamp\": event.get(\"dTime\"),\n        \"location\": event.get(\"regBranNm\"),\n        \"status_code\": event.get(\"crgSt\"),\n        \"status\": status_map.get(event.get(\"crgSt\"), event.get(\"scanNm\") or \"알수없음\"),\n    }\n    for event in events\n]\nprint(json.dumps({\n    \"carrier\": \"cj\",\n    \"invoice\": payload[\"parcelDetailResultMap\"][\"paramInvcNo\"],\n    \"status_code\": latest.get(\"crgSt\"),\n    \"status\": status_map.get(latest.get(\"crgSt\"), latest.get(\"scanNm\") or \"알수없음\"),\n    \"timestamp\": latest.get(\"dTime\"),\n    \"location\": latest.get(\"regBranNm\"),\n    \"event_count\": len(events),\n    \"recent_events\": normalized_events[-min(3, len(normalized_events)):],\n}, ensure_ascii=False, indent=2))\nPY\n\nrm -f \"$tmp_body\" \"$tmp_cookie\" \"$tmp_json\"\n```\n\n#### CJ 공개 출력 예시\n\n아래 값은 2026-03-27 기준 live smoke test(`1234567890`)에서 확인한 정규화 결과다.\n\n```json\n{\n  \"carrier\": \"cj\",\n  \"invoice\": \"1234567890\",\n  \"status_code\": \"91\",\n  \"status\": \"배달완료\",\n  \"timestamp\": \"2026-03-21 12:22:13\",\n  \"location\": \"경기광주오포\",\n  \"event_count\": 3,\n  \"recent_events\": [\n    {\n      \"timestamp\": \"2026-03-10 03:01:45\",\n      \"location\": \"청원HUB\",\n      \"status_code\": \"44\",\n      \"status\": \"상품이동중\"\n    },\n    {\n      \"timestamp\": \"2026-03-21 10:53:19\",\n      \"location\": \"경기광주오포\",\n      \"status_code\": \"82\",\n      \"status\": \"배송출발\"\n    },\n    {\n      \"timestamp\": \"2026-03-21 12:22:13\",\n      \"location\": \"경기광주오포\",\n      \"status_code\": \"91\",\n      \"status\": \"배달완료\"\n    }\n  ]\n}\n```\n\n추가 smoke test 로는 `000000000000` 도 사용할 수 있다.\n\nCJ 응답은 `parcelResultMap.resultList` 가 비어 있어도 `parcelDetailResultMap.resultList` 쪽에 이벤트가 들어올 수 있으므로, 상세 이벤트 배열을 우선 본다. published 예시는 공통 결과 스키마(`carrier`, `invoice`, `status`, `timestamp`, `location`, `event_count`, `recent_events`, 선택적 `status_code`)에 맞춰 비식별 필드만 남기고, 담당자 이름·연락처가 섞일 수 있는 `crgNm` 원문은 그대로 보여주지 않는다.\n\n### 2. 우체국: official HTML flow\n\n우체국은 공식 entry page가 다시 `trace.RetrieveDomRigiTraceList.comm` 으로 `sid1` 을 POST하는 구조다.\n\n- 진입 페이지: `https:\u002F\u002Fservice.epost.go.kr\u002Ftrace.RetrieveRegiPrclDeliv.postal?sid1=`\n- 실제 조회 endpoint: `https:\u002F\u002Fservice.epost.go.kr\u002Ftrace.RetrieveDomRigiTraceList.comm`\n- 필수 필드: `sid1`\n\n우체국은 로컬 Python HTTP client보다 `curl --http1.1 --tls-max 1.2` 경로가 더 안정적이므로 그 조합을 기본 예시로 쓴다.\n\n```bash\ntmp_html=\"$(mktemp)\"\npython3 - \u003C\u003C'PY' \"$tmp_html\"\nimport html\nimport json\nimport re\nimport subprocess\nimport sys\n\ninvoice = \"1234567890123\"  # 공식 페이지 placeholder 성격의 smoke-test 값\noutput_path = sys.argv[1]\n\ncmd = [\n    \"curl\",\n    \"--http1.1\",\n    \"--tls-max\",\n    \"1.2\",\n    \"--silent\",\n    \"--show-error\",\n    \"--location\",\n    \"--retry\",\n    \"3\",\n    \"--retry-all-errors\",\n    \"--retry-delay\",\n    \"1\",\n    \"--max-time\",\n    \"30\",\n    \"-o\",\n    output_path,\n    \"-d\",\n    f\"sid1={invoice}\",\n    \"https:\u002F\u002Fservice.epost.go.kr\u002Ftrace.RetrieveDomRigiTraceList.comm\",\n]\nsubprocess.run(cmd, check=True)\n\npage = open(output_path, encoding=\"utf-8\", errors=\"ignore\").read()\n\nsummary = re.search(\n    r\"\u003Cth scope=\\\"row\\\">(?P\u003Ctracking>[^\u003C]+)\u003C\u002Fth>.*?\"\n    r\"\u003Ctd>(?P\u003Csender>.*?)\u003C\u002Ftd>.*?\"\n    r\"\u003Ctd>(?P\u003Creceiver>.*?)\u003C\u002Ftd>.*?\"\n    r\"\u003Ctd>(?P\u003Cdelivered_to>.*?)\u003C\u002Ftd>.*?\"\n    r\"\u003Ctd>(?P\u003Ckind>.*?)\u003C\u002Ftd>.*?\"\n    r\"\u003Ctd>(?P\u003Cresult>.*?)\u003C\u002Ftd>\",\n    page,\n    re.S,\n)\nif not summary:\n    raise SystemExit(\"기본정보 테이블을 찾지 못했습니다.\")\n\ndef clean(raw: str) -> str:\n    text = re.sub(r\"\u003C[^>]+>\", \" \", raw)\n    return \" \".join(html.unescape(text).split())\n\ndef clean_location(raw: str) -> str:\n    text = clean(raw)\n    return re.sub(r\"\\s*(TEL\\s*:?\\s*)?\\d{2,4}[.\\-]\\d{3,4}[.\\-]\\d{4}\", \"\", text).strip()\n\nevents = re.findall(\n    r\"\u003Ctr>\\s*\u003Ctd>(\\d{4}\\.\\d{2}\\.\\d{2})\u003C\u002Ftd>\\s*\"\n    r\"\u003Ctd>(\\d{2}:\\d{2})\u003C\u002Ftd>\\s*\"\n    r\"\u003Ctd>(.*?)\u003C\u002Ftd>\\s*\"\n    r\"\u003Ctd>\\s*\u003Cspan class=\\\"evtnm\\\">(.*?)\u003C\u002Fspan>(.*?)\u003C\u002Ftd>\\s*\u003C\u002Ftr>\",\n    page,\n    re.S,\n)\n\nnormalized_events = [\n    {\n        \"timestamp\": f\"{day} {time_}\",\n        \"location\": clean_location(location),\n        \"status\": clean(status),\n    }\n    for day, time_, location, status, _detail in events\n]\n\nlatest_event = normalized_events[-1] if normalized_events else None\n\nprint(json.dumps({\n    \"carrier\": \"epost\",\n    \"invoice\": clean(summary.group(\"tracking\")),\n    \"status\": clean(summary.group(\"result\")),\n    \"timestamp\": latest_event[\"timestamp\"] if latest_event else None,\n    \"location\": latest_event[\"location\"] if latest_event else None,\n    \"event_count\": len(normalized_events),\n    \"recent_events\": normalized_events[-min(3, len(normalized_events)):],\n}, ensure_ascii=False, indent=2))\nPY\nrm -f \"$tmp_html\"\n```\n\n#### 우체국 공개 출력 예시\n\n아래 값은 2026-03-27 기준 live smoke test(`1234567890123`)에서 확인한 정규화 결과다.\n\n```json\n{\n  \"carrier\": \"epost\",\n  \"invoice\": \"1234567890123\",\n  \"status\": \"배달완료\",\n  \"timestamp\": \"2025.12.04 15:13\",\n  \"location\": \"제주우편집중국\",\n  \"event_count\": 2,\n  \"recent_events\": [\n    {\n      \"timestamp\": \"2025.12.04 15:13\",\n      \"location\": \"제주우편집중국\",\n      \"status\": \"배달준비\"\n    },\n    {\n      \"timestamp\": \"2025.12.04 15:13\",\n      \"location\": \"제주우편집중국\",\n      \"status\": \"배달완료\"\n    }\n  ]\n}\n```\n\n우체국 기본정보 테이블은 `등기번호`, `보내는 분\u002F접수일자`, `받는 분`, `수령인\u002F배달일자`, `취급구분`, `배달결과` 순서를 사용하고, 상세 이벤트는 `processTable` 아래 `날짜 \u002F 시간 \u002F 발생국 \u002F 처리현황` 행을 읽으면 된다. published 예시는 CJ와 같은 공통 결과 스키마(`carrier`, `invoice`, `status`, `timestamp`, `location`, `event_count`, `recent_events`)에 맞춰 배송 상태에 필요한 값만 남기고, 이벤트 location에 섞일 수 있는 `TEL` 번호 조각도 제거한 뒤 수령인\u002F상세 메모 원문은 그대로 노출하지 않는다.\n\n### 3. Normalize for humans\n\n응답 원문을 그대로 붙이지 말고 아래 공통 결과 스키마로 요약한다.\n\n#### 공통 결과 스키마\n\n- `carrier`: 택배사 식별자 (`cj` 또는 `epost`)\n- `invoice`: 정규화된 송장번호\n- `status`: 현재 배송 상태\n- `timestamp`: 마지막 이벤트 시각\n- `location`: 마지막 이벤트 위치\n- `event_count`: 전체 이벤트 수\n- `recent_events`: 최근 최대 3개 이벤트 목록\n- `status_code`: 필요할 때만 남기는 원본 상태 코드 (현재는 CJ 예시에서만 사용)\n\n### 4. Retry and fallback policy\n\n- 자리수 오류면 바로 멈추고 올바른 형식을 다시 받는다.\n- CJ는 `_csrf` 재취득 후 한 번 더 시도한다.\n- 우체국은 `curl --retry 3 --retry-all-errors --retry-delay 1` 을 유지한다.\n- 다른 택배사로 우회하지 않는다.\n\n## Done when\n\n- 택배사와 송장번호가 올바르게 식별되어 있다\n- 현재 상태와 최근 이벤트가 정리되어 있다\n- 어느 official surface를 썼는지 설명할 수 있다\n- 다른 택배사 확장 시 어떤 carrier adapter 필드를 추가해야 하는지 남아 있다\n\n## Failure modes\n\n- CJ: `_csrf` 추출 실패 또는 `tracking-detail` 응답 스키마 변경\n- CJ: 송장번호 길이가 10자리 또는 12자리가 아님\n- 우체국: `sid1` 이 13자리가 아님\n- 우체국: HTML 마크업 변경으로 테이블 추출 규칙이 깨짐\n- 우체국: `curl` 없이 다른 client로 붙다가 timeout\u002Freset 발생\n\n## Notes\n\n- 조회형 스킬이다.\n- 기본 표면은 공식 carrier endpoint만 사용한다.\n- 다른 택배사 추가는 새 carrier adapter 1개를 같은 포맷으로 붙이는 방식으로 확장한다.\n","# Delivery Tracking\n\n## What this skill does\n\nCJ대한통운과 우체국 공식 조회 표면을 사용해 송장 번호로 현재 배송 상태를 조회한다.\n\n- **CJ대한통운**: 공식 배송조회 페이지가 노출하는 JSON endpoint 사용\n- **우체국**: 공식 배송조회 페이지가 사용하는 HTML endpoint 사용\n- 결과는 공통 포맷(택배사 \u002F 송장번호 \u002F 현재 상태 \u002F 최근 이벤트들)으로 짧게 정리\n\n## When to use\n\n- \"CJ대한통운 송장 조회해줘\"\n- \"우체국 택배 지금 어디야\"\n- \"이 송장번호 배송완료인지 확인해줘\"\n- \"택배사별 조회 로직을 나중에 더 붙일 수 있게 정리해줘\"\n\n## When not to use\n\n- 주문번호만 있고 송장번호가 없는 경우\n- 택배 예약\u002F반품 접수까지 바로 해야 하는 경우\n- 비공식 통합 배송조회 서비스로 우회하고 싶은 경우\n\n## Prerequisites\n\n- 인터넷 연결\n- `python3`\n- `curl`\n- 선택 사항: `jq`\n\n## Inputs\n\n- 택배사 식별자: `cj` 또는 `epost`\n- 송장번호\n  - CJ대한통운: 숫자 10자리 또는 12자리\n  - 우체국: 숫자 13자리\n\n## Carrier adapter rule\n\n이 스킬은 택배사별 로직을 **carrier adapter** 단위로 나눈다.\n\n새 택배사를 붙일 때는 아래 필드를 먼저 정한다.\n\n- `carrier id`: 예) `cj`, `epost`\n- `validator`: 송장번호 자리수\u002F패턴\n- `entrypoint`: 공식 조회 진입 URL\n- `transport`: JSON API \u002F HTML form \u002F CLI 중 무엇을 쓰는지\n- `parser`: 어떤 필드나 테이블에서 상태를 뽑는지\n- `status map`: 각 택배사의 원본 상태 코드를 공통 상태로 어떻게 줄일지\n- `retry policy`: timeout\u002Fretry 규칙\n\n현재 어댑터는 아래 둘이다.\n\n| carrier adapter | official entry | transport | validator | parser focus |\n| --- | --- | --- | --- | --- |\n| `cj` | `https:\u002F\u002Fwww.cjlogistics.com\u002Fko\u002Ftool\u002Fparcel\u002Ftracking` | page GET + `tracking-detail` POST JSON | 10자리 또는 12자리 숫자 | `parcelDetailResultMap.resultList` |\n| `epost` | `https:\u002F\u002Fservice.epost.go.kr\u002Ftrace.RetrieveRegiPrclDeliv.postal?sid1=` | form POST HTML | 13자리 숫자 | 기본정보 `table_col` + 상세 `processTable` |\n\n## Workflow\n\n### 0. Normalize the input first\n\n- 택배사 이름을 `cj` \u002F `epost` 둘 중 하나로 정규화한다.\n- 송장번호에서 공백과 `-` 를 제거한다.\n- 자리수 검증이 먼저 실패하면 조회를 보내지 않는다.\n\n### 1. CJ대한통운: official JSON flow\n\n공식 진입 페이지에서 `_csrf` 를 읽고, 그 값을 `tracking-detail` POST에 같이 보낸다.\n\n- 진입 페이지: `https:\u002F\u002Fwww.cjlogistics.com\u002Fko\u002Ftool\u002Fparcel\u002Ftracking`\n- 상세 endpoint: `https:\u002F\u002Fwww.cjlogistics.com\u002Fko\u002Ftool\u002Fparcel\u002Ftracking-detail`\n- 필수 필드: `_csrf`, `paramInvcNo`\n\n기본 예시는 `curl` 로 `_csrf` 와 cookie를 유지하고, Python은 JSON 정리에만 쓴다.\n\n```bash\ntmp_body=\"$(mktemp)\"\ntmp_cookie=\"$(mktemp)\"\ntmp_json=\"$(mktemp)\"\ninvoice=\"1234567890\"  # 공식 페이지 placeholder 성격의 smoke-test 값\n\ncurl -sS -L -c \"$tmp_cookie\" \\\n  \"https:\u002F\u002Fwww.cjlogistics.com\u002Fko\u002Ftool\u002Fparcel\u002Ftracking\" \\\n  -o \"$tmp_body\"\n\ncsrf=\"$(python3 - \u003C\u003C'PY' \"$tmp_body\"\nimport re\nimport sys\n\ntext = open(sys.argv[1], encoding=\"utf-8\", errors=\"ignore\").read()\nprint(re.search(r'name=\"_csrf\" value=\"([^\"]+)\"', text).group(1))\nPY\n)\"\n\ncurl -sS -L -b \"$tmp_cookie\" \\\n  -H \"Content-Type: application\u002Fx-www-form-urlencoded; charset=UTF-8\" \\\n  --data-urlencode \"_csrf=$csrf\" \\\n  --data-urlencode \"paramInvcNo=$invoice\" \\\n  \"https:\u002F\u002Fwww.cjlogistics.com\u002Fko\u002Ftool\u002Fparcel\u002Ftracking-detail\" \\\n  -o \"$tmp_json\"\n\npython3 - \u003C\u003C'PY' \"$tmp_json\"\nimport json\nimport sys\n\npayload = json.load(open(sys.argv[1], encoding=\"utf-8\"))\nevents = payload[\"parcelDetailResultMap\"][\"resultList\"]\nif not events:\n    raise SystemExit(\"조회 결과가 없습니다.\")\n\nstatus_map = {\n    \"11\": \"상품인수\",\n    \"21\": \"상품이동중\",\n    \"41\": \"상품이동중\",\n    \"42\": \"배송지도착\",\n    \"44\": \"상품이동중\",\n    \"82\": \"배송출발\",\n    \"91\": \"배달완료\",\n}\n\nlatest = events[-1]\nnormalized_events = [\n    {\n        \"timestamp\": event.get(\"dTime\"),\n        \"location\": event.get(\"regBranNm\"),\n        \"status_code\": event.get(\"crgSt\"),\n        \"status\": status_map.get(event.get(\"crgSt\"), event.get(\"scanNm\") or \"알수없음\"),\n    }\n    for event in events\n]\nprint(json.dumps({\n    \"carrier\": \"cj\",\n    \"invoice\": payload[\"parcelDetailResultMap\"][\"paramInvcNo\"],\n    \"status_code\": latest.get(\"crgSt\"),\n    \"status\": status_map.get(latest.get(\"crgSt\"), latest.get(\"scanNm\") or \"알수없음\"),\n    \"timestamp\": latest.get(\"dTime\"),\n    \"location\": latest.get(\"regBranNm\"),\n    \"event_count\": len(events),\n    \"recent_events\": normalized_events[-min(3, len(normalized_events)):],\n}, ensure_ascii=False, indent=2))\nPY\n\nrm -f \"$tmp_body\" \"$tmp_cookie\" \"$tmp_json\"\n```\n\n#### CJ 공개 출력 예시\n\n아래 값은 2026-03-27 기준 live smoke test(`1234567890`)에서 확인한 정규화 결과다.\n\n```json\n{\n  \"carrier\": \"cj\",\n  \"invoice\": \"1234567890\",\n  \"status_code\": \"91\",\n  \"status\": \"배달완료\",\n  \"timestamp\": \"2026-03-21 12:22:13\",\n  \"location\": \"경기광주오포\",\n  \"event_count\": 3,\n  \"recent_events\": [\n    {\n      \"timestamp\": \"2026-03-10 03:01:45\",\n      \"location\": \"청원HUB\",\n      \"status_code\": \"44\",\n      \"status\": \"상품이동중\"\n    },\n    {\n      \"timestamp\": \"2026-03-21 10:53:19\",\n      \"location\": \"경기광주오포\",\n      \"status_code\": \"82\",\n      \"status\": \"배송출발\"\n    },\n    {\n      \"timestamp\": \"2026-03-21 12:22:13\",\n      \"location\": \"경기광주오포\",\n      \"status_code\": \"91\",\n      \"status\": \"배달완료\"\n    }\n  ]\n}\n```\n\n추가 smoke test 로는 `000000000000` 도 사용할 수 있다.\n\nCJ 응답은 `parcelResultMap.resultList` 가 비어 있어도 `parcelDetailResultMap.resultList` 쪽에 이벤트가 들어올 수 있으므로, 상세 이벤트 배열을 우선 본다. published 예시는 공통 결과 스키마(`carrier`, `invoice`, `status`, `timestamp`, `location`, `event_count`, `recent_events`, 선택적 `status_code`)에 맞춰 비식별 필드만 남기고, 담당자 이름·연락처가 섞일 수 있는 `crgNm` 원문은 그대로 보여주지 않는다.\n\n### 2. 우체국: official HTML flow\n\n우체국은 공식 entry page가 다시 `trace.RetrieveDomRigiTraceList.comm` 으로 `sid1` 을 POST하는 구조다.\n\n- 진입 페이지: `https:\u002F\u002Fservice.epost.go.kr\u002Ftrace.RetrieveRegiPrclDeliv.postal?sid1=`\n- 실제 조회 endpoint: `https:\u002F\u002Fservice.epost.go.kr\u002Ftrace.RetrieveDomRigiTraceList.comm`\n- 필수 필드: `sid1`\n\n우체국은 로컬 Python HTTP client보다 `curl --http1.1 --tls-max 1.2` 경로가 더 안정적이므로 그 조합을 기본 예시로 쓴다.\n\n```bash\ntmp_html=\"$(mktemp)\"\npython3 - \u003C\u003C'PY' \"$tmp_html\"\nimport html\nimport json\nimport re\nimport subprocess\nimport sys\n\ninvoice = \"1234567890123\"  # 공식 페이지 placeholder 성격의 smoke-test 값\noutput_path = sys.argv[1]\n\ncmd = [\n    \"curl\",\n    \"--http1.1\",\n    \"--tls-max\",\n    \"1.2\",\n    \"--silent\",\n    \"--show-error\",\n    \"--location\",\n    \"--retry\",\n    \"3\",\n    \"--retry-all-errors\",\n    \"--retry-delay\",\n    \"1\",\n    \"--max-time\",\n    \"30\",\n    \"-o\",\n    output_path,\n    \"-d\",\n    f\"sid1={invoice}\",\n    \"https:\u002F\u002Fservice.epost.go.kr\u002Ftrace.RetrieveDomRigiTraceList.comm\",\n]\nsubprocess.run(cmd, check=True)\n\npage = open(output_path, encoding=\"utf-8\", errors=\"ignore\").read()\n\nsummary = re.search(\n    r\"\u003Cth scope=\\\"row\\\">(?P\u003Ctracking>[^\u003C]+)\u003C\u002Fth>.*?\"\n    r\"\u003Ctd>(?P\u003Csender>.*?)\u003C\u002Ftd>.*?\"\n    r\"\u003Ctd>(?P\u003Creceiver>.*?)\u003C\u002Ftd>.*?\"\n    r\"\u003Ctd>(?P\u003Cdelivered_to>.*?)\u003C\u002Ftd>.*?\"\n    r\"\u003Ctd>(?P\u003Ckind>.*?)\u003C\u002Ftd>.*?\"\n    r\"\u003Ctd>(?P\u003Cresult>.*?)\u003C\u002Ftd>\",\n    page,\n    re.S,\n)\nif not summary:\n    raise SystemExit(\"기본정보 테이블을 찾지 못했습니다.\")\n\ndef clean(raw: str) -> str:\n    text = re.sub(r\"\u003C[^>]+>\", \" \", raw)\n    return \" \".join(html.unescape(text).split())\n\ndef clean_location(raw: str) -> str:\n    text = clean(raw)\n    return re.sub(r\"\\s*(TEL\\s*:?\\s*)?\\d{2,4}[.\\-]\\d{3,4}[.\\-]\\d{4}\", \"\", text).strip()\n\nevents = re.findall(\n    r\"\u003Ctr>\\s*\u003Ctd>(\\d{4}\\.\\d{2}\\.\\d{2})\u003C\u002Ftd>\\s*\"\n    r\"\u003Ctd>(\\d{2}:\\d{2})\u003C\u002Ftd>\\s*\"\n    r\"\u003Ctd>(.*?)\u003C\u002Ftd>\\s*\"\n    r\"\u003Ctd>\\s*\u003Cspan class=\\\"evtnm\\\">(.*?)\u003C\u002Fspan>(.*?)\u003C\u002Ftd>\\s*\u003C\u002Ftr>\",\n    page,\n    re.S,\n)\n\nnormalized_events = [\n    {\n        \"timestamp\": f\"{day} {time_}\",\n        \"location\": clean_location(location),\n        \"status\": clean(status),\n    }\n    for day, time_, location, status, _detail in events\n]\n\nlatest_event = normalized_events[-1] if normalized_events else None\n\nprint(json.dumps({\n    \"carrier\": \"epost\",\n    \"invoice\": clean(summary.group(\"tracking\")),\n    \"status\": clean(summary.group(\"result\")),\n    \"timestamp\": latest_event[\"timestamp\"] if latest_event else None,\n    \"location\": latest_event[\"location\"] if latest_event else None,\n    \"event_count\": len(normalized_events),\n    \"recent_events\": normalized_events[-min(3, len(normalized_events)):],\n}, ensure_ascii=False, indent=2))\nPY\nrm -f \"$tmp_html\"\n```\n\n#### 우체국 공개 출력 예시\n\n아래 값은 2026-03-27 기준 live smoke test(`1234567890123`)에서 확인한 정규화 결과다.\n\n```json\n{\n  \"carrier\": \"epost\",\n  \"invoice\": \"1234567890123\",\n  \"status\": \"배달완료\",\n  \"timestamp\": \"2025.12.04 15:13\",\n  \"location\": \"제주우편집중국\",\n  \"event_count\": 2,\n  \"recent_events\": [\n    {\n      \"timestamp\": \"2025.12.04 15:13\",\n      \"location\": \"제주우편집중국\",\n      \"status\": \"배달준비\"\n    },\n    {\n      \"timestamp\": \"2025.12.04 15:13\",\n      \"location\": \"제주우편집중국\",\n      \"status\": \"배달완료\"\n    }\n  ]\n}\n```\n\n우체국 기본정보 테이블은 `등기번호`, `보내는 분\u002F접수일자`, `받는 분`, `수령인\u002F배달일자`, `취급구분`, `배달결과` 순서를 사용하고, 상세 이벤트는 `processTable` 아래 `날짜 \u002F 시간 \u002F 발생국 \u002F 처리현황` 행을 읽으면 된다. published 예시는 CJ와 같은 공통 결과 스키마(`carrier`, `invoice`, `status`, `timestamp`, `location`, `event_count`, `recent_events`)에 맞춰 배송 상태에 필요한 값만 남기고, 이벤트 location에 섞일 수 있는 `TEL` 번호 조각도 제거한 뒤 수령인\u002F상세 메모 원문은 그대로 노출하지 않는다.\n\n### 3. Normalize for humans\n\n응답 원문을 그대로 붙이지 말고 아래 공통 결과 스키마로 요약한다.\n\n#### 공통 결과 스키마\n\n- `carrier`: 택배사 식별자 (`cj` 또는 `epost`)\n- `invoice`: 정규화된 송장번호\n- `status`: 현재 배송 상태\n- `timestamp`: 마지막 이벤트 시각\n- `location`: 마지막 이벤트 위치\n- `event_count`: 전체 이벤트 수\n- `recent_events`: 최근 최대 3개 이벤트 목록\n- `status_code`: 필요할 때만 남기는 원본 상태 코드 (현재는 CJ 예시에서만 사용)\n\n### 4. Retry and fallback policy\n\n- 자리수 오류면 바로 멈추고 올바른 형식을 다시 받는다.\n- CJ는 `_csrf` 재취득 후 한 번 더 시도한다.\n- 우체국은 `curl --retry 3 --retry-all-errors --retry-delay 1` 을 유지한다.\n- 다른 택배사로 우회하지 않는다.\n\n## Done when\n\n- 택배사와 송장번호가 올바르게 식별되어 있다\n- 현재 상태와 최근 이벤트가 정리되어 있다\n- 어느 official surface를 썼는지 설명할 수 있다\n- 다른 택배사 확장 시 어떤 carrier adapter 필드를 추가해야 하는지 남아 있다\n\n## Failure modes\n\n- CJ: `_csrf` 추출 실패 또는 `tracking-detail` 응답 스키마 변경\n- CJ: 송장번호 길이가 10자리 또는 12자리가 아님\n- 우체국: `sid1` 이 13자리가 아님\n- 우체국: HTML 마크업 변경으로 테이블 추출 규칙이 깨짐\n- 우체국: `curl` 없이 다른 client로 붙다가 timeout\u002Freset 발생\n\n## Notes\n\n- 조회형 스킬이다.\n- 기본 표면은 공식 carrier endpoint만 사용한다.\n- 다른 택배사 추가는 새 carrier adapter 1개를 같은 포맷으로 붙이는 방식으로 확장한다.\n",{"name":5,"license":15,"metadata":24,"description":7},{"phase":25,"locale":26,"category":27},"v1","ko-KR","logistics","main","8859218955d9504cd18b59e7892100718039d3b4","data\u002Fskills\u002Fnomadamas-k-skill\u002Fdelivery-tracking",1,"https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper","https:\u002F\u002Fgithub.com\u002Fom-scogo","SDE-1 @ Scogo ","2026-07-18 12:22:46",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add om-scogo\u002Fskillsh-scraper --skill delivery-tracking",{"tool":42,"command":43},"bunx","bunx skills add om-scogo\u002Fskillsh-scraper --skill delivery-tracking",{"tool":45,"command":46},"pnpm","pnpm dlx skills add om-scogo\u002Fskillsh-scraper --skill delivery-tracking","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fnomadamas-k-skill\u002Fdelivery-tracking\u002FSkill.md",true,[50],{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"metadata.json","REFERENCE","参考文档",438,"https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fnomadamas-k-skill\u002Fdelivery-tracking\u002Fmetadata.json",[57,64,69,76,81,88],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M7D6MC9FAAEV4CMNYX8W7JTG","arxiv-search","Search arXiv physics, math, and computer science preprints using natural language queries. Powered by Valyu semantic search.","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fyorkeccak-scientific-skills\u002Farxiv-search\u002Fskills\u002Farxiv-search\u002FSKILL.md",[],[],{"skillNo":65,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M7D6M85CKKN87TA98VCQV4H7","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fyorkeccak-scientific-skills\u002Farxiv-search\u002FSkill.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M7D4ZTCS4DR3CE4JY06X84T2","working-with-legacy-code","Safely change and test untested codebases using Feathers' \"Working Effectively with Legacy Code\". Use when the user mentions \"legacy code\", \"no tests\", \"untested codebase\", \"how do I test this\", \"seams\", \"characterization tests\", \"golden master\", \"sprout method\", \"afraid to change this code\", \"monster method\", \"dependency breaking\", or \"inherited a messy codebase\". Also trigger when changing code without tests safely, getting a class under test when constructors, statics, or singletons block it, adding features to tangled modules, or planning incremental test coverage for an old codebase. Covers the legacy-code change algorithm, seams, characterization tests, sprout\u002Fwrap, and dependency-breaking techniques. For refactoring code that already has tests, see refactoring-patterns. For day-to-day code quality, see clean-code.","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fworking-with-legacy-code\u002Fworking-with-legacy-code\u002FSKILL.md",[],[],{"skillNo":77,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M7D4ZHZKJD2RSNGAF63V14P4","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fworking-with-legacy-code\u002FSkill.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M7D4ZB4CJBFW5JE67CPH2QRV","web-typography","Select, pair, and implement typefaces for web projects. Use when the user mentions \"font pairing\", \"which typeface\", \"line height\", \"responsive typography\", \"web font loading\", \"type hierarchy\", \"variable fonts\", \"FOUT\u002FFOIT\", \"typographic scale\", or \"the text is hard to read\". Also trigger when choosing between system fonts and web fonts, optimizing font-loading performance, or designing readable long-form content. Covers readability evaluation, CSS implementation, and performance optimization. For overall UI design systems, see refactoring-ui. For dramatic typographic experiences, see top-design.","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fweb-typography\u002Fweb-typography\u002FSKILL.md",[],[],{"skillNo":89,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M7D4Z4MVYVY3NMJ18BNV6WNA","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fweb-typography\u002FSkill.md",[],[]]