@julong/mono-rele2-utils 1.31.0 → 1.32.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 CHANGED
@@ -50,6 +50,16 @@ Run without arguments to list all available tools:
50
50
  mono-rele2-utils-cli
51
51
  ```
52
52
 
53
+ ## Skill Installation
54
+
55
+ Install the CLI as a reusable skill for your AI agent:
56
+
57
+ ```sh
58
+ npx skills add https://github.com/jl917/mcp-kit/tree/main/packages/utils/skills
59
+ ```
60
+
61
+ This registers all tools as callable skills in your agent's environment.
62
+
53
63
  ## Tools API Reference
54
64
 
55
65
  ### `cn(classes)`
@@ -57,27 +67,32 @@ mono-rele2-utils-cli
57
67
  **Signature**
58
68
 
59
69
  ```typescript
60
- function cn(classes: string[]): string;
70
+ function cn(classes: string[]): string
61
71
  ```
62
72
 
63
73
  Merges class names, filtering out falsy values.
64
74
 
75
+
65
76
  **Parameters**
66
77
 
67
- | Name | Type | Description |
68
- | --------- | ---------- | ---------------------------- |
78
+ | Name | Type | Description |
79
+ |------|------|-------------|
69
80
  | `classes` | `string[]` | List of class names to merge |
70
81
 
82
+
71
83
  **Returns**
72
84
 
73
85
  `string` — Merged class name string with falsy values filtered out
74
86
 
87
+
75
88
  **CLI**
76
89
 
77
90
  ```sh
78
91
  mono-rele2-utils-cli cnTool <classes>
79
92
  ```
80
93
 
94
+
95
+
81
96
  **Examples**
82
97
 
83
98
  ```sh
@@ -90,43 +105,43 @@ mono-rele2-utils-cli cnTool '["btn","active","large"]'
90
105
  **Signature**
91
106
 
92
107
  ```typescript
93
- function case_convert(
94
- input: string,
95
- to: 'upper' | 'lower' | 'capitalize' | 'camel' | 'snake' | 'kebab',
96
- ): string;
108
+ function case_convert(input: string, to: "upper" | "lower" | "capitalize" | "camel" | "snake" | "kebab"): string
97
109
  ```
98
110
 
99
111
  Converts text to the specified case format.
100
112
 
113
+
101
114
  **Parameters**
102
115
 
103
- | Name | Type | Description |
104
- | ------- | -------- | --------------- | ------------ | ------- | ------- | -------- | ------------------ |
116
+ | Name | Type | Description |
117
+ |------|------|-------------|
105
118
  | `input` | `string` | Text to convert |
106
- | `to` | `"upper" | "lower" | "capitalize" | "camel" | "snake" | "kebab"` | Target case format |
119
+ | `to` | `"upper" | "lower" | "capitalize" | "camel" | "snake" | "kebab"` | Target case format |
120
+
107
121
 
108
122
  **Returns**
109
123
 
110
124
  `string` — Converted text in the target case format
111
125
 
126
+
112
127
  **CLI**
113
128
 
114
129
  ```sh
115
130
  mono-rele2-utils-cli caseConvertTool <input> <to>
116
131
  ```
117
132
 
133
+
134
+
118
135
  **Examples**
119
136
 
120
137
  ```sh
121
138
  mono-rele2-utils-cli caseConvertTool "hello world" camel
122
139
  # → helloWorld
123
140
  ```
124
-
125
141
  ```sh
126
142
  mono-rele2-utils-cli caseConvertTool "helloWorld" snake
127
143
  # → hello_world
128
144
  ```
129
-
130
145
  ```sh
131
146
  mono-rele2-utils-cli caseConvertTool "hello world" kebab
132
147
  # → hello-world
@@ -137,36 +152,40 @@ mono-rele2-utils-cli caseConvertTool "hello world" kebab
137
152
  **Signature**
138
153
 
139
154
  ```typescript
140
- function truncate(input: string, maxLength: number, suffix?: string): string;
155
+ function truncate(input: string, maxLength: number, suffix?: string): string
141
156
  ```
142
157
 
143
158
  Truncates text to a maximum length and appends a suffix.
144
159
 
160
+
145
161
  **Parameters**
146
162
 
147
- | Name | Type | Description |
148
- | ----------- | -------- | ------------------------------------------------ |
149
- | `input` | `string` | Text to truncate |
150
- | `maxLength` | `number` | Maximum character length |
151
- | `suffix` | `string` | Suffix to append when truncated (default: `...`) |
163
+ | Name | Type | Description |
164
+ |------|------|-------------|
165
+ | `input` | `string` | Text to truncate |
166
+ | `maxLength` | `number` | Maximum character length |
167
+ | `suffix` | `string` | Suffix to append when truncated (default: `...`) |
168
+
152
169
 
153
170
  **Returns**
154
171
 
155
172
  `string` — Truncated text with the configured suffix appended if truncated
156
173
 
174
+
157
175
  **CLI**
158
176
 
159
177
  ```sh
160
178
  mono-rele2-utils-cli truncateTool <input> <maxLength> [suffix]
161
179
  ```
162
180
 
181
+
182
+
163
183
  **Examples**
164
184
 
165
185
  ```sh
166
186
  mono-rele2-utils-cli truncateTool "hello world long text" 10
167
187
  # → hello w...
168
188
  ```
169
-
170
189
  ```sh
171
190
  mono-rele2-utils-cli truncateTool "hello world" 8 "…"
172
191
  # → hello w…
@@ -182,22 +201,27 @@ function object_flatten(json: string \| JSON object): JsonObject
182
201
 
183
202
  Flattens a nested JSON object of any depth into dot-notation key-value pairs. Accepts a JSON string and recursively flattens all levels. Arrays and primitives at any level are treated as leaf values..
184
203
 
204
+
185
205
  **Parameters**
186
206
 
187
- | Name | Type | Description |
188
- | ------ | ----------------------- | --------------------------------------------------------- |
207
+ | Name | Type | Description |
208
+ |------|------|-------------|
189
209
  | `json` | `string \| JSON object` | JSON string or parsed object to flatten (unlimited depth) |
190
210
 
211
+
191
212
  **Returns**
192
213
 
193
214
  `JsonObject` — Flattened object with dot-notation keys — e.g. { "a.b.c": value }
194
215
 
216
+
195
217
  **CLI**
196
218
 
197
219
  ```sh
198
220
  mono-rele2-utils-cli objectFlattenTool <json>
199
221
  ```
200
222
 
223
+
224
+
201
225
  **Examples**
202
226
 
203
227
  ```sh
@@ -209,7 +233,6 @@ mono-rele2-utils-cli objectFlattenTool '{"user":{"name":"Alice","address":{"city
209
233
  "active": true
210
234
  }
211
235
  ```
212
-
213
236
  ```sh
214
237
  mono-rele2-utils-cli objectFlattenTool '{"a":{"b":{"c":{"d":{"e":"deep"}}}}}'
215
238
  # → {
@@ -222,32 +245,36 @@ mono-rele2-utils-cli objectFlattenTool '{"a":{"b":{"c":{"d":{"e":"deep"}}}}}'
222
245
  **Signature**
223
246
 
224
247
  ```typescript
225
- function getUser(user: RandomUser): string;
248
+ function getUser(user: RandomUser): string
226
249
  ```
227
250
 
228
251
  RandomUser API 형식의 사용자 객체를 받아 이름과 거주 도시로 구성된 한글 문장을 반환합니다. JSON 문자열 또는 파싱된 객체를 입력받습니다..
229
252
 
253
+
230
254
  **Parameters**
231
255
 
232
- | Name | Type | Description |
233
- | ------ | ------------ | ------------------------------------------------------------------------------------- |
256
+ | Name | Type | Description |
257
+ |------|------|-------------|
234
258
  | `user` | `RandomUser` | RandomUser 형식의 JSON 문자열 또는 객체 — name.first / name.last / location.city 필수 |
235
259
 
260
+
236
261
  **Returns**
237
262
 
238
263
  `string` — "이름은 {first} {last} 이고 현재 {city} 에 살고 있습니다." 형식의 한글 문장
239
264
 
265
+
240
266
  **CLI**
241
267
 
242
268
  ```sh
243
269
  mono-rele2-utils-cli getUserTool <user>
244
270
  ```
245
271
 
272
+
246
273
  **`user`** type definition
247
274
 
248
275
  ```typescript
