@unityclaw/skills 1.1.3 → 1.1.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unityclaw/skills",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "UnityClaw Skills - Claude Code and OpenClaw skill definitions for AI-powered image/video generation, media analysis, and more",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: unityclaw-image-generation-jimeng
3
3
  description: Generate high-quality images using JiMeng (Doubao) models
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  metadata:
6
6
  openclaw:
7
7
  requires:
@@ -72,7 +72,7 @@ if (result.success && result.response?.data) {
72
72
  ## SDK Version Check Rule
73
73
 
74
74
  - Before invoking this skill, check local `@unityclaw/sdk` version.
75
- - Required minimum SDK version: `1.1.3`
75
+ - Required minimum SDK version: `1.1.4`
76
76
  - If local SDK version is lower than this skill version, stop and prompt user to upgrade SDK first.
77
77
  - Suggested command: `npm i @unityclaw/sdk@latest`
78
78
  <!-- SDK_VERSION_RULE_END -->
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: unityclaw-media-analysis
3
3
  description: Analyze video and audio content to extract subtitles, summaries, and insights
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  metadata:
6
6
  openclaw:
7
7
  requires:
@@ -352,7 +352,7 @@ console.log('Task Folder:', result.taskFolder);
352
352
  ## SDK Version Check Rule
353
353
 
354
354
  - Before invoking this skill, check local `@unityclaw/sdk` version.
355
- - Required minimum SDK version: `1.1.3`
355
+ - Required minimum SDK version: `1.1.4`
356
356
  - If local SDK version is lower than this skill version, stop and prompt user to upgrade SDK first.
357
357
  - Suggested command: `npm i @unityclaw/sdk@latest`
358
358
  <!-- SDK_VERSION_RULE_END -->
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: unityclaw-media-download-xhs
3
3
  description: Download Xiaohongshu media and return cover/video URLs
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  metadata:
6
6
  openclaw:
7
7
  requires:
@@ -43,7 +43,7 @@ if (result.success && result.response?.data) {
43
43
  ## SDK Version Check Rule
44
44
 
45
45
  - Before invoking this skill, check local `@unityclaw/sdk` version.
46
- - Required minimum SDK version: `1.1.3`
46
+ - Required minimum SDK version: `1.1.4`
47
47
  - If local SDK version is lower than this skill version, stop and prompt user to upgrade SDK first.
48
48
  - Suggested command: `npm i @unityclaw/sdk@latest`
49
49
  <!-- SDK_VERSION_RULE_END -->
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: unityclaw-media-stats
3
3
  description: Extract social media post metrics (play, like, comment, share, etc.) from links
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  metadata:
6
6
  openclaw:
7
7
  requires:
@@ -43,7 +43,7 @@ if (result.success && result.response?.data) {
43
43
  ## SDK Version Check Rule
44
44
 
45
45
  - Before invoking this skill, check local `@unityclaw/sdk` version.
46
- - Required minimum SDK version: `1.1.3`
46
+ - Required minimum SDK version: `1.1.4`
47
47
  - If local SDK version is lower than this skill version, stop and prompt user to upgrade SDK first.
48
48
  - Suggested command: `npm i @unityclaw/sdk@latest`
49
49
  <!-- SDK_VERSION_RULE_END -->
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: unityclaw-media-user-info
3
3
  description: Extract social media user profile metrics from homepage links
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  metadata:
6
6
  openclaw:
7
7
  requires:
@@ -43,7 +43,7 @@ if (result.success && result.response?.data) {
43
43
  ## SDK Version Check Rule
44
44
 
45
45
  - Before invoking this skill, check local `@unityclaw/sdk` version.
46
- - Required minimum SDK version: `1.1.3`
46
+ - Required minimum SDK version: `1.1.4`
47
47
  - If local SDK version is lower than this skill version, stop and prompt user to upgrade SDK first.
48
48
  - Suggested command: `npm i @unityclaw/sdk@latest`
49
49
  <!-- SDK_VERSION_RULE_END -->
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: unityclaw-video-generation-jimeng-doubao
3
3
  description: Generate videos with JiMeng or Doubao models (text-to-video and image-to-video)
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  metadata:
6
6
  openclaw:
7
7
  requires:
@@ -76,7 +76,7 @@ SDK will auto-upload local files and fill `tmp_url`.
76
76
  ## SDK Version Check Rule
77
77
 
78
78
  - Before invoking this skill, check local `@unityclaw/sdk` version.
79
- - Required minimum SDK version: `1.1.3`
79
+ - Required minimum SDK version: `1.1.4`
80
80
  - If local SDK version is lower than this skill version, stop and prompt user to upgrade SDK first.
81
81
  - Suggested command: `npm i @unityclaw/sdk@latest`
82
82
  <!-- SDK_VERSION_RULE_END -->
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: unityclaw-video-generation-kling
3
3
  description: Generate AI videos using Kling model with multi-version support
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  metadata:
6
6
  openclaw:
7
7
  requires:
@@ -277,7 +277,7 @@ console.log('Downloaded Videos:', result.attachments);
277
277
  ## SDK Version Check Rule
278
278
 
279
279
  - Before invoking this skill, check local `@unityclaw/sdk` version.
280
- - Required minimum SDK version: `1.1.3`
280
+ - Required minimum SDK version: `1.1.4`
281
281
  - If local SDK version is lower than this skill version, stop and prompt user to upgrade SDK first.
282
282
  - Suggested command: `npm i @unityclaw/sdk@latest`
283
283
  <!-- SDK_VERSION_RULE_END -->
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: unityclaw-video-generation-wan-minimax
3
3
  description: Generate videos with Wan and MiniMax models for cinematic or controllable workflows
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  metadata:
6
6
  openclaw:
7
7
  requires:
@@ -73,7 +73,7 @@ SDK will auto-upload local files and fill `tmp_url`.
73
73
  ## SDK Version Check Rule
74
74
 
75
75
  - Before invoking this skill, check local `@unityclaw/sdk` version.
76
- - Required minimum SDK version: `1.1.3`
76
+ - Required minimum SDK version: `1.1.4`
77
77
  - If local SDK version is lower than this skill version, stop and prompt user to upgrade SDK first.
78
78
  - Suggested command: `npm i @unityclaw/sdk@latest`
79
79
  <!-- SDK_VERSION_RULE_END -->
@@ -1,318 +0,0 @@
1
- ---
2
- name: unityclaw-document-translation
3
- description: Translate documents between multiple languages while preserving formatting
4
- version: 1.1.3
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 Document Translation
23
-
24
- Translate documents between multiple languages while preserving original formatting and structure.
25
-
26
- ## Installation
27
-
28
- ```bash
29
- npm install @unityclaw/sdk
30
- ```
31
-
32
- ## Configuration
33
-
34
- Set your API key using one of these methods:
35
-
36
- ```bash
37
- # Method 1: Use SDK CLI (recommended - persists across sessions)
38
- npx @unityclaw/sdk config set apiKey your-api-key
39
-
40
- # Method 2: Environment variable
41
- export UNITYCLAW_API_KEY=your-api-key
42
- ```
43
-
44
- ## Response Structure
45
-
46
- > **IMPORTANT:** The result has a nested structure. Use `result.success` to check overall success, and access data via `result.response.data`.
47
-
48
- ```typescript
49
- interface UnityClawResult {
50
- success: boolean; // ✅ Use this to check if SDK call succeeded
51
- taskId: string; // Task identifier
52
- taskFolder: string; // Path to task folder with logs
53
- duration: number; // Request duration in ms
54
- response: { // API response object
55
- code: number; // 0 = success
56
- data: Array<{ // ✅ Result data here
57
- name: string;
58
- contentType: string;
59
- content: string; // URL to translated document
60
- }> | null;
61
- };
62
- logs: Array<{ timestamp; level; message }>;
63
- attachments: any[];
64
- }
65
- ```
66
-
67
- ## Quick Start
68
-
69
- ```typescript
70
- import { UnityClawClient } from '@unityclaw/sdk';
71
-
72
- const client = new UnityClawClient();
73
-
74
- const result = await client.document.translate({
75
- attachment: [
76
- { path: './files/document.pdf' }
77
- ],
78
- source_language: { value: 'en', label: 'English' },
79
- target_language: { value: 'zh', label: 'Chinese' }
80
- });
81
-
82
- // ✅ Correct: Check result.success, access data via result.response.data
83
- if (result.success && result.response?.data) {
84
- console.log('Translated document:', result.response.data);
85
- }
86
- ```
87
-
88
- ## API Reference
89
-
90
- ### translate()
91
-
92
- Translate a document from one language to another.
93
-
94
- ```typescript
95
- await client.document.translate({
96
- attachment: AttachmentFieldItem[];
97
- source_language: LabelFieldItem | string;
98
- target_language: LabelFieldItem | string;
99
- }): Promise<APIResponse<AttachmentResult[]>>
100
- ```
101
-
102
- ## Parameters
103
-
104
- | Parameter | Type | Required | Description |
105
- |-----------|------|----------|-------------|
106
- | `attachment` | `AttachmentFieldItem[]` | Yes | Document(s) to translate |
107
- | `source_language` | `LabelFieldItem \| string` | Yes | Source language code |
108
- | `target_language` | `LabelFieldItem \| string` | Yes | Target language code |
109
-
110
- ## Supported Languages
111
-
112
- | Code | Language |
113
- |------|----------|
114
- | `en` | English |
115
- | `zh` | Chinese (Simplified) |
116
- | `zh-TW` | Chinese (Traditional) |
117
- | `ja` | Japanese |
118
- | `ko` | Korean |
119
- | `es` | Spanish |
120
- | `fr` | French |
121
- | `de` | German |
122
- | `pt` | Portuguese |
123
- | `ru` | Russian |
124
- | `ar` | Arabic |
125
- | `it` | Italian |
126
- | `nl` | Dutch |
127
- | `pl` | Polish |
128
- | `tr` | Turkish |
129
- | `vi` | Vietnamese |
130
- | `th` | Thai |
131
- | `id` | Indonesian |
132
-
133
- ## Supported Document Formats
134
-
135
- - PDF (.pdf)
136
- - Word (.doc, .docx)
137
- - PowerPoint (.ppt, .pptx)
138
- - Excel (.xls, .xlsx)
139
- - Text (.txt)
140
- - RTF (.rtf)
141
-
142
- ## Examples
143
-
144
- ### PDF Translation
145
-
146
- ```typescript
147
- const client = new UnityClawClient();
148
-
149
- const result = await client.document.translate({
150
- attachment: [
151
- { tmp_url: 'https://example.com/report.pdf', name: 'report.pdf' }
152
- ],
153
- source_language: { value: 'en', label: 'English' },
154
- target_language: { value: 'zh', label: 'Chinese' }
155
- });
156
-
157
- if (result.success && result.response?.data) {
158
- console.log('Translated PDF:', result.response.data[0].content);
159
- }
160
- ```
161
-
162
- ### Word Document Translation
163
-
164
- ```typescript
165
- const result = await client.document.translate({
166
- attachment: [
167
- { tmp_url: 'https://example.com/contract.docx', name: 'contract.docx' }
168
- ],
169
- source_language: 'en',
170
- target_language: 'ja'
171
- });
172
- ```
173
-
174
- ### Simple String Parameters
175
-
176
- ```typescript
177
- // Use simple strings for language codes
178
- const result = await client.document.translate({
179
- attachment: [
180
- { tmp_url: 'https://example.com/doc.pdf', name: 'doc.pdf' }
181
- ],
182
- source_language: 'en',
183
- target_language: 'zh'
184
- });
185
- ```
186
-
187
- ### Batch Translation
188
-
189
- ```typescript
190
- const documents = [
191
- { tmp_url: 'https://example.com/doc1.pdf', name: 'doc1.pdf' },
192
- { tmp_url: 'https://example.com/doc2.pdf', name: 'doc2.pdf' },
193
- { tmp_url: 'https://example.com/doc3.pdf', name: 'doc3.pdf' }
194
- ];
195
-
196
- const result = await client.document.translate({
197
- attachment: documents,
198
- source_language: { value: 'en', label: 'English' },
199
- target_language: { value: 'zh', label: 'Chinese' }
200
- });
201
-
202
- if (result.success && result.response?.data) {
203
- result.response.data.forEach((doc, i) => {
204
- console.log(`Document ${i + 1}: ${doc.content}`);
205
- });
206
- }
207
- ```
208
-
209
- ### Multi-Language Translation
210
-
211
- ```typescript
212
- const translateTo = async (
213
- documentUrl: string,
214
- targetLanguages: string[]
215
- ) => {
216
- const client = new UnityClawClient();
217
- const results = await Promise.all(
218
- targetLanguages.map(lang =>
219
- client.document.translate({
220
- attachment: [{ tmp_url: documentUrl, name: 'document.pdf' }],
221
- source_language: 'en',
222
- target_language: lang
223
- })
224
- )
225
- );
226
-
227
- return results;
228
- };
229
-
230
- // Translate English document to multiple languages
231
- const translations = await translateTo(
232
- 'https://example.com/english-doc.pdf',
233
- ['zh', 'ja', 'ko', 'es', 'fr']
234
- );
235
- ```
236
-
237
- ### Chinese to English
238
-
239
- ```typescript
240
- const result = await client.document.translate({
241
- attachment: [
242
- { tmp_url: 'https://example.com/chinese-doc.pdf', name: 'chinese.pdf' }
243
- ],
244
- source_language: { value: 'zh', label: 'Chinese' },
245
- target_language: { value: 'en', label: 'English' }
246
- });
247
- ```
248
-
249
- ## Response Format
250
-
251
- ```typescript
252
- interface AttachmentResult {
253
- name: string;
254
- contentType: 'attachment/url';
255
- content: string; // URL to translated document
256
- }
257
- ```
258
-
259
- ## Error Handling
260
-
261
- ```typescript
262
- const result = await client.document.translate({
263
- attachment: [{ tmp_url: 'https://...', name: 'doc.pdf' }],
264
- source_language: 'en',
265
- target_language: 'zh'
266
- });
267
-
268
- if (!result.success) {
269
- console.error('Request failed');
270
- console.log('Check logs:', result.logs);
271
- return;
272
- }
273
-
274
- if (result.response?.code !== 0) {
275
- console.error('API error:', result.response);
276
- return;
277
- }
278
-
279
- // Success
280
- console.log('Success:', result.response.data);
281
- ```
282
-
283
- ## Task Folders
284
-
285
- Each execution creates a task folder:
286
-
287
- ```typescript
288
- const result = await client.document.translate({
289
- attachment: [{ tmp_url: 'https://...', name: 'doc.pdf' }],
290
- source_language: 'en',
291
- target_language: 'zh'
292
- });
293
-
294
- console.log('Task ID:', result.taskId);
295
- console.log('Task Folder:', result.taskFolder);
296
- console.log('Downloaded Files:', result.attachments);
297
- ```
298
-
299
- ## Best Practices
300
-
301
- 1. **Format Preservation**: Original formatting is maintained
302
- 2. **Large Documents**: May take longer for extensive documents
303
- 3. **Language Detection**: Specify source language for accuracy
304
- 4. **Quality Review**: Review translations for context-specific terms
305
-
306
- ## Related Skills
307
-
308
- - [unityclaw-document-convert](../unityclaw-document-convert/SKILL.md) - Convert document formats
309
- - [unityclaw-media-analysis](../unityclaw-media-analysis/SKILL.md) - Analyze video/audio content
310
-
311
- <!-- SDK_VERSION_RULE_START -->
312
- ## SDK Version Check Rule
313
-
314
- - Before invoking this skill, check local `@unityclaw/sdk` version.
315
- - Required minimum SDK version: `1.1.3`
316
- - If local SDK version is lower than this skill version, stop and prompt user to upgrade SDK first.
317
- - Suggested command: `npm i @unityclaw/sdk@latest`
318
- <!-- SDK_VERSION_RULE_END -->