wc-chars-tool for Openclaw

A robust Unicode-aware character counting utility that handles CJK characters, grapheme clusters, and detailed text metrics.

dinghaibin
v1.0.0
May 11, 2026
0
575
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install wc-chars-tool

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install wc-chars-tool using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is wc-chars-tool?

The wc-chars-tool is a high-performance utility designed for precise text analysis within the Openclaw Skills ecosystem. Unlike standard word count tools, this skill provides deep Unicode awareness, allowing developers to distinguish between raw code points and user-perceived characters (grapheme clusters). This is particularly vital for internationalization (i18n) and ensuring text fits within strict technical constraints like database column limits or API character caps.

By integrating this tool into your workflow, you gain the ability to analyze text with surgical precision. It supports diverse input methods including direct string arguments, piped stdin, and local file reading. Whether you are validating SMS message lengths or auditing content for CJK character density, this skill ensures your data meets requirements without the common pitfalls of multi-byte character encoding errors.

wc-chars-tool Use Cases

  • Validating length constraints for SMS, social media posts, and metadata fields.
  • Auditing internationalized content to detect and count CJK characters.
  • Calculating byte-offsets for low-level data storage and database schema compliance.
  • Analyzing user-perceived character counts in strings containing emojis and complex accents using grapheme cluster detection.

How wc-chars-tool Works

  1. The user provides text input via a direct command line argument, a piped stream (stdin), or by specifying a file path.
  2. The tool processes the input using a Unicode-aware engine that identifies character boundaries based on UTF-8 encoding.
  3. Depending on the flags provided (e.g., --graphemes or --cjk-only), the tool filters or groups the character data.
  4. The skill calculates specific metrics including total count, non-whitespace segments, and byte size.
  5. The results are returned as a standard terminal output or a structured JSON object for further automation.

wc-chars-tool Setup

To install and begin using this tool within the Openclaw Skills environment, use the following commands:

# Install the tool via your preferred package manager
npm install -g wc-chars-tool

# Verify installation by checking a simple string
wc-chars-tool "Openclaw Skills are awesome!"

wc-chars-tool Data Schema & Taxonomy

The tool provides structured data output when the --json flag is used. This allows for seamless integration with other Openclaw Skills or CI/CD pipelines.

Field Description Type
total Total character count (Unicode-aware) Integer
non_whitespace Characters excluding spaces, tabs, and newlines Integer
cjk_count Number of Chinese, Japanese, or Korean characters Integer
bytes Total byte size of the input string Integer
graphemes Count of user-perceived character clusters Integer

wc-chars-tool Advanced Features

  • Grapheme Cluster Support: Accurately counts complex emojis and accented characters that typically break standard counters.
  • JSON Export Mode: Enables easy piping of character metrics into monitoring tools or downstream scripts.
  • Detailed Breakdown: Use the --detailed flag to get a granular taxonomy of digits, punctuation, and letter distributions.
  • Multi-Source Input: Support for file-based processing allows for the analysis of large documents without memory overhead.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*