Loading...
Loading...
Guide for creating Claude Code skills to document @rytass packages (建立套件文件 skill 指南). Use when creating new package documentation skills, writing SKILL.md files, or designing skill structure.
npx skill4agent add rytass/utils skill-authoring@rytass/*packages/{category}-* # e.g., invoice-*, payments-*, storages-*@rytass/invoice| Category | What to Document |
|---|---|
| Classes | Gateway, Entity, Allowance classes |
| Interfaces | Core interfaces and their properties |
| Enums | All enum values with descriptions |
| Types | Type aliases and union types |
| Functions | Utility functions with signatures |
| Constants | Exported constants and helpers |
.claude/skills/{package-name}/
└── SKILL.md.claude/skills/{package-name}/
├── SKILL.md # Overview, quick start, comparison
├── {PROVIDER-1}.md # Detailed reference
├── {PROVIDER-2}.md # Detailed reference
└── ....claude/skills/{package}-adapters/ # User-facing
.claude/skills/{package}-development/ # Developer-facing| Section | Purpose |
|---|---|
| Overview | What the packages do, unified interface |
| Installation | npm install commands |
| Quick Start | Minimal working examples |
| Feature Comparison | Table comparing providers |
| Detailed Docs Links | Links to reference files |
| Section | Purpose |
|---|---|
| Constructor | Parameters and initialization |
| Methods | All public methods with signatures |
| Classes | Entity and value object classes |
| Types | Provider-specific type definitions |
| Complete Example | Full working code sample |
SKILL.md (loaded first)
│
├── Quick overview (always visible)
├── Common operations
└── Links to details
│
└── PROVIDER.md (loaded on demand)
│
└── Full API reference---
name: package-name
description: Brief description with trigger words in English (中文觸發詞). Maximum 1024 characters.
---English term (中文){What it does} ({中文說明}). Use when {use case 1}, {use case 2 (中文)}.
Covers {topic 1} ({中文}), {topic 2} ({中文}).Taiwan e-invoice integration (台灣電子發票整合). Use when working with
ECPay (綠界), EZPay (藍新). Covers issuing invoices (開立發票),
voiding (作廢), allowances (折讓).# Package Name
Brief description of the package family.
## Overview
| Package | Provider | Description |
|---------|----------|-------------|
| `@rytass/pkg-adapter-a` | Provider A (中文名) | Brief desc |
| `@rytass/pkg-adapter-b` | Provider B (中文名) | Brief desc |## Installation
\`\`\`bash
npm install @rytass/package-name
\`\`\`## Quick Start
### Provider A
\`\`\`typescript
import { ProviderAGateway } from '@rytass/pkg-adapter-a';
const gateway = new ProviderAGateway({
// configuration
});
// Basic operation
const result = await gateway.operation({
// parameters
});
\`\`\`#### `methodName(options: OptionsType): Promise<ReturnType>`
Brief description.
**Parameters:**
| Option | Type | Required | Description |
|--------|------|----------|-------------|
| `param1` | `string` | Yes | Description |
| `param2` | `number` | No | Description (default: value) |
**Returns:** `Promise<ReturnType>`
**Example:**
\`\`\`typescript
const result = await gateway.methodName({
param1: 'value',
});
\`\`\`| English | 中文 |
|---|---|
| invoice | 發票、電子發票 |
| issue | 開立 |
| void | 作廢 |
| allowance | 折讓 |
| payment | 付款、支付 |
| storage | 儲存、存儲 |
| Feature | Provider A | Provider B | Provider C |
|---------|:----------:|:----------:|:----------:|
| Feature 1 | Yes | Yes | No |
| Feature 2 | Yes | No | Yes |:-----:## Complete Example
\`\`\`typescript
import { Gateway, Type1, Type2 } from '@rytass/package';
async function main() {
// 1. Initialize
const gateway = new Gateway({ /* config */ });
// 2. Create
const entity = await gateway.create({ /* options */ });
// 3. Query
const found = await gateway.query({ /* options */ });
// 4. Update/Modify
const updated = await gateway.modify(entity, { /* options */ });
// 5. Delete/Void
await gateway.delete(entity);
}
main().catch(console.error);
\`\`\`namedescriptiondescriptioninvoice-adaptersinvoice-development.claude/skills/
├── invoice-adapters/ # User-facing skill
│ ├── SKILL.md # Overview, quick start, comparison
│ ├── ECPAY.md # ECPay full reference
│ ├── EZPAY.md # EZPay full reference
│ ├── BANK-PRO.md # BankPro full reference
│ └── AMEGO.md # Amego full reference
│
└── invoice-development/ # Developer-facing skill
├── SKILL.md # Base package overview
├── BASE-INTERFACES.md # Interface specifications
└── CREATE-ADAPTER.md # How to create new adapter