sdxc-strings

Provides English inflection, slugification, title casing, and grapheme-safe text truncation utilities.

5|Updated Feb 2, 2026
One-click install
npx skills add https://github.com/sergiodxa/monorepo --skill sdxc-strings-sergiodxa
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: sdxc-strings
Source: https://github.com/sergiodxa/monorepo/tree/main/.agents/skills/sdxc-strings
Command: npx skills add https://github.com/sergiodxa/monorepo --skill sdxc-strings-sergiodxa

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Codebases often duplicate string logic: a slug written by a form must match the slug a background job derives, labels read "1 comments", and excerpts cut text mid-emoji. This Skill documents the @sdxc/strings package, which centralizes these transformations in one dependency-free implementation. ## Core Features & Use Cases - English Inflection: pluralize, singularize, camelize, underscore, dasherize, humanize, and ordinalize for deriving identifiers and labels from class or field names. - Headline Casing & Slugs: Chicago-style titleize that keeps words like GraphQL and iOS intact, plus slugify for stable kebab-case URL identifiers. - Grapheme-Safe Text Measurement: truncate, excerpt, wordCount, initials, and capitalize built on Intl.Segmenter, so emoji and scripts without spaces are handled correctly. - Use Case: A form accepts a title like "Cómo usar Remix v3" and a background job must derive the identical slug como-usar-remix-v3 so the published URL never moves. ## Quick Start Ask the agent to add the @sdxc/strings workspace dependency and use its slugify, titleize, or excerpt functions to generate a slug, headline, or summary from your text.

Frequently Asked Questions about sdxc-strings

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a URL slug from a title in JavaScript?▼

Use the slugify function from @sdxc/strings, which converts titles like "Cómo usar Remix v3" into stable kebab-case identifiers such as "como-usar-remix-v3". It handles diacritics and produces slugs that match between forms and background jobs.

How do I pluralize or singularize English words in TypeScript?▼

The pluralize and singularize functions handle English inflection, including count-aware forms like pluralize("comment", 1) returning "comment". For words with non-derivable plurals, createInflector accepts irregular and uncountable vocabulary lists.

Does string truncation handle emoji and non-Latin scripts correctly?▼

Yes, truncate, excerpt, wordCount, initials, and capitalize all operate on grapheme clusters via Intl.Segmenter instead of UTF-16 code units. This prevents cutting mid-emoji and gives correct counts for scripts written without spaces.

What is the difference between truncate and excerpt?▼

truncate cuts mid-word and counts the omission marker toward the length limit. excerpt first collapses whitespace runs and cuts at a word boundary, which turns multi-paragraph source text into a clean one-line summary.

When should I not use English inflection on user text?▼

Inflection and headline casing follow English rules only, so text a user typed into a field should be kept as written. Translated copy arrives already cased by its own language's conventions and should not be re-cased.