@julong/mono-rele2-utils

Use this skill to invoke text utility functions via the mono-rele2-utils CLI. Handles class name merging, case conversion, and text truncation.

MCP Server

Configuration

Add to your MCP client config:

{
  "mcpServers": {
    "@julong/mono-rele2-utils": {
      "command": "npx",
      "args": ["-y", "@julong/mono-rele2-utils"],
      "env": {
        "API_KEY": "<value>"
      }
    }
  }
}

Run

npx -y @julong/mono-rele2-utils

CLI

Installation

npm install -g @julong/mono-rele2-utils
# or
npx mono-rele2-utils-cli <toolName> [...args]

Usage

mono-rele2-utils-cli <toolName> [...args]

Run without arguments to list all available tools:

mono-rele2-utils-cli

Skill Installation

Install the CLI as a reusable skill for your AI agent:

npx skills add https://github.com/jl917/mcp-kit/tree/main/packages/utils/skills

This registers all tools as callable skills in your agent's environment.

Tools API Reference

cn(classes)

Signature

function cn(classes: string[]): string

Merges class names, filtering out falsy values.

Parameters

NameTypeDescription
classesstring[]List of class names to merge

Returns

string — Merged class name string with falsy values filtered out

CLI

mono-rele2-utils-cli cnTool <classes>

Examples

mono-rele2-utils-cli cnTool '["btn","active","large"]'
# → btn active large

case_convert(input, to)

Signature

function case_convert(input: string, to: "upper" | "lower" | "capitalize" | "camel" | "snake" | "kebab"): string

Converts text to the specified case format.

Parameters

NameTypeDescription
inputstringText to convert
to"upper" | "lower" | "capitalize" | "camel" | "snake" | "kebab"Target case format

Returns

string — Converted text in the target case format

CLI

mono-rele2-utils-cli caseConvertTool <input> <to>

Examples

mono-rele2-utils-cli caseConvertTool "hello world" camel
# → helloWorld
mono-rele2-utils-cli caseConvertTool "helloWorld" snake
# → hello_world
mono-rele2-utils-cli caseConvertTool "hello world" kebab
# → hello-world

truncate(input, maxLength, suffix)

Signature

function truncate(input: string, maxLength: number, suffix?: string): string

Truncates text to a maximum length and appends a suffix.

Parameters

NameTypeDescription
inputstringText to truncate
maxLengthnumberMaximum character length
suffixstringSuffix to append when truncated (default: ...)

Returns

string — Truncated text with the configured suffix appended if truncated

CLI

mono-rele2-utils-cli truncateTool <input> <maxLength> [suffix]

Examples

mono-rele2-utils-cli truncateTool "hello world long text" 10
# → hello w...
mono-rele2-utils-cli truncateTool "hello world" 8 "…"
# → hello w…

object_flatten(json)

Signature

function object_flatten(json: string | JSON object): JsonObject

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..

Parameters

NameTypeDescription
jsonstring | JSON objectJSON string or parsed object to flatten (unlimited depth)

Returns

JsonObject — Flattened object with dot-notation keys — e.g. { "a.b.c": value }

CLI

mono-rele2-utils-cli objectFlattenTool <json>

Examples

mono-rele2-utils-cli objectFlattenTool '{"user":{"name":"Alice","address":{"city":"Seoul","zip":"12345"}},"active":true}'
# → {
  "user.name": "Alice",
  "user.address.city": "Seoul",
  "user.address.zip": "12345",
  "active": true
}
mono-rele2-utils-cli objectFlattenTool '{"a":{"b":{"c":{"d":{"e":"deep"}}}}}'
# → {
  "a.b.c.d.e": "deep"
}

getUser(user)

Signature

function getUser(user: RandomUser): string

RandomUser API 형식의 사용자 객체를 받아 이름과 거주 도시로 구성된 한글 문장을 반환합니다. JSON 문자열 또는 파싱된 객체를 입력받습니다..

Parameters

NameTypeDescription
userRandomUserRandomUser 형식의 JSON 문자열 또는 객체 — name.first / name.last / location.city 필수

Returns

string — "이름은 {first} {last} 이고 현재 {city} 에 살고 있습니다." 형식의 한글 문장

CLI

mono-rele2-utils-cli getUserTool <user>

user type definition

interface RandomUser {
  gender: "male" | "female";
  name: {
    title: string;
    first: string;
    last: string;
  };
  location: {
    street: {
      number: number;
      name: string;
    };
    city: string;
    state: string;
    country: string;
    postcode: string | number;
    coordinates: {
      latitude: string;
      longitude: string;
    };
    timezone: {
      offset: string;
      description: string;
    };
  };
  email: string;
  login: {
    uuid: string;
    username: string;
  };
  dob: {
    date: string;
    age: number;
  };
  phone: string;
  cell: string;
  picture: {
    large: string;
    medium: string;
    thumbnail: string;
  };
  nat: string;
}

Examples

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 에 살고 있습니다.

env_get(keys)

Signature

function env_get(keys: string[]): Record<string, string>

MCP 클라이언트 config의 env 필드를 통해 주입된 환경 변수 값을 조회합니다. 조회 가능한 키는 패키지에서 제공하는 환경 변수로 한정됩니다. 현재 지원: API_KEY..

Parameters

NameTypeDescription
keysstring[]조회할 환경 변수 이름 목록 (유효 키: API_KEY)

Returns

Record<string, string> — key: 환경 변수 이름, value: 해당 값 (설정되지 않은 변수는 결과에서 제외)

CLI

mono-rele2-utils-cli envGetTool <keys>

keys type definition

// @julong/mono-rele2-utils 환경 변수 키 목록
//   "API_KEY"

// MCP client config 예시:
// {
//   "mcpServers": {
//     "@julong/mono-rele2-utils": {
//       "command": "npx",
//       "args": ["-y", "@julong/mono-rele2-utils"],
//       "env": {
//         "API_KEY": "<value>"
//       }
//     }
//   }
// }

Examples

mono-rele2-utils-cli envGetTool '["API_KEY"]'
# → {
  "API_KEY": "<value>"
}