taiwan-invoice-skill 2.6.3 → 2.7.0
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.
- package/README.md +150 -150
- package/assets/taiwan-invoice/CLAUDE.md +108 -108
- package/assets/taiwan-invoice/EXAMPLES.md +706 -633
- package/assets/taiwan-invoice/README.md +426 -426
- package/assets/taiwan-invoice/SKILL.md +513 -485
- package/assets/taiwan-invoice/data/error-codes.csv +22 -0
- package/assets/taiwan-invoice/data/field-mappings.csv +27 -27
- package/assets/taiwan-invoice/data/operations.csv +12 -11
- package/assets/taiwan-invoice/data/providers.csv +2 -0
- package/assets/taiwan-invoice/examples/ezpay-invoice-example.py +409 -0
- package/assets/taiwan-invoice/examples/paynow-invoice-example.py +330 -0
- package/assets/taiwan-invoice/references/AMEGO_API_REFERENCE.md +1115 -1115
- package/assets/taiwan-invoice/references/ECPAY_API_REFERENCE.md +647 -647
- package/assets/taiwan-invoice/references/EZPAY_API_REFERENCE.md +1084 -0
- package/assets/taiwan-invoice/references/PAYNOW_API_REFERENCE.md +645 -0
- package/assets/taiwan-invoice/references/SMILEPAY_API_REFERENCE.md +492 -492
- package/assets/templates/base/quick-reference.md +85 -85
- package/assets/templates/base/skill-content.md +508 -361
- package/assets/templates/platforms/agent.json +26 -26
- package/assets/templates/platforms/claude.json +26 -26
- package/assets/templates/platforms/codebuddy.json +25 -25
- package/assets/templates/platforms/codex.json +26 -26
- package/assets/templates/platforms/continue.json +25 -25
- package/assets/templates/platforms/copilot.json +25 -25
- package/assets/templates/platforms/cursor.json +26 -26
- package/assets/templates/platforms/gemini.json +25 -25
- package/assets/templates/platforms/kiro.json +25 -25
- package/assets/templates/platforms/opencode.json +25 -25
- package/assets/templates/platforms/qoder.json +25 -25
- package/assets/templates/platforms/roocode.json +25 -25
- package/assets/templates/platforms/trae.json +25 -25
- package/assets/templates/platforms/windsurf.json +25 -25
- package/dist/index.js +2 -2
- package/package.json +59 -59
- package/assets/taiwan-invoice/scripts/__pycache__/core.cpython-312.pyc +0 -0
- package/assets/taiwan-invoice/scripts/__pycache__/generate-invoice-service.cpython-312.pyc +0 -0
- package/assets/taiwan-invoice/scripts/__pycache__/persist.cpython-312.pyc +0 -0
- package/assets/taiwan-invoice/scripts/__pycache__/recommend.cpython-312.pyc +0 -0
- package/assets/taiwan-invoice/scripts/__pycache__/search.cpython-312.pyc +0 -0
- package/assets/taiwan-invoice/scripts/__pycache__/test-invoice-amounts.cpython-312.pyc +0 -0
package/README.md
CHANGED
|
@@ -1,150 +1,150 @@
|
|
|
1
|
-
<h1 align="center">taiwan-invoice-skill</h1>
|
|
2
|
-
|
|
3
|
-
<h3 align="center">台灣電子發票 AI 開發技能包</h3>
|
|
4
|
-
|
|
5
|
-
<p align="center">
|
|
6
|
-
<strong>支援 ECPay 綠界 · SmilePay 速買配 · Amego 光貿</strong>
|
|
7
|
-
</p>
|
|
8
|
-
|
|
9
|
-
<p align="center">
|
|
10
|
-
<a href="https://www.npmjs.com/package/taiwan-invoice-skill"><img src="https://img.shields.io/npm/v/taiwan-invoice-skill?style=flat-square&logo=npm" alt="npm version"></a>
|
|
11
|
-
<a href="https://www.npmjs.com/package/taiwan-invoice-skill"><img src="https://img.shields.io/npm/dm/taiwan-invoice-skill?style=flat-square&label=downloads" alt="npm downloads"></a>
|
|
12
|
-
<img src="https://img.shields.io/badge/node-%3E%3D18-339933?style=flat-square&logo=node.js&logoColor=white" alt="Node.js">
|
|
13
|
-
<img src="https://img.shields.io/badge/platforms-14-blue?style=flat-square" alt="14 Platforms">
|
|
14
|
-
<a href="https://github.com/Moksa1123/taiwan-ecommerce-toolkit/blob/main/LICENSE"><img src="https://img.shields.io/github/license/Moksa1123/taiwan-ecommerce-toolkit?style=flat-square" alt="License"></a>
|
|
15
|
-
</p>
|
|
16
|
-
|
|
17
|
-
<p align="center">
|
|
18
|
-
<a href="https://paypal.me/cccsubcom"><img src="https://img.shields.io/badge/PayPal-支持開發-00457C?style=for-the-badge&logo=paypal&logoColor=white" alt="PayPal"></a>
|
|
19
|
-
</p>
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## 安裝
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
npm install -g taiwan-invoice-skill
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
## 使用方式
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
# 進入專案目錄
|
|
35
|
-
cd /path/to/your/project
|
|
36
|
-
|
|
37
|
-
# 選擇你的 AI 助手
|
|
38
|
-
taiwan-invoice init --ai claude # Claude Code
|
|
39
|
-
taiwan-invoice init --ai cursor # Cursor
|
|
40
|
-
taiwan-invoice init --ai windsurf # Windsurf
|
|
41
|
-
taiwan-invoice init --ai copilot # GitHub Copilot
|
|
42
|
-
taiwan-invoice init --ai antigravity # Antigravity
|
|
43
|
-
taiwan-invoice init --ai all # 全部安裝
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
<details>
|
|
47
|
-
<summary>完整平台列表</summary>
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
taiwan-invoice init --ai kiro # Kiro (AWS)
|
|
51
|
-
taiwan-invoice init --ai codex # Codex CLI (OpenAI)
|
|
52
|
-
taiwan-invoice init --ai qoder # Qoder
|
|
53
|
-
taiwan-invoice init --ai roocode # Roo Code
|
|
54
|
-
taiwan-invoice init --ai gemini # Gemini CLI
|
|
55
|
-
taiwan-invoice init --ai trae # Trae (ByteDance)
|
|
56
|
-
taiwan-invoice init --ai opencode # OpenCode
|
|
57
|
-
taiwan-invoice init --ai continue # Continue
|
|
58
|
-
taiwan-invoice init --ai codebuddy # CodeBuddy (Tencent)
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
</details>
|
|
62
|
-
|
|
63
|
-
---
|
|
64
|
-
|
|
65
|
-
## 其他指令
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
taiwan-invoice list # 列出支援平台
|
|
69
|
-
taiwan-invoice info # 顯示技能資訊
|
|
70
|
-
taiwan-invoice versions # 列出可用版本
|
|
71
|
-
taiwan-invoice update # 檢查更新
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### 選項
|
|
75
|
-
|
|
76
|
-
```bash
|
|
77
|
-
taiwan-invoice init --force # 覆蓋現有檔案
|
|
78
|
-
taiwan-invoice init --global # 安裝到全域目錄(所有專案共用)
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
### 全域安裝
|
|
82
|
-
|
|
83
|
-
使用 `--global` 可將技能安裝到使用者目錄,讓所有專案都能使用:
|
|
84
|
-
|
|
85
|
-
```bash
|
|
86
|
-
taiwan-invoice init --ai cursor --global # ~/.cursor/skills/taiwan-invoice/
|
|
87
|
-
taiwan-invoice init --ai claude --global # ~/.claude/skills/taiwan-invoice/
|
|
88
|
-
taiwan-invoice init --ai antigravity --global # ~/.gemini/antigravity/global_skills/taiwan-invoice/
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
---
|
|
92
|
-
|
|
93
|
-
## 支援平台
|
|
94
|
-
|
|
95
|
-
| 平台 | 說明 | 啟動方式 |
|
|
96
|
-
|------|------|----------|
|
|
97
|
-
| **Claude Code** | Anthropic 官方 CLI | `/taiwan-invoice` |
|
|
98
|
-
| **Cursor** | AI 程式編輯器 | `/taiwan-invoice` |
|
|
99
|
-
| **Windsurf** | Codeium 編輯器 | 自動 |
|
|
100
|
-
| **Copilot** | GitHub Copilot | `/taiwan-invoice` |
|
|
101
|
-
| **Antigravity** | Google AI 助手 | `/taiwan-invoice` |
|
|
102
|
-
| **Kiro** | AWS AI 助手 | `/taiwan-invoice` |
|
|
103
|
-
| **Codex** | OpenAI CLI | 自動 |
|
|
104
|
-
| **Qoder** | Qodo AI 助手 | 自動 |
|
|
105
|
-
| **RooCode** | VSCode 擴充 | `/taiwan-invoice` |
|
|
106
|
-
| **Gemini CLI** | Google Gemini | 自動 |
|
|
107
|
-
| **Trae** | ByteDance AI | 自動 |
|
|
108
|
-
| **OpenCode** | 開源 AI 助手 | 自動 |
|
|
109
|
-
| **Continue** | 開源 AI 助手 | 自動 |
|
|
110
|
-
| **CodeBuddy** | Tencent AI | 自動 |
|
|
111
|
-
|
|
112
|
-
---
|
|
113
|
-
|
|
114
|
-
## 加值中心
|
|
115
|
-
|
|
116
|
-
| 加值中心 | 驗證方式 | 特點 |
|
|
117
|
-
|----------|----------|------|
|
|
118
|
-
| **ECPay 綠界** | AES-128-CBC 加密 | 市佔率高,文件完整 |
|
|
119
|
-
| **SmilePay 速買配** | URL 參數簽章 | 雙協定支援,整合簡單 |
|
|
120
|
-
| **Amego 光貿** | MD5 簽章 (MIG 4.0) | API 設計乾淨 |
|
|
121
|
-
|
|
122
|
-
---
|
|
123
|
-
|
|
124
|
-
## 智能工具
|
|
125
|
-
|
|
126
|
-
安裝後包含以下 Python 工具(純 Python,無需外部依賴):
|
|
127
|
-
|
|
128
|
-
```bash
|
|
129
|
-
# BM25 搜索引擎 - 搜索錯誤碼、欄位映射、稅務規則
|
|
130
|
-
python scripts/search.py "10000016" --domain error
|
|
131
|
-
|
|
132
|
-
# 加值中心推薦系統 - 根據需求推薦服務商
|
|
133
|
-
python scripts/recommend.py "電商 高交易量 穩定"
|
|
134
|
-
|
|
135
|
-
# 代碼生成器 - 生成 TypeScript/Python 服務模組
|
|
136
|
-
python scripts/generate-invoice-service.py ECPay --output ts
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
---
|
|
140
|
-
|
|
141
|
-
## 授權
|
|
142
|
-
|
|
143
|
-
[MIT License](https://github.com/Moksa1123/taiwan-ecommerce-toolkit/blob/main/LICENSE)
|
|
144
|
-
|
|
145
|
-
---
|
|
146
|
-
|
|
147
|
-
<p align="center">
|
|
148
|
-
<sub>Made by <strong>Moksa</strong></sub><br>
|
|
149
|
-
<sub>service@moksaweb.com</sub>
|
|
150
|
-
</p>
|
|
1
|
+
<h1 align="center">taiwan-invoice-skill</h1>
|
|
2
|
+
|
|
3
|
+
<h3 align="center">台灣電子發票 AI 開發技能包</h3>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<strong>支援 ECPay 綠界 · SmilePay 速買配 · Amego 光貿</strong>
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
<a href="https://www.npmjs.com/package/taiwan-invoice-skill"><img src="https://img.shields.io/npm/v/taiwan-invoice-skill?style=flat-square&logo=npm" alt="npm version"></a>
|
|
11
|
+
<a href="https://www.npmjs.com/package/taiwan-invoice-skill"><img src="https://img.shields.io/npm/dm/taiwan-invoice-skill?style=flat-square&label=downloads" alt="npm downloads"></a>
|
|
12
|
+
<img src="https://img.shields.io/badge/node-%3E%3D18-339933?style=flat-square&logo=node.js&logoColor=white" alt="Node.js">
|
|
13
|
+
<img src="https://img.shields.io/badge/platforms-14-blue?style=flat-square" alt="14 Platforms">
|
|
14
|
+
<a href="https://github.com/Moksa1123/taiwan-ecommerce-toolkit/blob/main/LICENSE"><img src="https://img.shields.io/github/license/Moksa1123/taiwan-ecommerce-toolkit?style=flat-square" alt="License"></a>
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
<p align="center">
|
|
18
|
+
<a href="https://paypal.me/cccsubcom"><img src="https://img.shields.io/badge/PayPal-支持開發-00457C?style=for-the-badge&logo=paypal&logoColor=white" alt="PayPal"></a>
|
|
19
|
+
</p>
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 安裝
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm install -g taiwan-invoice-skill
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## 使用方式
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# 進入專案目錄
|
|
35
|
+
cd /path/to/your/project
|
|
36
|
+
|
|
37
|
+
# 選擇你的 AI 助手
|
|
38
|
+
taiwan-invoice init --ai claude # Claude Code
|
|
39
|
+
taiwan-invoice init --ai cursor # Cursor
|
|
40
|
+
taiwan-invoice init --ai windsurf # Windsurf
|
|
41
|
+
taiwan-invoice init --ai copilot # GitHub Copilot
|
|
42
|
+
taiwan-invoice init --ai antigravity # Antigravity
|
|
43
|
+
taiwan-invoice init --ai all # 全部安裝
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
<details>
|
|
47
|
+
<summary>完整平台列表</summary>
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
taiwan-invoice init --ai kiro # Kiro (AWS)
|
|
51
|
+
taiwan-invoice init --ai codex # Codex CLI (OpenAI)
|
|
52
|
+
taiwan-invoice init --ai qoder # Qoder
|
|
53
|
+
taiwan-invoice init --ai roocode # Roo Code
|
|
54
|
+
taiwan-invoice init --ai gemini # Gemini CLI
|
|
55
|
+
taiwan-invoice init --ai trae # Trae (ByteDance)
|
|
56
|
+
taiwan-invoice init --ai opencode # OpenCode
|
|
57
|
+
taiwan-invoice init --ai continue # Continue
|
|
58
|
+
taiwan-invoice init --ai codebuddy # CodeBuddy (Tencent)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
</details>
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## 其他指令
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
taiwan-invoice list # 列出支援平台
|
|
69
|
+
taiwan-invoice info # 顯示技能資訊
|
|
70
|
+
taiwan-invoice versions # 列出可用版本
|
|
71
|
+
taiwan-invoice update # 檢查更新
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### 選項
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
taiwan-invoice init --force # 覆蓋現有檔案
|
|
78
|
+
taiwan-invoice init --global # 安裝到全域目錄(所有專案共用)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### 全域安裝
|
|
82
|
+
|
|
83
|
+
使用 `--global` 可將技能安裝到使用者目錄,讓所有專案都能使用:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
taiwan-invoice init --ai cursor --global # ~/.cursor/skills/taiwan-invoice/
|
|
87
|
+
taiwan-invoice init --ai claude --global # ~/.claude/skills/taiwan-invoice/
|
|
88
|
+
taiwan-invoice init --ai antigravity --global # ~/.gemini/antigravity/global_skills/taiwan-invoice/
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## 支援平台
|
|
94
|
+
|
|
95
|
+
| 平台 | 說明 | 啟動方式 |
|
|
96
|
+
|------|------|----------|
|
|
97
|
+
| **Claude Code** | Anthropic 官方 CLI | `/taiwan-invoice` |
|
|
98
|
+
| **Cursor** | AI 程式編輯器 | `/taiwan-invoice` |
|
|
99
|
+
| **Windsurf** | Codeium 編輯器 | 自動 |
|
|
100
|
+
| **Copilot** | GitHub Copilot | `/taiwan-invoice` |
|
|
101
|
+
| **Antigravity** | Google AI 助手 | `/taiwan-invoice` |
|
|
102
|
+
| **Kiro** | AWS AI 助手 | `/taiwan-invoice` |
|
|
103
|
+
| **Codex** | OpenAI CLI | 自動 |
|
|
104
|
+
| **Qoder** | Qodo AI 助手 | 自動 |
|
|
105
|
+
| **RooCode** | VSCode 擴充 | `/taiwan-invoice` |
|
|
106
|
+
| **Gemini CLI** | Google Gemini | 自動 |
|
|
107
|
+
| **Trae** | ByteDance AI | 自動 |
|
|
108
|
+
| **OpenCode** | 開源 AI 助手 | 自動 |
|
|
109
|
+
| **Continue** | 開源 AI 助手 | 自動 |
|
|
110
|
+
| **CodeBuddy** | Tencent AI | 自動 |
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## 加值中心
|
|
115
|
+
|
|
116
|
+
| 加值中心 | 驗證方式 | 特點 |
|
|
117
|
+
|----------|----------|------|
|
|
118
|
+
| **ECPay 綠界** | AES-128-CBC 加密 | 市佔率高,文件完整 |
|
|
119
|
+
| **SmilePay 速買配** | URL 參數簽章 | 雙協定支援,整合簡單 |
|
|
120
|
+
| **Amego 光貿** | MD5 簽章 (MIG 4.0) | API 設計乾淨 |
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## 智能工具
|
|
125
|
+
|
|
126
|
+
安裝後包含以下 Python 工具(純 Python,無需外部依賴):
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
# BM25 搜索引擎 - 搜索錯誤碼、欄位映射、稅務規則
|
|
130
|
+
python scripts/search.py "10000016" --domain error
|
|
131
|
+
|
|
132
|
+
# 加值中心推薦系統 - 根據需求推薦服務商
|
|
133
|
+
python scripts/recommend.py "電商 高交易量 穩定"
|
|
134
|
+
|
|
135
|
+
# 代碼生成器 - 生成 TypeScript/Python 服務模組
|
|
136
|
+
python scripts/generate-invoice-service.py ECPay --output ts
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## 授權
|
|
142
|
+
|
|
143
|
+
[MIT License](https://github.com/Moksa1123/taiwan-ecommerce-toolkit/blob/main/LICENSE)
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
<p align="center">
|
|
148
|
+
<sub>Made by <strong>Moksa</strong></sub><br>
|
|
149
|
+
<sub>service@moksaweb.com</sub>
|
|
150
|
+
</p>
|
|
@@ -1,108 +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
|
+
# 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`
|