Agent skill

Corvus Ecma Regex

by corvus-dotnet in corvus-dotnet/Corvus.JsonSchema

Translate ECMAScript 262 /u mode regular expressions to .NET regex patterns.

Apache-2.0Auto-check passedWriting & Content

Install Corvus Ecma Regex

skills CLI
$ npx skills add corvus-dotnet/Corvus.JsonSchema --skill corvus-ecma-regex -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install corvus-dotnet/Corvus.JsonSchema corvus-ecma-regex --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/corvus-dotnet/Corvus.JsonSchema.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/corvus-ecma-regex .claude/skills/corvus-ecma-regex && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
corvus-ecma-regex
GitHub stars
199
Token cost
~1k tokens
SKILL.md length
311 words
Files
1
Skills in repo
28
Repo updated
First seen
Licence
Apache-2.0

At a glance

Translate ECMAScript 262 /u mode regular expressions to .NET regex patterns.

  • : understanding regex translation in generated validation code
  • SKILL.md covers Entry Point API, Translation Examples, Why Translation Is Needed and Key Translation Rules, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Debugging pattern matching issues in JSON Schema pattern/patternProperties

What it does

Corvus Ecma Regex is an agent skill from corvus-dotnet/Corvus.JsonSchema. Translate ECMAScript 262 /u mode regular expressions to .NET regex patterns. Covers semantic differences between ECMAScript and .NET regex engines, supplementary code point handling via surrogate pairs, Unicode property escapes, backreference conditionals, character class strategies, and strict /u mode validation. USE FOR: understanding regex translation in generated validation code, debugging pattern matching issues in JSON Schema pattern/patternProperties, extending regex support for new Unicode properties or…

Its SKILL.md is about 1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Writing & Content, covering Translation. It works with JavaScript and .NET. The repository describes itself as: Support for Json Schema validation and entity generation. The licence is Apache-2.0.

When your agent uses it

  • : understanding regex translation in generated validation code
  • Debugging pattern matching issues in JSON Schema pattern/patternProperties
  • Extending regex support for new Unicode properties
  • : general .NET regex usage

Example prompts

  • “/corvus-ecma-regex”

What it can do on your machine

Read from SKILL.md and the folder at commit 973097f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are csharp).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Corvus Ecma Regex loads about 1k tokens when it runs. Until then it costs about 155 tokens; SKILL.md has 311 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~155
When it runs · the whole SKILL.md, loaded when a task matches
~1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from corvus-dotnet/Corvus.JsonSchema at commit 973097f, republished under its Apache-2.0 licence (© corvus-dotnet). 311 words, ~1,038 tokens.

