regex-vs-llm-structured-text

regex-vs-llm-structured-text is a skill for Claude Code, Codex from jxoesneon/Ciel. It costs 32 tokens per session (578 once invoked), scanned A, original, Apache-2.0.

A decision framework for extracting structured information from text with regular expressions, using a language model only for unusual or uncertain cases.

In plain words
What is it for?
It is for designing parsing pipelines, checking extraction confidence, handling large documents, and deciding when text needs language-model review.
Why use it?
It avoids sending every item to a language model when predictable text can be processed faster and more consistently with fixed patterns.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It is for designing parsing pipelines, checking extraction confidence, handling large documents, and deciding when text needs language-model review.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jxoesneon/ciel/regex-vs-llm-structured-text
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add jxoesneon/Ciel --skill regex-vs-llm-structured-text
Clone the repo
git clone --depth 1 https://github.com/jxoesneon/Ciel

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for regex-vs-llm-structured-text

README.md
[![agentmods](https://agentmods.dev/badge/skills/jxoesneon/ciel/regex-vs-llm-structured-text/github.svg)](https://agentmods.dev/skills/jxoesneon/ciel/regex-vs-llm-structured-text)
Your own site
<a href="https://agentmods.dev/skills/jxoesneon/ciel/regex-vs-llm-structured-text"><img src="https://agentmods.dev/badge/skills/jxoesneon/ciel/regex-vs-llm-structured-text/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for regex-vs-llm-structured-text

Your own site · 80×15
<a href="https://agentmods.dev/skills/jxoesneon/ciel/regex-vs-llm-structured-text"><img src="https://agentmods.dev/badge/skills/jxoesneon/ciel/regex-vs-llm-structured-text.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 578 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00032 $0.00578
Opus 5 $0.00016 $0.00289
Sonnet 5 $0.00006 $0.00116
Haiku 4.5 $0.00003 $0.00058

Measured 7d ago against content hash d859837cd7ce, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

regex-vs-llm-structured-text scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/regex-vs-llm-structured-text/SKILL.md · 55 lines

What it actually says

CIEL ADAPTATION: Regex vs. LLM (Parsing Strategy)

This skill provides a decision framework for structured text extraction, prioritizing deterministic speed (Regex) for the common case and reserving LLM reasoning for the long tail.

The Hybrid Pipeline Pattern

  1. Regex Parser (95%): Attempt to extract structure using deterministic regular expressions. Optimized for speed and cost.
  2. Confidence Scorer: Programmatically flag items that deviate from expected patterns (e.g., missing fields, short text).
  3. LLM Validator (5%): Dispatch low-confidence items to a cheap LLM (e.g., Haiku) for intelligent extraction/fixing.

Decision Matrix

  • Use Regex IF: The format is consistent (>90% repeating), and you need deterministic speed.
  • Use LLM IF: The text is free-form, highly variable, or the regex parser returns low confidence (<0.95).

Efficiency Metrics (Target)

  • Cost Savings: >90% reduction compared to an all-LLM pipeline.
  • Accuracy: >99% combined accuracy (Regex speed + LLM reasoning).
  • Latency: Near-instant processing for the majority of inputs.

Implementation Standards

  • Chunking: For large documents, chunk the input to prevent regex timeouts.
  • Test-Driven Development: Write tests for known patterns first, then add LLM fallbacks for the edge cases.
  • Statelessness: Parsers should be pure functions that do not mutate input state.

Anti-Patterns

  • Brute Force LLM: Sending simple repeating forms to an LLM without an initial regex attempt.
  • Regex Purity: Attempting to write a 500-line regex to handle an edge case that an LLM can solve in one sentence.
  • Blind Faith: Assuming a regex "just works" without a programmatic confidence/validation check.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 55 lines · 32 tokens per session scan A d859837cd7ce

Subscribe to this mod's changes

regex-vs-llm-structured-text is a skill published in the GitHub repository jxoesneon/Ciel (1 stars, last pushed 3d ago), licensed Apache-2.0. It adds 32 tokens to every session and 578 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

ralph-prompt-generator

Use when a user has a rough prompt that needs a staged prompt-improvement workflow for $ralph-wiggum-codex, with saved draft/final files and explicit review checkpoints.

MattMagg/ralph-wiggum-codex · 44 tokens

opik-optimizer

Optimize LLM prompts, tools, and agents in Opik using standardized optimizer workflows (prompt optimization, tool optimization, and parameter tuning), dataset/metric wiring, and result interpretation.

vincentkoc/dotskills · 41 tokens

proxy-local-ai-subscriptions

A guide for exposing your local Codex, ChatGPT Codex, or Claude Code subscription through a protected local OpenAI-compatible endpoint, then connecting it to NextClaw as a custom provider.

Peiiii/nextclaw · 126 tokens

prompt-craft

Translate natural language image descriptions into detailed, structured DALL-E prompts with subject, style, composition, lighting, and mood specifications.

vladkesler/initrunner · 30 tokens

llm-prompt-optimizer

Use when improving prompts for any LLM. Applies proven prompt engineering techniques to boost output quality, reduce hallucinations, and cut token usage.

tmolavi/mcp-agent-skills-hub · 35 tokens

prompt-optimizer

Analyze raw prompts, identify intent and gaps, match ECC components (skills/commands/agents/hooks), and output a ready-to-paste optimized prompt. Advisory role only — never executes the task itself. TRIGGER when: user says "optimize prompt", "improve my prompt", "how to write a prompt for", "help me prompt", "rewrite…

Jamkris/everything-gemini-code · 179 tokens