@unityclaw/skills 1.0.5 → 1.0.8
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 +63 -73
- package/dist/{chunk-VTGLNHDK.js → chunk-CVOSGIUI.js} +1 -1
- package/dist/cli.cjs +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/unityclaw-document-convert/SKILL.md +8 -4
- package/unityclaw-document-translation/SKILL.md +1 -1
- package/unityclaw-idp-business-extraction/SKILL.md +54 -0
- package/unityclaw-idp-contract-extraction/SKILL.md +54 -0
- package/unityclaw-idp-invoice-extraction/SKILL.md +56 -0
- package/unityclaw-idp-personal-documents/SKILL.md +60 -0
- package/unityclaw-image-generation/SKILL.md +49 -15
- package/unityclaw-media-analysis/SKILL.md +17 -18
- package/unityclaw-media-download-xhs/SKILL.md +40 -0
- package/unityclaw-media-stats/SKILL.md +40 -0
- package/unityclaw-media-user-info/SKILL.md +40 -0
- package/unityclaw-video-frame-extract/SKILL.md +41 -0
- package/unityclaw-video-generation-jimeng-doubao/SKILL.md +70 -0
- package/unityclaw-video-generation-kling/SKILL.md +2 -3
- package/unityclaw-video-generation-wan-minimax/SKILL.md +70 -0
- package/unityclaw-video-generation-other/SKILL.md +0 -324
- package/unityclaw-video-generation-sora/SKILL.md +0 -286
- package/unityclaw-video-generation-veo/SKILL.md +0 -275
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @unityclaw/skills
|
|
2
2
|
|
|
3
|
-
UnityClaw Skills
|
|
3
|
+
UnityClaw Skills for Claude Code and OpenClaw.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -14,20 +14,15 @@ npx @unityclaw/skills --help
|
|
|
14
14
|
|
|
15
15
|
## API Key Configuration
|
|
16
16
|
|
|
17
|
-
All skills require an API key
|
|
17
|
+
All skills require an API key:
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
|
-
# Install SDK globally
|
|
21
20
|
npm install -g @unityclaw/sdk
|
|
22
|
-
|
|
23
|
-
# Configure API key (stored in ~/.unityclaw/config.json)
|
|
24
21
|
unityclaw-sdk config set apiKey your-api-key
|
|
25
|
-
|
|
26
|
-
# Verify configuration
|
|
27
22
|
unityclaw-sdk config
|
|
28
23
|
```
|
|
29
24
|
|
|
30
|
-
Or
|
|
25
|
+
Or:
|
|
31
26
|
|
|
32
27
|
```bash
|
|
33
28
|
export UNITYCLAW_API_KEY=your-api-key
|
|
@@ -35,105 +30,100 @@ export UNITYCLAW_API_KEY=your-api-key
|
|
|
35
30
|
|
|
36
31
|
## CLI Commands
|
|
37
32
|
|
|
38
|
-
### Install Skills
|
|
39
|
-
|
|
40
|
-
Install skills to Claude Code or OpenClaw:
|
|
41
|
-
|
|
42
33
|
```bash
|
|
43
34
|
# Install all skills to Claude Code
|
|
44
35
|
npx @unityclaw/skills install
|
|
45
36
|
|
|
46
37
|
# Install specific skills
|
|
47
|
-
npx @unityclaw/skills install unityclaw-image-generation unityclaw-video-generation-
|
|
38
|
+
npx @unityclaw/skills install unityclaw-image-generation unityclaw-video-generation-kling
|
|
48
39
|
|
|
49
40
|
# Install to OpenClaw
|
|
50
41
|
npx @unityclaw/skills install --target openclaw
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
### List Available Skills
|
|
54
42
|
|
|
55
|
-
|
|
43
|
+
# List available skills
|
|
56
44
|
npx @unityclaw/skills list
|
|
57
|
-
```
|
|
58
45
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
Update SDK and skills to the latest version:
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
# Update local packages
|
|
46
|
+
# Update sdk + skills
|
|
65
47
|
npx @unityclaw/skills update
|
|
66
|
-
|
|
67
|
-
# Update global packages
|
|
68
|
-
npx @unityclaw/skills update --global
|
|
69
48
|
```
|
|
70
49
|
|
|
71
|
-
|
|
50
|
+
## Reorganized Skill List
|
|
72
51
|
|
|
73
|
-
|
|
52
|
+
This list is aligned with `~/moox/field-feishu` shortcuts and `server` `ParameterModel` definitions.
|
|
74
53
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
54
|
+
- Removed from skill list: `sora/*`, `veo/*`
|
|
55
|
+
- No version-level split for same model family (for example, no separate `jimeng-image-v3` skill)
|
|
56
|
+
- Document conversion is abstracted as one skill/API entry instead of many individual shortcut skills
|
|
78
57
|
|
|
79
|
-
|
|
80
|
-
npx @unityclaw/skills /unityclaw-media-analysis https://youtube.com/watch?v=...
|
|
81
|
-
```
|
|
58
|
+
### Image
|
|
82
59
|
|
|
83
|
-
|
|
60
|
+
- [unityclaw-image-generation](./unityclaw-image-generation/SKILL.md)
|
|
61
|
+
: Covers `gemini/image/v2` + `jimeng/image` (unified)
|
|
62
|
+
- [unityclaw-image-compress](./unityclaw-image-compress/SKILL.md)
|
|
63
|
+
: Covers `image/compress`
|
|
84
64
|
|
|
85
|
-
###
|
|
65
|
+
### Video
|
|
86
66
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
67
|
+
- [unityclaw-video-generation-kling](./unityclaw-video-generation-kling/SKILL.md)
|
|
68
|
+
: Covers `kling/video`
|
|
69
|
+
- [unityclaw-video-generation-jimeng-doubao](./unityclaw-video-generation-jimeng-doubao/SKILL.md)
|
|
70
|
+
: Covers `jimeng/video`, `doubao/video`
|
|
71
|
+
- [unityclaw-video-generation-wan-minimax](./unityclaw-video-generation-wan-minimax/SKILL.md)
|
|
72
|
+
: Covers `wan/video`, `minimax/video`
|
|
91
73
|
|
|
92
|
-
###
|
|
74
|
+
### Document
|
|
93
75
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
| [unityclaw-video-generation-kling](./unityclaw-video-generation-kling/SKILL.md) | Generate videos using Kling AI | 📹 |
|
|
99
|
-
| [unityclaw-video-generation-other](./unityclaw-video-generation-other/SKILL.md) | Generate videos using Doubao, Wan, MiniMax, JiMeng | 🎞️ |
|
|
76
|
+
- [unityclaw-document-translation](./unityclaw-document-translation/SKILL.md)
|
|
77
|
+
: Covers `doc/translate`
|
|
78
|
+
- [unityclaw-document-convert](./unityclaw-document-convert/SKILL.md)
|
|
79
|
+
: Covers generic `doc_convert/image` + `doc_convert/pdf`
|
|
100
80
|
|
|
101
|
-
###
|
|
81
|
+
### Media
|
|
102
82
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
83
|
+
- [unityclaw-media-analysis](./unityclaw-media-analysis/SKILL.md)
|
|
84
|
+
: Covers `media_analysis`
|
|
85
|
+
- [unityclaw-media-stats](./unityclaw-media-stats/SKILL.md)
|
|
86
|
+
: Covers `media_stats`
|
|
87
|
+
- [unityclaw-media-user-info](./unityclaw-media-user-info/SKILL.md)
|
|
88
|
+
: Covers `media_user_info`
|
|
89
|
+
- [unityclaw-media-download-xhs](./unityclaw-media-download-xhs/SKILL.md)
|
|
90
|
+
: Covers `xiaohongshu/download`
|
|
91
|
+
- [unityclaw-video-frame-extract](./unityclaw-video-frame-extract/SKILL.md)
|
|
92
|
+
: Covers `video/frame`
|
|
107
93
|
|
|
108
|
-
###
|
|
94
|
+
### IDP
|
|
109
95
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
96
|
+
- [unityclaw-idp-personal-documents](./unityclaw-idp-personal-documents/SKILL.md)
|
|
97
|
+
: Covers `idp/id_card`, `idp/vehicle_license`, `idp/bank_card`
|
|
98
|
+
- [unityclaw-idp-invoice-extraction](./unityclaw-idp-invoice-extraction/SKILL.md)
|
|
99
|
+
: Covers `idp/vat_invoice`, `idp/train_invoice`, `idp/taxi_invoice`
|
|
100
|
+
- [unityclaw-idp-business-extraction](./unityclaw-idp-business-extraction/SKILL.md)
|
|
101
|
+
: Covers `idp/business_license`, `idp/business_card`
|
|
102
|
+
- [unityclaw-idp-contract-extraction](./unityclaw-idp-contract-extraction/SKILL.md)
|
|
103
|
+
: Covers `idp/contract`
|
|
113
104
|
|
|
114
|
-
|
|
105
|
+
IDP is intentionally split by scenario (personal/invoice/business/contract), instead of one generic skill, to improve skill routing accuracy and parameter selection success.
|
|
115
106
|
|
|
116
|
-
|
|
117
|
-
import { listSkills, installSkills, executeSkill } from '@unityclaw/skills';
|
|
107
|
+
## Local File Input Support
|
|
118
108
|
|
|
119
|
-
|
|
120
|
-
const skills = await listSkills();
|
|
121
|
-
console.log(skills);
|
|
109
|
+
With latest SDK, skill examples can use local file paths directly:
|
|
122
110
|
|
|
123
|
-
|
|
124
|
-
|
|
111
|
+
```ts
|
|
112
|
+
attachment: [{ path: './files/input.pdf' }]
|
|
113
|
+
```
|
|
125
114
|
|
|
126
|
-
|
|
127
|
-
await installSkills('openclaw');
|
|
115
|
+
SDK will auto-upload the local file through `/api/upload` and replace it with a valid `tmp_url`.
|
|
128
116
|
|
|
129
|
-
|
|
130
|
-
await executeSkill('/unityclaw-image-generation A beautiful sunset');
|
|
131
|
-
```
|
|
117
|
+
## Parameter Normalization Notes
|
|
132
118
|
|
|
133
|
-
|
|
119
|
+
Only endpoints that **require** field-feishu structures are normalized.
|
|
134
120
|
|
|
135
|
-
- [
|
|
136
|
-
|
|
121
|
+
- Text array conversion (`string` -> `[{ type: 'text', text: '...' }]`) is applied only for:
|
|
122
|
+
`jimeng/image`, `jimeng/image/v3`, `sora/video`, `sora/video/stable`, `veo/video`, `jimeng/video`, `doubao/video`.
|
|
123
|
+
- Label conversion (`'16:9'` -> `{ value: '16:9', label: '16:9' }`) is applied only for endpoints whose `ParameterModel` expects `LabelFieldItem`.
|
|
124
|
+
- For `doubao/video`, duration should use numeric value in `LabelFieldItem.value` when provided (for example `{ value: 5, label: '5' }`).
|
|
125
|
+
- Endpoints that already support plain strings are kept as-is (no forced conversion).
|
|
126
|
+
- If you pass full field-feishu structures, SDK keeps them unchanged.
|
|
137
127
|
|
|
138
128
|
## License
|
|
139
129
|
|
|
@@ -108,7 +108,7 @@ function getClaudeSkillsDir() {
|
|
|
108
108
|
}
|
|
109
109
|
function getOpenClawSkillsDir() {
|
|
110
110
|
const homeDir = process.env.HOME || process.env.USERPROFILE || "";
|
|
111
|
-
return process.env.OPENCLAW_SKILLS_DIR || path.join(homeDir, ".openclaw", "skills");
|
|
111
|
+
return process.env.OPENCLAW_SKILLS_DIR || path.join(homeDir, ".openclaw", "workspace", "skills");
|
|
112
112
|
}
|
|
113
113
|
async function promptForApiKey() {
|
|
114
114
|
const rl = readline.createInterface({
|
package/dist/cli.cjs
CHANGED
|
@@ -138,7 +138,7 @@ function getClaudeSkillsDir() {
|
|
|
138
138
|
}
|
|
139
139
|
function getOpenClawSkillsDir() {
|
|
140
140
|
const homeDir = process.env.HOME || process.env.USERPROFILE || "";
|
|
141
|
-
return process.env.OPENCLAW_SKILLS_DIR || import_path.default.join(homeDir, ".openclaw", "skills");
|
|
141
|
+
return process.env.OPENCLAW_SKILLS_DIR || import_path.default.join(homeDir, ".openclaw", "workspace", "skills");
|
|
142
142
|
}
|
|
143
143
|
async function promptForApiKey() {
|
|
144
144
|
const rl = readline.createInterface({
|
package/dist/cli.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -149,7 +149,7 @@ function getClaudeSkillsDir() {
|
|
|
149
149
|
}
|
|
150
150
|
function getOpenClawSkillsDir() {
|
|
151
151
|
const homeDir = process.env.HOME || process.env.USERPROFILE || "";
|
|
152
|
-
return process.env.OPENCLAW_SKILLS_DIR || import_path.default.join(homeDir, ".openclaw", "skills");
|
|
152
|
+
return process.env.OPENCLAW_SKILLS_DIR || import_path.default.join(homeDir, ".openclaw", "workspace", "skills");
|
|
153
153
|
}
|
|
154
154
|
async function promptForApiKey() {
|
|
155
155
|
const rl = readline.createInterface({
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -22,6 +22,7 @@ metadata:
|
|
|
22
22
|
# UnityClaw Document Convert
|
|
23
23
|
|
|
24
24
|
Convert documents between various formats including PDF, Word, PowerPoint, Excel, and images.
|
|
25
|
+
Recommended API is unified `client.document.convertDocument(...)`.
|
|
25
26
|
|
|
26
27
|
## Installation
|
|
27
28
|
|
|
@@ -71,11 +72,13 @@ import { UnityClawClient } from '@unityclaw/sdk';
|
|
|
71
72
|
|
|
72
73
|
const client = new UnityClawClient();
|
|
73
74
|
|
|
74
|
-
// Convert PDF to Word
|
|
75
|
-
const result = await client.document.
|
|
75
|
+
// Convert PDF to Word (unified API)
|
|
76
|
+
const result = await client.document.convertDocument({
|
|
76
77
|
attachment: [
|
|
77
|
-
{
|
|
78
|
-
]
|
|
78
|
+
{ path: './files/document.pdf' }
|
|
79
|
+
],
|
|
80
|
+
input_format: 'pdf',
|
|
81
|
+
output_format: 'docx'
|
|
79
82
|
});
|
|
80
83
|
|
|
81
84
|
// ✅ Correct: Check result.success, access data via result.response.data
|
|
@@ -108,6 +111,7 @@ if (result.success && result.response?.data) {
|
|
|
108
111
|
|
|
109
112
|
| Method | Description |
|
|
110
113
|
|--------|-------------|
|
|
114
|
+
| `convertDocument()` | Recommended unified conversion API |
|
|
111
115
|
| `convert()` | Generic conversion with format specification |
|
|
112
116
|
|
|
113
117
|
## API Reference
|
|
@@ -73,7 +73,7 @@ const client = new UnityClawClient();
|
|
|
73
73
|
|
|
74
74
|
const result = await client.document.translate({
|
|
75
75
|
attachment: [
|
|
76
|
-
{
|
|
76
|
+
{ path: './files/document.pdf' }
|
|
77
77
|
],
|
|
78
78
|
source_language: { value: 'en', label: 'English' },
|
|
79
79
|
target_language: { value: 'zh', label: 'Chinese' }
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: unityclaw-idp-business-extraction
|
|
3
|
+
description: Extract fields from business documents (business license, business card)
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
metadata:
|
|
6
|
+
openclaw:
|
|
7
|
+
requires:
|
|
8
|
+
env:
|
|
9
|
+
- UNITYCLAW_API_KEY
|
|
10
|
+
bins:
|
|
11
|
+
- node
|
|
12
|
+
- npm
|
|
13
|
+
primaryEnv: UNITYCLAW_API_KEY
|
|
14
|
+
emoji: "🏢"
|
|
15
|
+
homepage: https://unityclaw.com
|
|
16
|
+
install:
|
|
17
|
+
- kind: node
|
|
18
|
+
package: "@unityclaw/sdk"
|
|
19
|
+
bins: []
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# UnityClaw IDP - Business Extraction
|
|
23
|
+
|
|
24
|
+
Use this skill for business document extraction:
|
|
25
|
+
- `business_license`
|
|
26
|
+
- `business_card`
|
|
27
|
+
|
|
28
|
+
## SDK APIs
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
await client.idp.businessLicense({ attachments: [{ path: './files/business-license.jpg' }] });
|
|
32
|
+
await client.idp.businessCard({ attachments: [{ path: './files/business-card.jpg' }] });
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Or generic API:
|
|
36
|
+
|
|
37
|
+
```typescript
|
|
38
|
+
await client.idp.extract('business_license', {
|
|
39
|
+
attachments: [{ path: './files/business-license.jpg' }]
|
|
40
|
+
});
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Input
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
{
|
|
47
|
+
attachments: AttachmentInput[]
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Notes
|
|
52
|
+
|
|
53
|
+
- This skill groups enterprise scenarios to avoid over-generic routing.
|
|
54
|
+
- Output fields vary between license and card extraction.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: unityclaw-idp-contract-extraction
|
|
3
|
+
description: Extract structured fields from contract files
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
metadata:
|
|
6
|
+
openclaw:
|
|
7
|
+
requires:
|
|
8
|
+
env:
|
|
9
|
+
- UNITYCLAW_API_KEY
|
|
10
|
+
bins:
|
|
11
|
+
- node
|
|
12
|
+
- npm
|
|
13
|
+
primaryEnv: UNITYCLAW_API_KEY
|
|
14
|
+
emoji: "📑"
|
|
15
|
+
homepage: https://unityclaw.com
|
|
16
|
+
install:
|
|
17
|
+
- kind: node
|
|
18
|
+
package: "@unityclaw/sdk"
|
|
19
|
+
bins: []
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# UnityClaw IDP - Contract Extraction
|
|
23
|
+
|
|
24
|
+
Use this skill for contract parsing:
|
|
25
|
+
- `contract`
|
|
26
|
+
|
|
27
|
+
## SDK APIs
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
await client.idp.contract({
|
|
31
|
+
attachments: [{ path: './files/contract.pdf' }]
|
|
32
|
+
});
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Or generic API:
|
|
36
|
+
|
|
37
|
+
```typescript
|
|
38
|
+
await client.idp.extract('contract', {
|
|
39
|
+
attachments: [{ path: './files/contract.pdf' }]
|
|
40
|
+
});
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Input
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
{
|
|
47
|
+
attachments: AttachmentInput[]
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Notes
|
|
52
|
+
|
|
53
|
+
- Preferred for long contract OCR + key field extraction scenarios.
|
|
54
|
+
- Read extracted data from `result.response.data`.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: unityclaw-idp-invoice-extraction
|
|
3
|
+
description: Extract fields from invoice and ticket documents (VAT, train, taxi)
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
metadata:
|
|
6
|
+
openclaw:
|
|
7
|
+
requires:
|
|
8
|
+
env:
|
|
9
|
+
- UNITYCLAW_API_KEY
|
|
10
|
+
bins:
|
|
11
|
+
- node
|
|
12
|
+
- npm
|
|
13
|
+
primaryEnv: UNITYCLAW_API_KEY
|
|
14
|
+
emoji: "🧾"
|
|
15
|
+
homepage: https://unityclaw.com
|
|
16
|
+
install:
|
|
17
|
+
- kind: node
|
|
18
|
+
package: "@unityclaw/sdk"
|
|
19
|
+
bins: []
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# UnityClaw IDP - Invoice Extraction
|
|
23
|
+
|
|
24
|
+
Use this skill for invoice/ticket extraction:
|
|
25
|
+
- `vat_invoice`
|
|
26
|
+
- `train_invoice`
|
|
27
|
+
- `taxi_invoice`
|
|
28
|
+
|
|
29
|
+
## SDK APIs
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
await client.idp.vatInvoice({ attachments: [{ path: './files/vat-invoice.pdf' }] });
|
|
33
|
+
await client.idp.trainInvoice({ attachments: [{ path: './files/train-ticket.jpg' }] });
|
|
34
|
+
await client.idp.taxiInvoice({ attachments: [{ path: './files/taxi-invoice.jpg' }] });
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Or generic API:
|
|
38
|
+
|
|
39
|
+
```typescript
|
|
40
|
+
await client.idp.extract('vat_invoice', {
|
|
41
|
+
attachments: [{ path: './files/vat-invoice.pdf' }]
|
|
42
|
+
});
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Input
|
|
46
|
+
|
|
47
|
+
```typescript
|
|
48
|
+
{
|
|
49
|
+
attachments: AttachmentInput[]
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Notes
|
|
54
|
+
|
|
55
|
+
- Files can be image/PDF according to each underlying IDP type.
|
|
56
|
+
- Output schema differs by type; parse from `result.response.data`.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: unityclaw-idp-personal-documents
|
|
3
|
+
description: Extract structured fields from personal identity documents (ID card, vehicle license, bank card)
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
metadata:
|
|
6
|
+
openclaw:
|
|
7
|
+
requires:
|
|
8
|
+
env:
|
|
9
|
+
- UNITYCLAW_API_KEY
|
|
10
|
+
bins:
|
|
11
|
+
- node
|
|
12
|
+
- npm
|
|
13
|
+
primaryEnv: UNITYCLAW_API_KEY
|
|
14
|
+
emoji: "🪪"
|
|
15
|
+
homepage: https://unityclaw.com
|
|
16
|
+
install:
|
|
17
|
+
- kind: node
|
|
18
|
+
package: "@unityclaw/sdk"
|
|
19
|
+
bins: []
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# UnityClaw IDP - Personal Documents
|
|
23
|
+
|
|
24
|
+
Use this skill for personal document extraction:
|
|
25
|
+
- `id_card`
|
|
26
|
+
- `vehicle_license`
|
|
27
|
+
- `bank_card`
|
|
28
|
+
|
|
29
|
+
## SDK APIs
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
await client.idp.idCard({ attachments: [{ path: './files/id-card.jpg' }] });
|
|
33
|
+
await client.idp.vehicleLicense({ attachments: [{ path: './files/vehicle-license.jpg' }] });
|
|
34
|
+
await client.idp.bankCard({ attachments: [{ path: './files/bank-card.jpg' }] });
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Or generic API:
|
|
38
|
+
|
|
39
|
+
```typescript
|
|
40
|
+
await client.idp.extract('id_card', {
|
|
41
|
+
attachments: [{ path: './files/id-card.jpg' }]
|
|
42
|
+
});
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Input
|
|
46
|
+
|
|
47
|
+
```typescript
|
|
48
|
+
{
|
|
49
|
+
attachments: AttachmentInput[]
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
`AttachmentInput` supports:
|
|
54
|
+
- `tmp_url`
|
|
55
|
+
- local path (`path` / `localPath` / `filePath`), SDK auto-uploads to `/api/upload`
|
|
56
|
+
|
|
57
|
+
## Notes
|
|
58
|
+
|
|
59
|
+
- This category is split from invoice/business/contract to improve skill routing success.
|
|
60
|
+
- Output fields vary by type; read from `result.response.data`.
|
|
@@ -22,6 +22,7 @@ metadata:
|
|
|
22
22
|
# UnityClaw Image Generation
|
|
23
23
|
|
|
24
24
|
Generate high-quality images using Gemini or JiMeng (Doubao) AI models.
|
|
25
|
+
This skill keeps JiMeng as one unified entry (no separate v3 skill).
|
|
25
26
|
|
|
26
27
|
## Installation
|
|
27
28
|
|
|
@@ -89,6 +90,12 @@ if (result.success && result.response?.data) {
|
|
|
89
90
|
}
|
|
90
91
|
```
|
|
91
92
|
|
|
93
|
+
You can pass local files directly and SDK will auto-upload them:
|
|
94
|
+
|
|
95
|
+
```typescript
|
|
96
|
+
attachment: [{ path: './files/reference.jpg' }]
|
|
97
|
+
```
|
|
98
|
+
|
|
92
99
|
## Available APIs
|
|
93
100
|
|
|
94
101
|
### Gemini Image Generation
|
|
@@ -117,30 +124,56 @@ const result = await client.image.geminiV2({
|
|
|
117
124
|
|
|
118
125
|
### JiMeng Image Generation
|
|
119
126
|
|
|
127
|
+
> **IMPORTANT:** JiMeng uses different parameters than Gemini. Pay attention to the `size` and `model_selector` values.
|
|
128
|
+
|
|
120
129
|
```typescript
|
|
121
|
-
// Basic usage
|
|
130
|
+
// Basic usage (defaults to Seedream 5.0 Lite model)
|
|
122
131
|
const result = await client.image.jimeng({
|
|
123
132
|
prompt: '一只可爱的猫咪在花园里玩耍',
|
|
124
|
-
size: { value: '
|
|
133
|
+
size: { value: '2048x2048', label: '2K 1:1' }
|
|
125
134
|
});
|
|
126
135
|
|
|
127
|
-
// With
|
|
136
|
+
// With Seedream 5.0 Lite (supports web_search, 2K and 3K resolutions)
|
|
128
137
|
const result = await client.image.jimeng({
|
|
129
138
|
prompt: 'A serene Japanese garden in autumn',
|
|
130
139
|
attachment: [{ tmp_url: 'https://...', name: 'style.jpg' }],
|
|
131
|
-
size: { value: '
|
|
132
|
-
model_selector: { value: '
|
|
133
|
-
web_search: { value: true, label: 'Enable' },
|
|
140
|
+
size: { value: '2048x2048', label: '2K 1:1' },
|
|
141
|
+
model_selector: { value: 'doubao-seedream-5-0-260128', label: 'Seedream 5.0 Lite' },
|
|
142
|
+
web_search: { value: 'true', label: 'Enable' },
|
|
134
143
|
image_count: { value: 4, label: '4 images' }
|
|
135
144
|
});
|
|
136
145
|
|
|
137
|
-
//
|
|
138
|
-
const result = await client.image.
|
|
146
|
+
// With Seedream 4.5 (supports 4K resolution, no web_search)
|
|
147
|
+
const result = await client.image.jimeng({
|
|
139
148
|
prompt: 'A mystical forest with glowing mushrooms',
|
|
140
|
-
size: { value: '
|
|
149
|
+
size: { value: '4096x4096', label: '4K 1:1' },
|
|
150
|
+
model_selector: { value: 'doubao-seedream-4-5-251128', label: 'Seedream 4.5' }
|
|
141
151
|
});
|
|
152
|
+
|
|
142
153
|
```
|
|
143
154
|
|
|
155
|
+
#### JiMeng Size Options
|
|
156
|
+
|
|
157
|
+
| Resolution | 5.0 Lite | 4.5 | Size Values |
|
|
158
|
+
|------------|----------|-----|-------------|
|
|
159
|
+
| 2K | ✅ | ✅ | `2048x2048`, `1728x2304`, `2304x1728`, `2848x1600`, `1600x2848`, `2496x1664`, `1664x2496`, `3136x1344` |
|
|
160
|
+
| 3K | ✅ | ❌ | `3072x3072`, `2592x3456`, `3456x2592`, `4096x2304`, `2304x4096`, `3744x2496`, `2496x3744`, `4704x2016` |
|
|
161
|
+
| 4K | ❌ | ✅ | `4096x4096`, `3520x4704`, `4704x3520`, `5504x3040`, `3040x5504`, `4992x3328`, `3328x4992`, `6240x2656` |
|
|
162
|
+
|
|
163
|
+
> **Note:** `web_search` only works with Seedream 5.0 Lite model.
|
|
164
|
+
|
|
165
|
+
## Troubleshooting (`/api/jimeng/image`)
|
|
166
|
+
|
|
167
|
+
If you see backend errors like `{"code":1254500}`, check these first:
|
|
168
|
+
|
|
169
|
+
- Do not use `jimeng/image/v3` size values (for example `1152x896`) on `/api/jimeng/image`.
|
|
170
|
+
- For `/api/jimeng/image`, use 2K/3K/4K size values such as:
|
|
171
|
+
`2048x2048`, `3072x3072`, `4096x4096`.
|
|
172
|
+
- Model and size must match:
|
|
173
|
+
- `doubao-seedream-5-0-260128` does **not** support 4K.
|
|
174
|
+
- `doubao-seedream-4-5-251128` does **not** support 3K.
|
|
175
|
+
- `web_search=true` only works with `doubao-seedream-5-0-260128`.
|
|
176
|
+
|
|
144
177
|
## Parameter Types
|
|
145
178
|
|
|
146
179
|
### GeminiImageParams
|
|
@@ -158,11 +191,12 @@ const result = await client.image.jimengV3({
|
|
|
158
191
|
| Parameter | Type | Required | Description |
|
|
159
192
|
|-----------|------|----------|-------------|
|
|
160
193
|
| `prompt` | `string \| TextFieldItem[]` | Yes | Text description (supports Chinese) |
|
|
161
|
-
| `attachment` | `AttachmentFieldItem[]` | No | Reference images |
|
|
162
|
-
| `size` | `LabelFieldItem` | Yes | Size: `'
|
|
163
|
-
| `model_selector` | `LabelFieldItem` | No | Model
|
|
164
|
-
| `web_search` | `LabelFieldItem` | No | Enable web search
|
|
165
|
-
| `image_count` | `LabelFieldItem \| number` | No | Number of images to generate |
|
|
194
|
+
| `attachment` | `AttachmentFieldItem[]` | No | Reference images for style transfer |
|
|
195
|
+
| `size` | `LabelFieldItem` | Yes | Size: `'2048x2048'` (2K), `'3072x3072'` (3K), `'4096x4096'` (4K) and more |
|
|
196
|
+
| `model_selector` | `LabelFieldItem` | No | Model: `'doubao-seedream-5-0-260128'` (5.0 Lite) or `'doubao-seedream-4-5-251128'` (4.5) |
|
|
197
|
+
| `web_search` | `LabelFieldItem` | No | Enable web search (5.0 Lite only): `'true'` or `'false'` |
|
|
198
|
+
| `image_count` | `LabelFieldItem \| number` | No | Number of images to generate (0-5) |
|
|
199
|
+
| `model` | `string` | No | Direct model override |
|
|
166
200
|
|
|
167
201
|
## Examples
|
|
168
202
|
|
|
@@ -267,4 +301,4 @@ console.log('Task Folder:', result.taskFolder); // e.g., "~/Documents/tasks/2026
|
|
|
267
301
|
## Related Skills
|
|
268
302
|
|
|
269
303
|
- [unityclaw-image-compress](../unityclaw-image-compress/SKILL.md) - Compress generated images
|
|
270
|
-
- [unityclaw-video-generation-
|
|
304
|
+
- [unityclaw-video-generation-kling](../unityclaw-video-generation-kling/SKILL.md) - Generate videos
|