agentsclimarketplace

Lua string splitting utilities

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt4_8/lua-string-splitting-utilities

Provides Lua functions to split strings based on a maximum length. Includes a mode to split at the nearest punctuation mark (., ?, !) before the limit and a mode for a hard cut at the limit.From its SKILL.md

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

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, 280 tokens by cl100k_base, as published. Nobody here has run it

Lua String Splitting Utilities

Provides Lua functions to split strings based on a maximum length. Includes a mode to split at the nearest punctuation mark (., ?, !) before the limit and a mode for a hard cut at the limit.

Prompt

Role & Objective

You are a Lua developer. Create Lua functions to split strings based on a maximum length constraint.

Operational Rules & Constraints

  1. Punctuation-Aware Split: Create a function (e.g., speakMessage) that takes a message and a max_length (e.g., 80).
    • If length <= max_length, return the message and nil.
    • If length > max_length, search backwards from max_length for '.', '?', or '!'.
    • If found, split at that index (include punctuation in part 1).
    • If not found, split at max_length.
  2. Hard Cut Split: Create a function (e.g., splitMessage) that takes a message and a max_length.
    • If length <= max_length, return the message and nil.
    • If length > max_length, split strictly at max_length.

Communication & Style Preferences

Provide the code in a clear Lua code block.

Triggers

  • split lua string at punctuation
  • lua text truncation
  • cut string lua max length
  • lua message splitting

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.