taiwan-logistics-skill 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,108 @@
1
+ # CLAUDE.md
2
+
3
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+ ## Project Overview
6
+
7
+ Taiwan Invoice Skill is an AI-powered toolkit for Taiwan E-Invoice integration, providing API documentation, code examples, and scripts for major invoice platforms (ECPay, SmilePay, Amego). It works as a skill/workflow for AI coding assistants (Claude Code, Windsurf, Cursor, etc.).
8
+
9
+ ## Available Scripts
10
+
11
+ ```bash
12
+ # Test API connectivity
13
+ python3 taiwan-invoice/scripts/test_connection.py <platform>
14
+
15
+ # Validate invoice data
16
+ python3 taiwan-invoice/scripts/validate_invoice.py <json_file>
17
+
18
+ # Generate invoice code
19
+ python3 taiwan-invoice/scripts/generate_code.py <platform> <language>
20
+ ```
21
+
22
+ **Supported Platforms:** `ecpay`, `smilepay`, `amego`
23
+
24
+ ## Architecture
25
+
26
+ ```
27
+ taiwan-invoice/ # Source of Truth
28
+ ├── SKILL.md # Main skill documentation
29
+ ├── EXAMPLES.md # Code examples and patterns
30
+ ├── references/ # API documentation
31
+ │ ├── ecpay-api.md
32
+ │ ├── smilepay-api.md
33
+ │ └── amego-api.md
34
+ └── scripts/ # Utility scripts
35
+ ├── test_connection.py
36
+ ├── validate_invoice.py
37
+ └── generate_code.py
38
+
39
+ cli/ # CLI installer (taiwan-invoice-skill on npm)
40
+ ├── src/
41
+ │ ├── commands/init.ts # Install command with template generation
42
+ │ ├── utils/template.ts # Template rendering engine
43
+ │ ├── utils/github.ts # GitHub release downloads
44
+ │ └── utils/extract.ts # ZIP extraction utilities
45
+ └── assets/ # Bundled assets
46
+ ├── taiwan-invoice/ # Copy of taiwan-invoice/
47
+ └── templates/
48
+ ├── base/ # Base templates (skill-content.md)
49
+ └── platforms/ # Platform configs (14 platforms)
50
+
51
+ .claude/skills/taiwan-invoice/ # Claude Code skill (generated by CLI)
52
+ ```
53
+
54
+ ## Sync Rules
55
+
56
+ **Source of Truth:** `taiwan-invoice/`
57
+
58
+ When modifying files:
59
+
60
+ 1. **Skill Content** - Edit in `taiwan-invoice/`:
61
+ - `SKILL.md` - Main documentation
62
+ - `EXAMPLES.md` - Code examples
63
+ - `references/*.md` - API documentation
64
+ - `scripts/*.py` - Utility scripts
65
+
66
+ 2. **Templates** - Edit in `cli/assets/templates/`:
67
+ - `base/skill-content.md` - Common skill content
68
+ - `platforms/*.json` - Platform-specific configs (14 platforms)
69
+
70
+ 3. **CLI Assets** - Run sync before publishing:
71
+ ```bash
72
+ cp -r taiwan-invoice/* cli/assets/taiwan-invoice/
73
+ ```
74
+
75
+ 4. **Reference Folders** - No manual sync needed. The CLI generates these from templates during `taiwan-invoice init`.
76
+
77
+ ## Supported AI Platforms
78
+
79
+ | Platform | Folder | Install Type |
80
+ |-------------|-------------|--------------|
81
+ | Claude Code | `.claude` | full |
82
+ | Cursor | `.cursor` | full |
83
+ | Windsurf | `.windsurf` | full |
84
+ | Antigravity | `.agent` | full |
85
+ | Copilot | `.github` | full |
86
+ | Kiro | `.kiro` | full |
87
+ | Codex | `.codex` | full |
88
+ | Qoder | `.qoder` | full |
89
+ | Roo Code | `.roo` | full |
90
+ | Gemini | `.gemini` | full |
91
+ | Trae | `.trae` | full |
92
+ | OpenCode | `.opencode` | full |
93
+ | Continue | `.continue` | full |
94
+ | CodeBuddy | `.codebuddy`| full |
95
+
96
+ ## Prerequisites
97
+
98
+ - Node.js 18+ (for CLI)
99
+ - Python 3.x (for scripts, no external dependencies)
100
+
101
+ ## Git Workflow
102
+
103
+ Never push directly to `main`. Always:
104
+
105
+ 1. Create a new branch: `git checkout -b feat/...` or `fix/...`
106
+ 2. Commit changes
107
+ 3. Push branch: `git push -u origin <branch>`
108
+ 4. Create PR: `gh pr create`
@@ -1,33 +1,186 @@
1
- # Taiwan Logistics Integration Toolkit
2
-
3
- **Professional logistics integration solution for Taiwan market**
4
-
5
- Supporting ECPay (綠界物流), NewebPay (藍新物流), and PAYUNi (統一物流) with comprehensive API documentation, intelligent tools, and **production-ready Python/TypeScript examples**.
6
-
7
- ---
8
-
9
- ## Overview
10
-
11
- This toolkit provides enterprise-grade integration capabilities for Taiwan's major logistics providers, featuring:
12
-
13
- - **Complete API Documentation**: Detailed specifications for all three providers
14
- - **Production-Ready Python Examples**: 4 complete implementations following strict coding standards
15
- - **Intelligent Search Engine**: BM25-powered search across 5 domains
16
- - **Data-Driven Architecture**: 5 CSV datasets for easy maintenance and updates
17
- - **Multi-Platform Support**: Compatible with 14 AI coding assistants
18
-
19
- ---
20
-
21
- ## Supported Logistics Providers
22
-
23
- | Provider | Encryption | API Style | Supported Services | Python Example | Status |
24
- |----------|-----------|-----------|-------------------|----------------|--------|
25
- | **ECPay (綠界物流)** | MD5 CheckMacValue | Form POST | 7-11, FamilyMart, Hi-Life, OK, T-Cat, Pelican | [EXAMPLES.md](EXAMPLES.md#ecpay-cvs-python) | Full Support |
26
- | **NewebPay (藍新物流)** | AES-256-CBC + SHA256 | Form POST + AES | 7-11, FamilyMart, Hi-Life, OK, T-Cat | [newebpay-logistics-cvs-example.py](examples/newebpay-logistics-cvs-example.py) | Full Support |
27
- | **PAYUNi (統一物流)** | AES-256-GCM + SHA256 | RESTful JSON | 7-11, T-Cat (normal, frozen, refrigerated) | [payuni-logistics-cvs-example.py](examples/payuni-logistics-cvs-example.py) | Full Support |
28
-
29
- ---
30
-
31
- All Python examples follow strict coding standards (taiwan-invoice quality level)
32
- 3 廠商完整支援 (ECPay + NewebPay + PAYUNi)
33
- 包含 CVS 超商物流 + 宅配物流 + 溫控物流
1
+ <h1 align="center">taiwan-logistics-skill</h1>
2
+
3
+ <p align="center">台灣物流 AI 開發技能包 - 支援綠界 ECPay、藍新 NewebPay、統一 PAYUNi</p>
4
+
5
+ <p align="center">
6
+ <a href="https://www.npmjs.com/package/taiwan-logistics-skill"><img src="https://img.shields.io/npm/v/taiwan-logistics-skill.svg" alt="npm version" /></a>
7
+ <a href="https://www.npmjs.com/package/taiwan-logistics-skill"><img src="https://img.shields.io/npm/dm/taiwan-logistics-skill.svg" alt="npm downloads" /></a>
8
+ <a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen.svg" alt="node version" /></a>
9
+ <a href="#支援平台"><img src="https://img.shields.io/badge/platforms-14-blue.svg" alt="platforms" /></a>
10
+ <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT" /></a>
11
+ </p>
12
+
13
+ ---
14
+
15
+ ## 安裝
16
+
17
+ ```bash
18
+ npm install -g taiwan-logistics-skill
19
+ ```
20
+
21
+ ---
22
+
23
+ ## 使用方式
24
+
25
+ ### 基本安裝
26
+
27
+ ```bash
28
+ # 自動偵測 AI 助手
29
+ taiwan-logistics init
30
+
31
+ # 指定 AI 助手類型
32
+ taiwan-logistics init --ai claude
33
+ taiwan-logistics init --ai cursor
34
+ taiwan-logistics init --ai windsurf
35
+ ```
36
+
37
+ <details>
38
+ <summary><b>完整平台列表</b></summary>
39
+
40
+ ```bash
41
+ # 主流平台
42
+ taiwan-logistics init --ai claude # Claude Code
43
+ taiwan-logistics init --ai cursor # Cursor
44
+ taiwan-logistics init --ai windsurf # Windsurf (Codeium)
45
+ taiwan-logistics init --ai copilot # GitHub Copilot
46
+ taiwan-logistics init --ai antigravity # Google Antigravity
47
+
48
+ # 其他支援平台
49
+ taiwan-logistics init --ai kiro # AWS Kiro
50
+ taiwan-logistics init --ai codex # OpenAI Codex
51
+ taiwan-logistics init --ai qoder # Qodo
52
+ taiwan-logistics init --ai roocode # Roo Code
53
+ taiwan-logistics init --ai gemini # Google Gemini CLI
54
+ taiwan-logistics init --ai trae # ByteDance Trae
55
+ taiwan-logistics init --ai opencode # OpenCode
56
+ taiwan-logistics init --ai continue # Continue.dev
57
+ taiwan-logistics init --ai codebuddy # Tencent CodeBuddy
58
+
59
+ # 安裝到所有平台
60
+ taiwan-logistics init --ai all
61
+ ```
62
+
63
+ </details>
64
+
65
+ ---
66
+
67
+ ## 其他指令
68
+
69
+ ```bash
70
+ # 列出支援的平台
71
+ taiwan-logistics list
72
+
73
+ # 顯示技能資訊
74
+ taiwan-logistics info
75
+
76
+ # 列出可用版本
77
+ taiwan-logistics versions
78
+
79
+ # 檢查更新
80
+ taiwan-logistics update
81
+ ```
82
+
83
+ ### 選項
84
+
85
+ - `--ai <type>` - 指定 AI 助手類型
86
+ - `--force` - 強制覆蓋現有檔案
87
+ - `--global` - 安裝到使用者全域目錄 (`~/.claude`, `~/.cursor` 等)
88
+
89
+ ---
90
+
91
+ ## 全域安裝
92
+
93
+ 安裝到使用者目錄,所有專案共用:
94
+
95
+ ```bash
96
+ taiwan-logistics init --ai claude --global
97
+ ```
98
+
99
+ 全域技能路徑:
100
+ - Claude Code: `~/.claude/skills/taiwan-logistics/`
101
+ - Cursor: `~/.cursor/skills/taiwan-logistics/`
102
+ - Windsurf: 不支援全域安裝
103
+
104
+ ---
105
+
106
+ ## 支援平台
107
+
108
+ | 平台 | 資料夾 | 啟動方式 |
109
+ |-----|-------|---------|
110
+ | **Claude Code** | `.claude` | `claude` 或瀏覽器開啟 [claude.ai/code](https://claude.ai/code) |
111
+ | **Cursor** | `.cursor` | `cursor` |
112
+ | **Windsurf** | `.windsurf` | `windsurf` |
113
+ | **GitHub Copilot** | `.github` | VS Code 擴充功能 |
114
+ | **Antigravity** | `.agent` | Google AI Studio |
115
+ | **Kiro** | `.kiro` | AWS Kiro CLI |
116
+ | **Codex** | `.codex` | OpenAI Codex |
117
+ | **Qoder** | `.qoder` | Qodo CLI |
118
+ | **Roo Code** | `.roo` | Roo Code Editor |
119
+ | **Gemini CLI** | `.gemini` | Google Gemini CLI |
120
+ | **Trae** | `.trae` | ByteDance Trae |
121
+ | **OpenCode** | `.opencode` | OpenCode Editor |
122
+ | **Continue** | `.continue` | Continue.dev VS Code 擴充功能 |
123
+ | **CodeBuddy** | `.codebuddy` | Tencent CodeBuddy |
124
+
125
+ ---
126
+
127
+ ## 物流服務商
128
+
129
+ | 服務商 | 加密方式 | API 風格 | 特色 |
130
+ |--------|---------|---------|------|
131
+ | **綠界 ECPay** | SHA256 | Form POST | 市佔率最高,穩定性佳,完整文檔 |
132
+ | **藍新 NewebPay** | AES-256-CBC + SHA256 | Form POST + AES | 支援多種物流方式 |
133
+ | **統一 PAYUNi** | AES-256-GCM + SHA256 | RESTful JSON | 統一集團,RESTful 設計 |
134
+
135
+ ---
136
+
137
+ ## 功能特色
138
+
139
+ - ✅ **完整 API 文檔** - ECPay、NewebPay、PAYUNi 詳細規格
140
+ - ✅ **代碼範例** - TypeScript/Python 完整可執行範例
141
+ - ✅ **加密實作指南** - SHA256、AES-256-CBC、AES-256-GCM
142
+ - ✅ **14 個 AI 平台** - 支援主流 AI 編程助手
143
+
144
+ ---
145
+
146
+ ## 物流方式支援
147
+
148
+ ### 宅配
149
+ - 宅配到府、宅配貨到付款
150
+
151
+ ### 超商取貨
152
+ - 7-ELEVEN 取貨、全家取貨、OK超商取貨、萊爾富取貨
153
+ - 超商取貨付款
154
+
155
+ ### 其他
156
+ - 冷鏈宅配、國際物流
157
+
158
+ ---
159
+
160
+ ## 開發要求
161
+
162
+ - **Node.js** >= 18.0.0 (CLI 工具)
163
+ - **Python** >= 3.x (智能腳本,無外部依賴)
164
+
165
+ ---
166
+
167
+ ## 授權
168
+
169
+ 本專案採用 [MIT License](https://opensource.org/licenses/MIT) 授權。
170
+
171
+ ---
172
+
173
+ ## 作者
174
+
175
+ 由 [Moksa](https://github.com/Moksa1123) 開發維護。
176
+
177
+ ---
178
+
179
+ ## 相關專案
180
+
181
+ - [taiwan-invoice-skill](https://github.com/Moksa1123/taiwan-invoice) - 台灣電子發票整合
182
+ - [taiwan-payment-skill](https://github.com/Moksa1123/taiwan-payment) - 台灣金流整合
183
+
184
+ ---
185
+
186
+ <p align="center">Made with ❤️ for Taiwan developers</p>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taiwan-logistics-skill",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "CLI to install Taiwan Logistics skill for AI coding assistants",
5
5
  "bin": {
6
6
  "taiwan-logistics": "./dist/index.js"