error-pattern-safety

Prevent infinite loops in JavaScript or Go regex processing with zero-width match safety rules.

Updated Feb 26, 2026
One-click install
npx skills add https://github.com/kaushal-waygood/agentic-self-healing-ci --skill error-pattern-safety-kaushal-waygood
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: error-pattern-safety
Source: https://github.com/kaushal-waygood/agentic-self-healing-ci/tree/main/skills/error-pattern-safety
Command: npx skills add https://github.com/kaushal-waygood/agentic-self-healing-ci --skill error-pattern-safety-kaushal-waygood

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guideline helps developers prevent infinite loops in regex matching by identifying and mitigating zero-width patterns that stall execution.

Core Features & Use Cases

  • Pattern safety rules to prevent empty-string matches and ensure at least one character is required.
  • Testing templates and examples for validating patterns against empty strings and real-world logs.
  • Language translation guidance for converting patterns safely between Go and JavaScript.

Quick Start

Apply the error-pattern safety guidelines to a given regex to prevent infinite loops.

Frequently Asked Questions about error-pattern-safety

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

FAQPage Schema
How do I prevent infinite loops caused by zero-width regex matches?

Convert regex patterns safely between Go and JavaScript by applying documented language translation guidance that accounts for engine differences, ensuring safe pattern conversion and preventing zero-width match issues across both environments.

Why does my regex pattern stall execution on empty strings?

Regex patterns stall execution when they allow zero-width matches on empty strings. Applying error-pattern safety guidelines enforces rules requiring at least one character, mitigating infinite loops during pattern processing.

How do I test regex patterns for safety against empty strings and logs?

Test regex patterns for safety using provided testing templates that validate against empty strings and real-world logs, ensuring pattern safety across monitoring pipelines and preventing infinite loops.

Can I safely convert regex patterns between Go and JavaScript?

You can safely convert regex patterns between Go and JavaScript using documented language translation guidance, ensuring safe pattern conversion and preventing zero-width match issues across both environments.

Does this error-pattern safety approach work for QA teams validating monitoring pipelines?

Error-pattern safety guidelines apply to QA teams validating pattern safety across monitoring pipelines by providing testing strategies and rules to prevent zero-width matches and infinite loops in JavaScript and Go regex engines.