Guide for creating Claude Code skills to document @rytass packages (guide for authoring package documentation skills). Use when creating new package documentation skills, writing SKILL.md files, or designing skill structure.
This skill documents the methodology for creating Claude Code skills that document @rytass/* packages.
When creating skills for package documentation, follow this structured approach:
Determine which packages to document:
packages/{category}-* # e.g., invoice-*, payments-*, storages-*
Questions to answer:
@rytass/invoice)For each package, identify:
| 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 |
Identify common operations:
Single Skill - For simple packages with limited scope
.claude/skills/{package-name}/
└── SKILL.md
Multi-File Skill - For complex packages (recommended for adapters)
.claude/skills/{package-name}/
├── SKILL.md # Overview, quick start, comparison
├── {PROVIDER-1}.md # Detailed reference
├── {PROVIDER-2}.md # Detailed reference
└── ...
Dual Skill - When separating user vs developer concerns
.claude/skills/{package}-adapters/ # User-facing
.claude/skills/{package}-development/ # Developer-facing
SKILL.md (Main File) - Keep under 500 lines
| 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 |
Reference Files - One per provider/component
| 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
Benefits:
---
name: package-name
description: Brief description with trigger words in English (中文觸發詞). Maximum 1024 characters.
---
Name Rules:
Description Best Practices:
English term (中文) for key concepts{What it does} ({中文說明}). Use when {use case 1}, {use case 2 (中文)}.
Covers {topic 1} ({中文}), {topic 2} ({中文}).
Example:
Taiwan e-invoice integration (台灣電子發票整合). Use when working with
ECPay (綠界), EZPay (藍新). Covers issuing invoices (開立發票),
voiding (作廢), allowances (折讓).
Overview Section:
# 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 Section:
## Installation
\`\`\`bash
npm install @rytass/package-name
\`\`\`
Quick Start Section:
## 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
});
\`\`\`
Method Documentation:
#### `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',
});
\`\`\`
Add Chinese keywords for Taiwan users:
| English | 中文 | |---------|------| | invoice | 發票、電子發票 | | issue | 開立 | | void | 作廢 | | allowance | 折讓 | | payment | 付款、支付 | | storage | 儲存、存儲 |
Always include a comparison table for multi-provider skills:
| Feature | Provider A | Provider B | Provider C |
|---------|:----------:|:----------:|:----------:|
| Feature 1 | Yes | Yes | No |
| Feature 2 | Yes | No | Yes |
Use :-----: for centered alignment with checkmarks.
Every reference file should end with a complete, runnable example:
## 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);
\`\`\`
Before finalizing a skill:
name is lowercase with hyphens onlydescription includes Chinese trigger wordsdescription is under 1024 charactersReference implementation from invoice-adapters and invoice-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
Key decisions made:
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer