bad--name

Detect consecutive hyphens in strings and normalize or reject them.

23.2k|2.2k|Updated Dec 31, 2025
One-click install
npx skills add https://github.com/can1357/oh-my-pi --skill bad-name
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bad--name
Source: https://github.com/can1357/oh-my-pi/tree/main/packages/coding-agent/test/fixtures/skills/consecutive-hyphens
Command: npx skills add https://github.com/can1357/oh-my-pi --skill bad-name

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps identify and manage strings that contain consecutive hyphens, preventing issues in identifiers, slugs, and file names.

Core Features & Use Cases

  • Consecutive hyphen detection: flags inputs that contain two or more hyphens in a row.
  • Normalization options: optionally collapse runs of hyphens to a single hyphen or enforce a strict hyphen rule.
  • Use Case: when generating slugs for URLs or creating safe filenames, this skill ensures inputs conform to hyphenation rules.

Quick Start

Validate the string 'bad--name' and return a normalized version or an error if consecutive hyphens are not allowed.

Frequently Asked Questions about bad--name

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

FAQPage Schema
How do I validate strings with consecutive hyphens for URL slugs?

Consecutive hyphen validation detects runs of two or more hyphens in strings. It flags inputs containing invalid hyphen sequences for slug generation and filename normalization to prevent malformed identifiers.

What's the best way to normalize filenames with multiple consecutive hyphens?

Filename normalization collapses consecutive hyphen runs into a single hyphen. It applies rule-based checks to enforce strict hyphenation rules, ensuring safe filenames by either replacing or rejecting invalid sequences.

Why do I need to check for consecutive hyphens in identifiers?

Checking for consecutive hyphens prevents invalid identifiers in URL slugs and file names. Strings with multiple hyphens in a row can break routing logic or cause unexpected behavior in systems expecting clean identifiers.

Can I reject inputs with consecutive hyphens instead of normalizing them?

Yes, consecutive hyphen validation offers normalization options or rejection when needed. You can enforce strict hyphen rules that return an error for invalid strings instead of automatically collapsing the hyphen runs.

Does string validation for hyphens work with any text input?

String validation for hyphens applies to any text input requiring identifier normalization. It processes strings to detect and manage consecutive hyphen patterns regardless of the specific input source or context.

What are the limitations of rule-based hyphen normalization?

Rule-based hyphen normalization focuses specifically on consecutive hyphen detection and collapsing. It does not handle other identifier validation concerns like character encoding, length limits, or restricted character sets beyond hyphen runs.