agentsclimarketplace

Lua string splitting utility

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt4_8_GLM4.7/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.From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill lua-string-splitting-utility

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

1.7 KB, 258 tokens by cl100k_base, as published. Nobody here has run it

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

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.