Download SKILL.mdSave it as .claude/skills/corvus-ecma-regex/SKILL.md (or your agent's skills folder).
name
corvus-ecma-regex
description
Translate ECMAScript 262 /u mode regular expressions to .NET regex patterns. Covers semantic differences between ECMAScript and .NET regex engines, supplementary code point handling via surrogate pairs, Unicode property escapes, backreference conditionals, character class strategies, and strict /u mode validation. USE FOR: understanding regex translation in generated validation code, debugging pattern matching issues in JSON Schema pattern/patternProperties, extending regex support for new Unicode properties or constructs. DO NOT USE FOR: general .NET regex usage, writing custom regex patterns.

ECMAScript Regex Translation

Entry Point API

The translator is in src/Corvus.Text.Json.CodeGeneration/EcmaRegexTranslator.cs:

csharp
// Translate an ECMAScript /u mode pattern to .NET
string dotnetPattern = EcmaRegexTranslator.Translate(@"\d+\.\d+");

// Non-throwing variant with span output
OperationStatus status = EcmaRegexTranslator.TryTranslate(
    ecmaPattern, buffer, out int charsWritten);

// Safe fallback — returns original pattern if translation fails
string pattern = EcmaRegexTranslator.TranslateOrFallback(ecmaPattern);

Translation Examples

ECMAScript Pattern.NET TranslationReason
.[^\n\r\u2028\u2029]Dot excludes specific line terminators
$\zECMAScript $ matches only at the end; .NET $ also matches before a final \n
\d[0-9]ASCII digits only
\u{1F600}(?:\uD83D\uDE00)Supplementary char → surrogate pair
(a)\1(a)(?(1)\1)Backreference wrapped in conditional
[a\D](?:[a]|[^0-9])Negated shorthand in class uses alternation

Why Translation Is Needed

JSON Schema's pattern keyword uses ECMAScript regex semantics (ECMA 262 /u mode). .NET's System.Text.RegularExpressions has different semantics for several constructs. The translator converts ECMAScript patterns to equivalent .NET patterns.

Key Translation Rules

Character Class Shorthands
ECMAScript.NET TranslationReason
\d[0-9].NET \d matches Unicode digits; ECMAScript only ASCII
\w[a-zA-Z0-9_].NET \w matches Unicode word chars
\sExplicit ECMAScript whitespace setDifferent whitespace sets
.[^\n\r\u2028\u2029]ECMAScript excludes 4 line terminators
Word Boundaries

\b → explicit lookaround assertions using ASCII word characters only (ECMAScript definition).

Supplementary Code Points

\u{XXXXX} (code points above U+FFFF) → (?:\uHHHH\uLLLL) surrogate pair in .NET.

Backreferences

ECMAScript treats non-participating groups as always-matching. Translated to: (?(N)\N) — .NET conditional syntax that checks if group N participated.

Unicode Property Escapes

\p{Script=Latin} → expanded character class ranges (34 BMP + 5 supplementary ranges).

Binary properties like \p{Emoji} → equivalent .NET character class unions.

Performance Characteristics

The translator is zero-allocation using:

  • ref struct translator type
  • stackalloc for small intermediate buffers
  • ArrayPool<char> for larger buffers

The translated regex pattern is then compiled using RegexOptions.Compiled for repeated use in validation.

Regex Pattern Classification (at code-gen time)

Before translating, the code generator classifies patterns:

ClassificationExampleOptimization
Noop.*, [\s\S]*Skip validation entirely
NonEmpty.+, .Some character that is not a line terminator
Prefix^fooStartsWith("foo")
Range^.{1,256}$, ^.*$, ^.+$No line terminator, and a length in range
FullRegexEverything elseFull compiled regex

Cross-References

  • For the evaluator that uses translated patterns, see corvus-standalone-evaluator
  • For the keyword that drives pattern validation, see corvus-keywords-and-validation
  • Full reference: docs/EcmaRegexTranslator.md, docs/EcmaRegexTranslations.md

© corvus-dotnet, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .github/skills/corvus-ecma-regex of corvus-dotnet/Corvus.JsonSchema.

Open the folder on GitHubat commit 973097f

Compare with similar skills

Corvus Ecma Regex next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Corvus Ecma Regex compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Corvus Ecma Regex this skillcorvus-dotnet/Corvus.JsonSchema199—~1kAutomated safety check: PassApache-2.0
Translatetagspaces/tagspaces5.3k—~2.2kAutomated safety check: PassAGPL-3.0
Stylexpurefunctor/purescript-iris117—~2.7kAutomated safety check: PassCustom licence
Frappe Core TranslationImpertio-Studio/Frappe_Claude_Skill_Package188—~1.9kAutomated safety check: PassMIT
Azure AI Translation TSmicrosoft/skills3.1k—~2kAutomated safety check: PassMIT
Error Translatorlaolaoshiren/claude-code-skills-zh879—~609Automated safety check: PassMIT

Similar skills

  • Translate

    tagspaces/tagspaces

    Translate new or untranslated i18n strings from the English locale files (core.json + peri.json) into all other locales, maintaining consistency with each language's existing translations.

    5.3k GitHub stars~2.2k tokensUpdated 3 days ago
    Writing & ContentAuto-check passed
  • Stylex

    purefunctor/purescript-iris

    Write StyleX styles in PureScript with Iris through the built-in Iris.StyleX, Iris.StyleX.When, and Iris.StyleX.Types modules, which Iris compiles to @stylexjs/stylex calls.

    117 GitHub stars~2.7k tokensUpdated yesterday
    Writing & ContentAuto-check passed
  • Frappe Core Translation

    Impertio-Studio/Frappe_Claude_Skill_Package

    A skill your agent uses when implementing translations/i18n in Frappe v14-v16 apps.

    188 GitHub stars~1.9k tokensUpdated 22 days ago
    Writing & ContentAuto-check passed
  • Azure AI Translation TS

    microsoft/skills

    Official

    Build translation applications using Azure Translation SDKs for JavaScript (@azure-rest/ai-translation-text, @azure-rest/ai-translation-document).

    3.1k GitHub stars~2k tokensUpdated yesterday
    Writing & ContentAuto-check passed
  • Error Translator

    laolaoshiren/claude-code-skills-zh

    编程错误消息翻译专家 — 将英文错误消息翻译成中文,解释原因并提供修复方案

    879 GitHub stars~609 tokensUpdated 4 days ago
    Writing & ContentAuto-check passed
  • Module Level Code Translator

    ArabelaTso/Skills-4-SE

    Translate source code between programming languages at function, class, and module levels while preserving behavior and generating verification tests.

    253 GitHub stars~1.9k tokensUpdated 1 mo ago
    Writing & ContentAuto-check passed

More from corvus-dotnet/Corvus.JsonSchema

All 28 skills in this repo
  • Corvus Analyzers

    corvus-dotnet/Corvus.JsonSchema

    Understand and work with the Roslyn analyzers shipped with Corvus.Text.Json.

    199 GitHub stars~876 tokensUpdated today
    Auto-check passed
  • Corvus Benchmarks

    corvus-dotnet/Corvus.JsonSchema

    Run, interpret, and maintain BenchmarkDotNet benchmarks for JSON Schema validation and query languages.

    199 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Corvus Bowtie Testing

    corvus-dotnet/Corvus.JsonSchema

    Test Corvus.JsonSchema against the JSON Schema Test Suite using Bowtie, the cross-implementation meta-validator.

    199 GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Corvus Buffer And Pooling

    corvus-dotnet/Corvus.JsonSchema

    Write allocation-efficient buffer code in Corvus.JsonSchema using the codebase's established three-tier pooling pattern: stackalloc → ArrayPool → ThreadStatic caches.

    199 GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Corvus Bytes To Bytes

    corvus-dotnet/Corvus.JsonSchema

    Eliminate hand-rolled POCO record<-document string seams — types/paths that materialize a managed string (or List<string/Dictionary) between a bytes SOURCE (a parsed UTF-8 body, a DB column, a…

    199 GitHub stars~3k tokensUpdated today
    Auto-check passed
  • Corvus Codegen

    corvus-dotnet/Corvus.JsonSchema

    Generate strongly-typed C from JSON Schema using the Roslyn source generator or the corvusjson CLI tool.

    199 GitHub stars~2.1k tokensUpdated today
    Auto-check passed

Works with

Questions about Corvus Ecma Regex

What does Corvus Ecma Regex do?

Translate ECMAScript 262 /u mode regular expressions to .NET regex patterns. JsonSchema.NET regex patterns.

When should I use Corvus Ecma Regex?

Corvus Ecma Regex fits situations like: : understanding regex translation in generated validation code; debugging pattern matching issues in JSON Schema pattern/patternProperties; extending regex support for new Unicode properties; : general .NET regex usage.

How do I install Corvus Ecma Regex in Claude Code?

Run `npx skills add corvus-dotnet/Corvus.JsonSchema --skill corvus-ecma-regex -a claude-code`. Or copy the skill folder (.github/skills/corvus-ecma-regex in corvus-dotnet/Corvus.JsonSchema) into .claude/skills/corvus-ecma-regex in your project. Claude Code loads it when a task matches its description.

How do I install Corvus Ecma Regex in Codex?

Run `npx skills add corvus-dotnet/Corvus.JsonSchema --skill corvus-ecma-regex -a codex`. Or copy the skill folder (.github/skills/corvus-ecma-regex in corvus-dotnet/Corvus.JsonSchema) into .agents/skills/corvus-ecma-regex in your project. Codex loads it when a task matches its description.

Can I use Corvus Ecma Regex in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add corvus-dotnet/Corvus.JsonSchema --skill corvus-ecma-regex -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/corvus-ecma-regex, .gemini/skills/corvus-ecma-regex, .github/skills/corvus-ecma-regex and .opencode/skills/corvus-ecma-regex in your project.

What does Corvus Ecma Regex need to run?

SKILL.md names no scripts, command-line tools or credentials: Corvus Ecma Regex is instructions for the agent only.

Does Corvus Ecma Regex access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Corvus Ecma Regex safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Corvus Ecma Regex use?

Corvus Ecma Regex is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Corvus Ecma Regex use?

About 1k tokens (SKILL.md is roughly 4.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Corvus Ecma Regex?

Skills that share tags, products or a category with Corvus Ecma Regex: Translate (tagspaces/tagspaces, 5.3k stars), Stylex (purefunctor/purescript-iris, 117 stars), Frappe Core Translation (Impertio-Studio/Frappe_Claude_Skill_Package, 188 stars) and Azure AI Translation TS (microsoft/skills, 3.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Corvus Ecma Regex?

corvus-dotnet (a GitHub organization) maintains it in corvus-dotnet/Corvus.JsonSchema, which has 199 GitHub stars. The repository holds 28 skills in this directory. The repository was last updated on October 9, 2026.

Source: corvus-dotnet/Corvus.JsonSchema on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.