Agent skill

Arkregex

by aidenlx in aidenlx/zotlit

Typed regex authoring with arkregex in this repo. An agent skill from aidenlx/zotlit.

AGPL-3.0Auto-check passed

Install Arkregex

skills CLI
$ npx skills add aidenlx/zotlit --skill arkregex -a claude-code

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

GitHub CLI
$ gh skill install aidenlx/zotlit arkregex --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/aidenlx/zotlit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/arkregex .claude/skills/arkregex && 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
arkregex
GitHub stars
1k
Token cost
~952 tokens
SKILL.md length
314 words
Files
1
Skills in repo
16
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Typed regex authoring with arkregex in this repo. An agent skill from aidenlx/zotlit.

  • Edit a regular expression in TypeScript — especially one with named
  • SKILL.md covers What inference buys you, When to reach for it, House rules and Library API reference
  • Needs ANNOT_KEY
  • Positional capture groups

What it does

Arkregex is an agent skill from aidenlx/zotlit. Typed regex authoring with arkregex in this repo. Use whenever you write or edit a regular expression in TypeScript — especially one with named or positional capture groups, anywhere .exec() / .match() results are read in code, or when reaching for new RegExp(...). Also use when migrating existing RegExp call sites or escaping dynamic literals into a pattern.

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

It works with TypeScript. The repository describes itself as: Bring your Zotero library into Obsidian. Create literature notes, insert citations, and annotate PDFs without leaving your vault. The licence is AGPL-3.0.

When your agent uses it

  • Edit a regular expression in TypeScript — especially one with named
  • Positional capture groups
  • Anywhere .exec() / .match() results are read in code
  • Reaching for new RegExp(...)

Example prompts

  • “/arkregex”

Requirements

  • A credential in ANNOT_KEY

What it can do on your machine

Read from SKILL.md and the folder at commit 27f5752. 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 typescript).

    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 these keys or tokens, usually read from environment variables:

    • ANNOT_KEY

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

Context cost

Arkregex loads about 952 tokens when it runs. Until then it costs about 95 tokens; SKILL.md has 314 words of instructions outside code blocks.

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

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 aidenlx/zotlit at commit 27f5752, republished under its AGPL-3.0 licence (© aidenlx). 314 words, ~952 tokens.