249
276
  interface RandomUser {
250
- gender: 'male' | 'female';
277
+ gender: "male" | "female";
251
278
  name: {
252
279
  title: string;
253
280
  first: string;
@@ -291,6 +318,7 @@ interface RandomUser {
291
318
  }
292
319
  ```
293
320
 
321
+
294
322
  **Examples**
295
323
 
296
324
  ```sh
@@ -303,27 +331,31 @@ mono-rele2-utils-cli getUserTool '{"name":{"title":"Mr","first":"Alice","last":"
303
331
  **Signature**
304
332
 
305
333
  ```typescript
306
- function env_get(keys: string[]): Record<string, string>;
334
+ function env_get(keys: string[]): Record<string, string>
307
335
  ```
308
336
 
309
337
  MCP 클라이언트 config의 env 필드를 통해 주입된 환경 변수 값을 조회합니다. 조회 가능한 키는 패키지에서 제공하는 환경 변수로 한정됩니다. 현재 지원: API_KEY..
310
338
 
339
+
311
340
  **Parameters**
312
341
 
313
- | Name | Type | Description |
314
- | ------ | ---------- | --------------------------------------------- |
342
+ | Name | Type | Description |
343
+ |------|------|-------------|
315
344
  | `keys` | `string[]` | 조회할 환경 변수 이름 목록 (유효 키: API_KEY) |
316
345
 
346
+
317
347
  **Returns**
318
348
 
319
349
  `Record<string, string>` — key: 환경 변수 이름, value: 해당 값 (설정되지 않은 변수는 결과에서 제외)
320
350
 
351
+
321
352
  **CLI**
322
353
 
323
354
  ```sh
324
355
  mono-rele2-utils-cli envGetTool <keys>
325
356
  ```
326
357
 
358
+
327
359
  **`keys`** type definition
328
360
 
329
361
  ```typescript
@@ -344,6 +376,7 @@ mono-rele2-utils-cli envGetTool <keys>
344
376
  // }
345
377
  ```
346
378
 
379
+
347
380
  **Examples**
348
381
 
349
382
  ```sh
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@julong/mono-rele2-utils",
3
- "version": "1.31.0",
3
+ "version": "1.32.0",
4
4
  "description": "Use this skill to invoke text utility functions via the mono-rele2-utils CLI. Handles class name merging, case conversion, and text truncation.",
5
5
  "license": "ISC",
6
6
  "type": "module",
@@ -1,170 +0,0 @@
1
- ---
2
- name: mono-rele2-utils-cli
3
- description: Use this skill to invoke text utility functions via the mono-rele2-utils CLI. Handles class name merging, case conversion, and text truncation.
4
- ---
5
-
6
- # mono-rele2-utils-cli
7
-
8
- ```sh
9
- mono-rele2-utils-cli <toolName> [...args]
10
- ```
11
-
12
- ## Skills
13
-
14
- ### cnTool
15
-
16
- Merges class names, filtering out falsy values
17
-
18
- | arg | description |
19
- |-----|-------------|
20
- | `classes` | Type: string[] — List of class names to merge |
21
-
22
- ### caseConvertTool
23
-
24
- Converts text to the specified case format
25
-
26
- | arg | description |
27
- |-----|-------------|
28
- | `input` | Type: string — Text to convert |
29
- | `to` | Type: "upper" | "lower" | "capitalize" | "camel" | "snake" | "kebab" — Target case format — `upper` \| `lower` \| `capitalize` \| `camel` \| `snake` \| `kebab` |
30
-
31
- ### truncateTool
32
-
33
- Truncates text to a maximum length and appends a suffix
34
-
35
- | arg | description |
36
- |-----|-------------|
37
- | `input` | Type: string — Text to truncate |
38
- | `maxLength` | Type: number — Maximum character length |
39
- | `suffix` | Type: string — Suffix to append when truncated — default: `...` |
40
-
41
- ### objectFlattenTool
42
-
43
- Flattens a nested JSON object of any depth into dot-notation key-value pairs. Accepts a JSON string and recursively flattens all levels. Arrays and primitives at any level are treated as leaf values.
44
-
45
- | arg | description |
46
- |-----|-------------|
47
- | `json` | JSON string or parsed object to flatten (unlimited depth) |
48
-
49
- ### getUserTool
50
-
51
- RandomUser API 형식의 사용자 객체를 받아 이름과 거주 도시로 구성된 한글 문장을 반환합니다. JSON 문자열 또는 파싱된 객체를 입력받습니다.
52
-
53
- | arg | description |
54
- |-----|-------------|
55
- | `user` | Type: RandomUser — RandomUser 형식의 JSON 문자열 또는 객체 — name.first / name.last / location.city 필수 |
56
-
57
- **`user`** type definition:
58
- ```typescript
59
- interface RandomUser {
60
- gender: "male" | "female";
61
- name: {
62
- title: string;
63
- first: string;
64
- last: string;
65
- };
66
- location: {
67
- street: {
68
- number: number;
69
- name: string;
70
- };
71
- city: string;
72
- state: string;
73
- country: string;
74
- postcode: string | number;
75
- coordinates: {
76
- latitude: string;
77
- longitude: string;
78
- };
79
- timezone: {
80
- offset: string;
81
- description: string;
82
- };
83
- };
84
- email: string;
85
- login: {
86
- uuid: string;
87
- username: string;
88
- };
89
- dob: {
90
- date: string;
91
- age: number;
92
- };
93
- phone: string;
94
- cell: string;
95
- picture: {
96
- large: string;
97
- medium: string;
98
- thumbnail: string;
99
- };
100
- nat: string;
101
- }
102
- ```
103
-
104
- ### envGetTool
105
-
106
- MCP 클라이언트 config의 env 필드를 통해 주입된 환경 변수 값을 조회합니다. 조회 가능한 키는 패키지에서 제공하는 환경 변수로 한정됩니다. 현재 지원: API_KEY.
107
-
108
- | arg | description |
109
- |-----|-------------|
110
- | `keys` | Type: string[] — 조회할 환경 변수 이름 목록 (유효 키: API_KEY) |
111
-
112
- **`keys`** type definition:
113
- ```typescript
114
- // @julong/mono-rele2-utils 환경 변수 키 목록
115
- // "API_KEY"
116
-
117
- // MCP client config 예시:
118
- // {
119
- // "mcpServers": {
120
- // "@julong/mono-rele2-utils": {
121
- // "command": "npx",
122
- // "args": ["-y", "@julong/mono-rele2-utils"],
123
- // "env": {
124
- // "API_KEY": "<value>"
125
- // }
126
- // }
127
- // }
128
- // }
129
- ```
130
-
131
- ## Examples
132
-
133
- - `mono-rele2-utils-cli cnTool '["btn","active","large"]'` => `btn active large`
134
- - `mono-rele2-utils-cli caseConvertTool "hello world" camel` => `helloWorld`
135
- - `mono-rele2-utils-cli caseConvertTool "helloWorld" snake` => `hello_world`
136
- - `mono-rele2-utils-cli caseConvertTool "hello world" kebab` => `hello-world`
137
- - `mono-rele2-utils-cli truncateTool "hello world long text" 10` => `hello w...`
138
- - `mono-rele2-utils-cli truncateTool "hello world" 8 "…"` => `hello w…`
139
- - `mono-rele2-utils-cli objectFlattenTool '{"user":{"name":"Alice","address":{"city":"Seoul","zip":"12345"}},"active":true}'` => `{
140
- "user.name": "Alice",
141
- "user.address.city": "Seoul",
142
- "user.address.zip": "12345",
143
- "active": true
144
- }`
145
- - `mono-rele2-utils-cli objectFlattenTool '{"a":{"b":{"c":{"d":{"e":"deep"}}}}}'` => `{
146
- "a.b.c.d.e": "deep"
147
- }`
148
- - `mono-rele2-utils-cli getUserTool '{"name":{"title":"Mr","first":"Alice","last":"Kim"},"location":{"city":"Seoul"},"gender":"female","email":"alice@example.com","nat":"KR"}'` => `이름은 Alice Kim 이고 현재 Seoul 에 살고 있습니다.`
149
- - `mono-rele2-utils-cli envGetTool '["API_KEY"]'` => `{
150
- "API_KEY": "<value>"
151
- }`
152
-
153
- ## Guidelines
154
-
155
- - Arguments are positional — pass them in the order listed in each skill's table
156
- - Numeric args are auto-parsed — pass as plain numbers (e.g. `10`)
157
- - Array args must be valid JSON — wrap in single quotes on Unix shells (e.g. `'["a","b"]'`)
158
- - Optional args with defaults may be omitted
159
- - Arrays and primitives at any level are always treated as leaf values — they are never traversed.
160
- - The result is always a flat JSON object with dot-notation keys.
161
- - There is no depth limit — objects of any nesting level are fully flattened.
162
- - Input is accepted as a JSON string (MCP/CLI) and parsed internally.
163
- - 입력은 RandomUser API 스펙을 따릅니다. 최소한 name.first, name.last, location.city 필드가 필요합니다.
164
- - JSON 문자열(string)과 파싱된 객체 모두 허용됩니다 (CLI / MCP 모두 동작).
165
- - 결과는 항상 '이름은 {first} {last} 이고 현재 {city} 에 살고 있습니다.' 형식의 한글 문장입니다.
166
- - 조회 가능한 키: API_KEY
167
- - MCP client config.json의 env 필드에 위 키들만 설정할 수 있습니다.
168
- - 유효하지 않은 키를 요청하면 에러 메시지에 허용된 키 목록이 표시됩니다.
169
- - 설정되지 않은 환경 변수는 결과 객체에서 제외됩니다.
170
- - Run `mono-rele2-utils-cli` with no args to list all available skills