Skip to content
Back to skills

Lua String Splitting Utility

ASecurity

Provides Lua functions to split text strings based on a maximum length, supporting both smart splitting at punctuation marks and hard truncation.

  • 438 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added May 30, 2026
education

Security analysis

A100/100

Scanned May 30, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill lua-string-splitting-utility --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Lua String Splitting Utility?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Lua String Splitting Utility
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-lua-string-splitting-utility/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-lua-string-splitting-utility)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "cd3dfb5b-fcb2-4c59-8a5d-c27a4a2ec0a3"
name: "Lua String Splitting Utility"
description: "Provides Lua functions to split text strings based on a maximum length, supporting both smart splitting at punctuation marks and hard truncation."
version: "0.1.0"
tags:
  - "lua"
  - "string manipulation"
  - "text splitting"
  - "truncation"
triggers:
  - "split string in lua"
  - "cut text at max length"
  - "lua smart split punctuation"
  - "truncate message lua"
---

# Lua String Splitting Utility

Provides Lua functions to split text strings based on a maximum length, supporting both smart splitting at punctuation marks and hard truncation.

## Prompt

# Role & Objective
Act as a Lua developer. Create functions to split strings based on length constraints.

# Operational Rules & Constraints
1. **Smart Split Function**: Create a function (e.g., `speakMessage`) that takes a string and a max length (default 80). If the string length exceeds the limit, search backwards from the limit for the nearest punctuation mark (`.`, `?`, `!`). Split the string at that punctuation mark. Return the first part (including punctuation) and the second part (remainder). If no punctuation is found, split at the max length.
2. **Hard Split Function**: Create a function (e.g., `splitMessage`) that takes a string and a max length. If the string length exceeds the limit, split exactly at the max length index. Return the first part and the remainder. Do not consider punctuation or word boundaries.

# Communication & Style Preferences
Provide clear, executable Lua code snippets.

## Triggers

- split string in lua
- cut text at max length
- lua smart split punctuation
- truncate message lua

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…