Text Slugifier
text.slugify
Overview
Deterministic slug generator: lowercases, trims, replaces spaces/underscores with hyphens, removes non-alphanumeric characters, collapses multiple hyphens, and enforces a maximum length with safe truncation.
URL slugs need consistent rules — we lower-case, hyphenate, and truncate deterministically so you never depend on model formatting.
Reliability
STRICT and deterministic — identical input always yields identical slug. Max length 80, truncated on a character boundary with any trailing hyphen removed. Input validation (not retryable): missing or non-string text; text larger than 2,048 UTF-8 bytes.
Context footprint
Replaces ~200 tokens of LLM reasoning (prompt + generation) with a single tool call. Eliminates ambiguity about hyphenation, casing, and special character handling. A successful call costs 1 execution credit.
When to use it
When you need a URL-safe slug from a title, name, or label.
Do not use for non-Latin script transliteration (CJK, Arabic, Cyrillic stay dropped), full URL encoding, or globally unique IDs (use platform.entropy_token).
Scope
Non-goals
- Does not transliterate non-Latin scripts (CJK, Arabic, Cyrillic)
- Does not generate unique slugs or check for collisions
- Does not perform URL encoding — output is already URL-safe
Properties
Capabilities
Cost & billing
Flat rate per invocation
File handling
How we handle your data
What this means
This skill may receive sensitive content and may return submitted, transformed, extracted, or reformatted content.
Squillify guarantees
- Runs inside Squillify
- This skill runs inside Squillify.
- Payloads are not sent to an external service by this skill.
- Squillify does not permanently store submitted payloads.
- Telemetry records metadata only, not submitted content.
- Submitted payloads are not used for training.
- Submitted payloads are not reviewed by humans.
- This skill does not target sensitive data.
- The response may contain submitted or transformed content.
Your responsibility
Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
| text | string | Yes | Title, name, or label to slugify under the UTF-8 byte ceiling. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| slug | string | Yes | Lowercase ASCII slug or empty when no character survives. |
API contract
POST /v1/executecurl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"text.slugify","input":{"text":"Hello World"}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("text.slugify", {"text":"Hello World"});Errors
| Code | HTTP | Retryable | Description |
|---|---|---|---|
| VALIDATION_ERROR | 400 | No | The request payload failed schema validation. |
| UNAUTHORIZED | 401 | No | Missing or invalid API key. |
| SKILL_NOT_ACCESSIBLE | 403 | No | The API key is not granted access to this skill. |
| SKILL_NOT_AVAILABLE_FOR_PLAN | 403 | No | This skill is not included in your current plan. |
| PLAN_ELIGIBILITY_UNAVAILABLE | 503 | Yes | Plan eligibility could not be decided. Retry after backoff. |
| SKILL_NOT_FOUND | 404 | No | The requested skill or version does not exist. |
| TENANT_RATE_LIMITED | 429 | Yes | Request rate limit exceeded. Retry after backoff. |
| QUOTA_EXCEEDED | 429 | Yes | Plan quota exhausted. Retryable once the quota period resets. |
| EXECUTION_TIMEOUT | 504 | Yes | Execution exceeded the allowed time budget. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 KiB |
Limitations
- Does not transliterate non-Latin scripts (CJK, Arabic, Cyrillic)
- Does not generate unique slugs or check for collisions
- Does not perform URL encoding — output is already URL-safe
- Full URL encoding (use a URL encoder instead)
- Non-Latin script transliteration (use a dedicated transliterator)
- Generating globally unique identifiers (use platform.entropy_token)
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "text.slugify",
"input": {
"text": "Hello World"
}
}Examples
Basic usage
{
"text": "Hello World"
}{
"slug": "hello-world"
}Accented Latin characters
{
"text": "Café — résumé (2026)"
}{
"slug": "cafe-resume-2026"
}Collapse repeated separators
{
"text": "Q3 Report -- Draft___v2"
}{
"slug": "q3-report-draft-v2"
}Empty after cleaning
{
"text": "!!!"
}{
"slug": ""
}Recommended use cases
- Generate URL-friendly slugs from article titles or product names
- Create stable identifiers from human-readable strings
- Sanitize user input for use in file paths or database keys
Avoid for
- Full URL encoding (use a URL encoder instead)
- Non-Latin script transliteration (use a dedicated transliterator)
- Generating globally unique identifiers (use platform.entropy_token)
Related skills
Composable with
Safety & privacy
- Runs without calling any external service.
- Your payloads are never stored permanently.
- Telemetry captures metadata only — never your payload contents.
- We never train models on your payloads.
- No human reviews your payloads.