for-each-line

Processes each line of a file through the zo CLI to transform or extract data.

Updated Sep 5, 2026
One-click install
npx skills add https://github.com/SillyHippy/zo-skills --skill for-each-line-sillyhippy
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: for-each-line
Source: https://github.com/SillyHippy/zo-skills/tree/main/skills/zo-for-each-line
Command: npx skills add https://github.com/SillyHippy/zo-skills --skill for-each-line-sillyhippy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Applying AI processing to every line of a file manually is slow and error-prone. This Skill automates line-by-line transformation or extraction using the zo command-line tool, with incremental writes so partial results survive crashes. ## Core Features & Use Cases - Line-by-Line AI Processing: Sends each file line to the zo CLI with a custom instruction and structured JSON output schema. - Crash-Safe Incremental Writes: Flushes results after every line so progress is preserved if the script fails mid-run. - Test-Before-Batch Protocol: Validates the prompt and output format on the first line and asks for user confirmation before processing the full file. - Use Case: Extract email addresses from a 500-line contact dump, or translate each line of a text file, with results streaming into an output file you can watch live. ## Quick Start Process each line of input.txt with the zo tool to extract the email address from every line and write the results to output.txt.

Frequently Asked Questions about for-each-line

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I process a file line by line with an AI model?▼

Use a Python script that reads the file with splitlines, sends each line to the zo CLI with your instruction and a JSON output schema, and writes results incrementally. Test the prompt on the first line before running the full batch.

How to get structured JSON output from the zo CLI?▼

Pass the --output-format flag with an OpenAI-style JSON schema to the zo command. Keep schemas flat at one to two levels deep for best results, and parse the response from stdout as JSON.

What happens if the line processing script crashes mid-run?▼

Results are flushed to the output file after every line, so all completed lines are preserved. You can inspect the partial output and restart or resume processing from where it stopped.

Why does the script process lines sequentially instead of in parallel?▼

Each zo call is independent and waits for the previous line with a 70-second timeout, ensuring ordered output and avoiding rate or resource contention. Parallel execution is not part of the protocol.

What are the limitations of per-line AI processing?▼

Each zo call is independent with no memory of previous lines, so all required context must be included in every prompt. Large files take significant time since each line requires a separate model call.