From egnis-cafe24
Cafe24 Admin API 매출통계 5종(dailysales, monthlysales, hourlysales, productsales, salesvolume) 원본 데이터를 적재한다. egnis-mcp에서 cafe24_get_access_token으로 토큰을 발급받아 Python 스크립트가 cafe24api.com을 직접 호출하여 PG/시간/상품/품목 기준 통계를 CSV 5종으로 저장하고, 5탭 HTML 대시보드(reports/cafe24/<brand>/<period>/dashboard.html)를 생성한다. 기존 cafe24-sales-dashboard와 역할 분리 — sales-dashboard는 일자별 시각화 중심, 이 스킬은 드릴다운용 원본 CSV 적재 중심. "/cafe24-salesreport-export"를 호출하거나 --brand --period 옵션을 줄 때 동작한다.
How this skill is triggered — by the user, by Claude, or both
Slash command
/egnis-cafe24:cafe24-salesreport-exportThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
> **신규 스킬 작성 가이드 (ADR-003 §2):** 본 스킬은 반드시 `scripts/lib/dashboard_template.py`의
신규 스킬 작성 가이드 (ADR-003 §2): 본 스킬은 반드시
scripts/lib/dashboard_template.py의 함수형 진입점render_dashboard(...)만 사용한다. 외부 HTML 템플릿 파일 추가 금지. 기존scripts/templates/sales_dashboard.html은 PR-B에서 흡수되므로 grandfathered.
cafe24-sales-dashboard: 일자별 매출 종합 분석 + 시각화 중심 (단일 통합 뷰, hourlysales + members/sales 합산)cafe24-salesreport-export: PG/시간/상품/품목 기준 원본 통계 데이터 적재 중심 (드릴다운용 CSV 5종)/cafe24-salesreport-export (옵션 없거나 --brand=<id|전체> --period=YYYY-MM-DD~YYYY-MM-DD)--brand 미지정: 전체 (9개 몰)--period 미지정: 최근 7일--dry-run: dailysales 1회만 호출1. Claude (skill) → cafe24_get_access_token(mall_id) for each mall ← MCP
2. Python (fetch_salesreport.py) → cafe24api.com 직접 호출 (5 endpoints)
3. Python (build_salesreport_dashboard.py) → CSV 5종 + 5탭 HTML
cafe24-orders-export와 동일 패턴. mcp__claude_ai_egnis-mcp__cafe24_get_access_token(mall_id=<...>) parallel 호출.
CAFE24_TOKENS_JSON='{...}' \
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/fetch_salesreport.py" \
--brand cloop \
--period-start 2026-05-01 --period-end 2026-05-31 \
--out-dir ./reports/cafe24/cloop/2026-05-01_to_2026-05-31/data/raw \
[--dry-run]
스크립트는 각 몰에 대해:
GET /admin/financials/dailysales (일별 매출, PG 정보 함께)GET /admin/financials/monthlysales (월별 매출)GET /admin/reports/hourlysales (시간대별 매출, device_type 미지원)GET /admin/reports/productsales (상품별 판매)GET /admin/reports/salesvolume (판매수량)라이트한 endpoint이므로 페이지네이션 영향 적음. 단 hourlysales는 limit=1000, productsales는 limit=1000 적용.
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/build_salesreport_dashboard.py" \
--raw-dir ./reports/cafe24/cloop/2026-05-01_to_2026-05-31/data/raw \
--out-dir ./reports/cafe24/cloop/2026-05-01_to_2026-05-31 \
--brand-label "클룹" \
--period-start 2026-05-01 --period-end 2026-05-31
산출:
data/dailysales.csvdata/monthlysales.csvdata/hourlysales.csvdata/productsales.csvdata/salesvolume.csvdashboard.html (5탭 = 5종 통계, brand 토글)✅ 매출통계 5종 적재 완료
📊 대시보드 (5탭): ./reports/cafe24/<brand>/<period>/dashboard.html
📁 CSV 5종: data/
401/403 → exit 2 → skill이 토큰 재발급 → 재실행. 이미 수집된 raw JSON은 재사용 (idempotent).
상세는 docs/salesreport_api_reference.md 참조.
| Endpoint | 출력 CSV |
|---|---|
GET /api/v2/admin/financials/dailysales | dailysales.csv |
GET /api/v2/admin/financials/monthlysales | monthlysales.csv |
GET /api/v2/admin/reports/hourlysales | hourlysales.csv |
GET /api/v2/admin/reports/productsales | productsales.csv |
GET /api/v2/admin/reports/salesvolume | salesvolume.csv |
SCOPE: mall.read_salesreport
./reports/cafe24/<brand_or_all>/<period>/
├── dashboard.html
├── data/
│ ├── dailysales.csv
│ ├── monthlysales.csv
│ ├── hourlysales.csv
│ ├── productsales.csv
│ ├── salesvolume.csv
│ └── raw/
└── api_reference.md
npx claudepluginhub egnis-it/claude-plugins --plugin egnis-cafe24Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.