split_skill
- Python
9
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill bdambrosio/cognitive_workbench --skill split- Skill.md1.4 KB
Overview
This skill transforms a single Note into a Collection by splitting its content into individual Notes. It supports JSON arrays, JSON objects with an array field, JSONL, and plain text segmented by sentence, paragraph, line, or a custom delimiter. The result is a Collection of Notes, one per element or segment, with empty segments filtered out.
How this skill works
You provide a Note (variable or ID) as the target and an output variable name. For JSON objects, specify the array field name; for plain text choose a delimiter mode (sentence, paragraph, line, or custom string). The skill parses the Note, extracts elements or segments, creates one Note per item, and returns those Notes as a Collection. It validates input and returns a failure state for unsupported shapes or when no items can be split.
When to use it
- You have a Note containing a JSON array and need each element as an individual Note.
- A Note stores JSONL (newline-delimited JSON) and you want one Note per JSON line.
- You have a long text Note and want to split it into sentences, paragraphs, or lines for processing.
- A JSON object Note contains an array under a specific field and you need to operate on each element separately.
- You need to convert a single aggregated Note into a Collection for batch processing or parallel workflows.
Best practices
- Ensure the target is a Note, not already a Collection; splitting a Collection is unnecessary.
- Validate the Note content format before calling split to avoid JSON structure errors.
- Use the field parameter only for JSON objects that contain the desired array.
- Prefer sentence/paragraph/line modes for plain text; use a custom delimiter when text uses a specific separator.
- Handle the failed return state: check for invalid JSON, wrong target type, or no splittable items.
Example use cases
- Turn a Note containing ['a','b','c'] into a Collection of three Notes for parallel annotation.
- Split JSONL logs stored in a Note into individual Notes for line-by-line analysis.
- Break a long research Note into paragraphs so each paragraph can be summarized separately.
- Extract items from a JSON object field (e.g., comments array) into individual Notes for moderation.
- Split a transcript Note into sentences for sentence-level NLP pipelines.
FAQ
JSON arrays, JSON objects with an array field, JSONL, and plain text (sentence, paragraph, line, or custom delimiter).
What causes split to fail?
Passing a Collection as target, invalid JSON structure, or finding no items to split will return a failed state.