Download SKILL.mdSave it as .claude/skills/arkregex/SKILL.md (or your agent's skills folder).
name
arkregex
description
Typed regex authoring with arkregex in this repo. Use whenever you write or edit a regular expression in TypeScript — especially one with named or positional capture groups, anywhere `.exec()` / `.match()` results are read in code, or when reaching for `new RegExp(...)`. Also use when migrating existing `RegExp` call sites or escaping dynamic literals into a pattern.

arkregex

arkregex is a drop-in replacement for new RegExp() that infers literal types for capture groups and match strings — so .exec() / .match() results are typed instead of string | undefined at every index. Zero runtime cost; the value just is a RegExp. Best with TS 5.9+.

What inference buys you

ts
import { regex } from "arkregex";

const ok = regex("^ok$", "i");
// Regex<"ok" | "oK" | "Ok" | "OK", { flags: "i" }>

const semver = regex("^(\\d*)\\.(\\d*)\\.(\\d*)$");
// captures: [`${number}`, `${number}`, `${number}`]

const email = regex("^(?<name>\\w+)@(?<domain>\\w+\\.\\w+)$");
// names: { name: string; domain: `${string}.${string}` }

const m = email.exec(input);
if (m) m.groups.domain; // typed, no cast

Referencing a group that doesn't exist is a type error, not a runtime undefined.

When to reach for it

Default to regex(...) for any new regex. It's a zero-runtime type-inference wrapper. The payoff shows up whenever match results are consumed: typed named captures eliminate manual RegExpExecArray indexing and the cast soup that comes with it.

House rules

Prefer the bare regex("…") form
ts
import { regex } from "arkregex";

const ANNOT_KEY = regex(
  `^(?<itemKey>${ITEM_KEY_SOURCE})a${ITEM_KEY_SOURCE}(?:g(?<groupID>\\d+))?$`,
);
// names: { itemKey: string; groupID: string | undefined }

The parser handles template literals with interpolated source fragments — see apps/obsidian/src/services/note-index/parse.ts for a real example.

Reach for regex.as<Pattern, { captures: [...] } | { names: {...} }>("…") only when inference genuinely fails or the type errors out with Type is excessively deep…. Don't pre-emptively annotate; let inference do the work.

ts
const complexPattern = regex.as<`pattern-${string}`, { captures: [string] }>(
  "very-long-complex-expression-here",
);

Character ranges like [a-Z] infer as string rather than a literal union — combinatorial expansion would tank the type system. Inferred types are imprecise-but-correct, never wrong.

Do not wrap the pattern in String.raw`…`

String.raw widens to plain string and defeats arkregex's literal-type parser — you lose all the capture-group typing.

ts
// BAD — type becomes Regex<string, { captures: [...] }>, names lost
const r = regex(String.raw`^(?<key>\w+)$`);

// GOOD — normal string literal
const r = regex("^(?<key>\\w+)$");

// GOOD — template literal with interpolated source
const r = regex(`^(?<key>${KEY_SOURCE})$`);

If you'd reach for String.raw to avoid \\, write the normal string literal anyway — the type info is worth the extra backslashes.

Use native RegExp.escape for dynamic literal text

When building a pattern from runtime text (a user-supplied filename, a delimiter string, etc.), use RegExp.escape(text) instead of hand-rolled replace(/[.*+?...]/g, "\\$&") helpers. It's standard, correct, and the intent reads clearly.

Library API reference

For the full regex() / regex.as surface, FAQs (including the [a-Z] precision tradeoff and the Type is excessively deep… workaround), and supported features, read the library README:

  • node_modules/arkregex/README.md — present in any workspace that depends on arkregex (e.g. apps/obsidian). It's short; just open it when you need API details rather than guessing from memory.

© aidenlx, AGPL-3.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 .agents/skills/arkregex of aidenlx/zotlit.

Open the folder on GitHubat commit 27f5752

Compare with similar skills

Arkregex 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.

Arkregex compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Arkregex this skillaidenlx/zotlit1k—~952Automated safety check: PassAGPL-3.0
MCP Server Builderanthropics/skills180k63 repos~2.3kAutomated safety check: PassApache-2.0
Web Artifacts Builderanthropics/skills180k41 repos~769Automated safety check: PassApache-2.0
Typescript Advanced Typesrolling-scopes/rsschool-app10k25 repos~4.2kAutomated safety check: PassMPL-2.0
Code Review ChecklistshareAI-lab/learn-claude-code78k5 repos~1.1kAutomated safety check: PassMIT
MCP Server BuildershareAI-lab/learn-claude-code78k5 repos~1.2kAutomated safety check: PassMIT

Similar skills

  • MCP Server Builder

    anthropics/skills

    Official

    Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.

    180k GitHub starsUsed in 63 repos~2.3k tokens
    Agent WorkflowsAuto-check passed
  • Web Artifacts Builder

    anthropics/skills

    Official

    Builds multi-component claude.ai HTML artifacts as a small React, TypeScript and Tailwind project, then bundles it into one shareable HTML file.

    180k GitHub starsUsed in 41 repos~769 tokens
    Frontend & DesignAuto-check passed
  • Typescript Advanced Types

    rolling-scopes/rsschool-app

    Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications.

    10k GitHub starsUsed in 25 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 5 repos~1.1k tokens
    DevelopmentAuto-check passed
  • MCP Server Builder

    shareAI-lab/learn-claude-code

    Walks through building MCP servers in Python or TypeScript that expose tools, resources and prompts to Claude, with templates, registration and testing.

    78k GitHub starsUsed in 5 repos~1.2k tokens
    Agent WorkflowsAuto-check passed
  • Nx Import

    nrwl/nx

    Import, merge, or combine repositories into an Nx workspace using nx import.

    29k GitHub starsUsed in 6 repos~3.5k tokens
    DevelopmentAuto-check passed

More from aidenlx/zotlit

All 16 skills in this repo
  • I18n UI Text

    aidenlx/zotlit

    Obsidian house style for the wording of user-facing UI strings — command names, setting labels, button text, notices, modal copy.

    1k GitHub stars~2.8k tokensUpdated today
    Auto-check passed
  • Obsidian CSS

    aidenlx/zotlit

    Style Obsidian plugin UI with Tailwind + native components. An agent skill from aidenlx/zotlit.

    1k GitHub stars~4.8k tokensUpdated today
    Auto-check passed
  • Changelog Entry

    aidenlx/zotlit

    Write a user-facing changelog entry under apps/docs/content/changelog/.

    1k GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Discord Announcement

    aidenlx/zotlit

    Draft a Discord announcement from a changelog entry. An agent skill from aidenlx/zotlit.

    1k GitHub stars~604 tokensUpdated today
    Auto-check passed
  • Inlang I18n

    aidenlx/zotlit

    Define ZotLit UI messages in the Inlang Message Format and consume them through the generated JSON Language Pack facade.

    1k GitHub stars~1k tokensUpdated today
    Auto-check passed
  • Obsidian Actions

    aidenlx/zotlit

    Patterns for registering commands (action modules) and building context menus (menu segments) in the Obsidian plugin.

    1k GitHub stars~2.6k tokensUpdated today
    Auto-check passed

Works with

Questions about Arkregex

What does Arkregex do?

Typed regex authoring with arkregex in this repo. An agent skill from aidenlx/zotlit. Arkregex is an agent skill from aidenlx/zotlit. Typed regex authoring with arkregex in this repo.

When should I use Arkregex?

Arkregex fits situations like: edit a regular expression in TypeScript — especially one with named; positional capture groups; anywhere .exec() / .match() results are read in code; reaching for new RegExp(...).

How do I install Arkregex in Claude Code?

Run `npx skills add aidenlx/zotlit --skill arkregex -a claude-code`. Or copy the skill folder (.agents/skills/arkregex in aidenlx/zotlit) into .claude/skills/arkregex in your project. Claude Code loads it when a task matches its description.

How do I install Arkregex in Codex?

Run `npx skills add aidenlx/zotlit --skill arkregex -a codex`. Or copy the skill folder (.agents/skills/arkregex in aidenlx/zotlit) into .agents/skills/arkregex in your project. Codex loads it when a task matches its description.

Can I use Arkregex 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 aidenlx/zotlit --skill arkregex -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/arkregex, .gemini/skills/arkregex, .github/skills/arkregex and .opencode/skills/arkregex in your project.

What does Arkregex need to run?

Going by SKILL.md and its folder, Arkregex needs credentials named ANNOT_KEY. Our summary lists: A credential in ANNOT_KEY.

Does Arkregex 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 Arkregex 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 Arkregex use?

Arkregex is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Arkregex use?

About 952 tokens (SKILL.md is roughly 3.8k 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 Arkregex?

Skills that share tags, products or a category with Arkregex: MCP Server Builder (anthropics/skills, 180k stars), Web Artifacts Builder (anthropics/skills, 180k stars), Typescript Advanced Types (rolling-scopes/rsschool-app, 10k stars) and Code Review Checklist (shareAI-lab/learn-claude-code, 78k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Arkregex?

aidenlx (a GitHub user) maintains it in aidenlx/zotlit, which has 1,028 GitHub stars. The repository holds 16 skills in this directory. The repository was last updated on October 9, 2026.

Source: aidenlx/zotlit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.