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.
Guides writing command-line interfaces with the Optique TypeScript library: composing parsers, choosing value types, subcommands and avoiding common mistakes.
$ npx skills add dahlia/optique --skill optique -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install dahlia/optique optique --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/dahlia/optique.git skills-src && mkdir -p .claude/skills && cp -r skills-src/packages/core/skills/optique .claude/skills/optique && rm -rf skills-srcUse ~/.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/
Install the "optique" agent skill from https://github.com/dahlia/optique/tree/main/packages/core/skills/optique into .claude/skills/optique/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "optique", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/dahlia/optique/tree/main/packages/core/skills/optiqueType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add dahlia/optique --skill optique -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install dahlia/optique optique --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/dahlia/optique.git skills-src && mkdir -p .agents/skills && cp -r skills-src/packages/core/skills/optique .agents/skills/optique && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "optique" agent skill from https://github.com/dahlia/optique/tree/main/packages/core/skills/optique into .agents/skills/optique/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "optique", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add dahlia/optique --skill optique -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install dahlia/optique optique --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/dahlia/optique.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/packages/core/skills/optique .cursor/skills/optique && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "optique" agent skill from https://github.com/dahlia/optique/tree/main/packages/core/skills/optique into .cursor/skills/optique/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "optique", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/dahlia/optique.git --path packages/core/skills/optique--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add dahlia/optique --skill optique -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install dahlia/optique optique --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/dahlia/optique.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/packages/core/skills/optique .gemini/skills/optique && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "optique" agent skill from https://github.com/dahlia/optique/tree/main/packages/core/skills/optique into .gemini/skills/optique/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "optique", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install dahlia/optique optiqueInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add dahlia/optique --skill optique -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/dahlia/optique.git skills-src && mkdir -p .github/skills && cp -r skills-src/packages/core/skills/optique .github/skills/optique && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "optique" agent skill from https://github.com/dahlia/optique/tree/main/packages/core/skills/optique into .github/skills/optique/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "optique", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add dahlia/optique --skill optique -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install dahlia/optique optique --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/dahlia/optique.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/packages/core/skills/optique .opencode/skills/optique && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "optique" agent skill from https://github.com/dahlia/optique/tree/main/packages/core/skills/optique into .opencode/skills/optique/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "optique", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
optiqueGuides writing command-line interfaces with the Optique TypeScript library: composing parsers, choosing value types, subcommands and avoiding common mistakes.
Lays out when to use `run()` from the run package for a full application versus `parse()` or `runParser()` to embed parsing elsewhere, and how `onError` and `help.onShow` callbacks supply structured error and help output rather than printing directly. Parsers are composed from combinators such as `object()`, `tuple()`, `seq()`, `or()` and `merge()` rather than hand-written argument scanning.
It also covers value parsers like `integer()`, `choice()`, `biject()`, `regExp()`, `url()` and `uuid()` for validating input as it is parsed instead of afterward, plus modifiers such as `optional()`, which yields undefined, and `withDefault()` for a fallback value. Testing has its own helpers: `parseArgs()` for parser results, `captureRun()` for runner output and exit codes, and `createCliRunner()` for exercising a real CLI end to end.
Read from SKILL.md and the folder at commit f162fe0. It shows what the files ask for, not the result of running them.
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.
Ships script files (TypeScript), which the agent can run.
From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
optique.devFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Optique CLI Parser Patterns loads about 3.7k tokens when it runs. Until then it costs about 131 tokens; SKILL.md has 1,097 words of instructions outside code blocks.
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.
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.
The full file from dahlia/optique at commit f162fe0, republished under its MIT licence (© dahlia). 1,097 words, ~3,688 tokens.
.claude/skills/optique/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.Start at https://optique.dev/llms.txt online; these rules also work offline.
run() from @optique/run for apps, parse()/runParser() to embed.runParser(), onError(exitCode, error) supplies a structured
Message; help.onShow(exitCode, page) supplies the final DocPage. Both
follow output. Supply stdout: () => {} for custom help rendering. See
https://optique.dev/concepts/runners.md#structured-help-callbacks.parseArgs()/parseArgsSync() from @optique/testing/parser
for parser results, captureRun() from @optique/testing/run for runner
output/exits, captureProgramRun() from @optique/testing/discover for
dispatch, and createCliRunner() from @optique/testing/cli for real CLIs.
Pin colors/maxWidth in tests; defaults use terminal and environment.object(), tuple(), seq(), or(), merge(), and
modifiers. Do not hand-write argument scanners around Optique parsers.helpSections: { commands: "Commands", options: "Options" }.
It groups untitled entries only on pages with visible commands. See
https://optique.dev/cookbook.md#command-and-option-headings-in-help.optional(p) yields undefined; use
withDefault(p, value) or withDefault(flag("-v"), false) for fallbacks.message helpers; keep canonical errors unthemed. Since
1.3.0, theme/messageFormatter should preserve initialWidth, quoting,
and width options. flag() has static/callback errors.unexpectedValue
since 1.4.0. Mismatch callbacks may be skipped; avoid side effects.integer(), choice(), biject(), regExp(),
url(), origin(), and uuid() instead of validating raw strings after
parsing. Use regExp({ flags }) for user-supplied sources, biject() for
one-to-one mappings, transform() for mapped results, and
choice(values, { key }) for custom string matching that returns the
declared spelling. Use normalizeInput() for raw-string cleanup and
path() from @optique/run/valueparser for file-system paths. Write a
custom value parser only when these tools do not cover the domain.-p8080/-vp8080 accept attached values. Values consume
the literal suffix (-p=5 gives "=5"); full single-dash names win.run()/parse()/runParser() or, for bindKeyring(), runAsync().dependency() when one value parser controls another's valid values.
For a multi-level chain, wrap the middle derivation too:
dependency(source.deriveSync(...)). Optique resolves such chains by
dependency order, independently of object/tuple field order.derivePromptConfig(source, resolver) (from @optique/prompt,
re-exported by @optique/inquirer and @optique/clack) when a prompt's
choices or message depend on another parsed value. The resolver may be
async and runs only at the real prompt fallback, after the named sources
resolve; pass [sourceA, sourceB] when it reads several sources. The
resolver's prompt kind must return the wrapped parser's value type. Derive
the wrapped parser separately when the CLI domain should change, and make
it a dependency source only if another consumer needs its answer. Pass a
lone resolver for fetched choices, forwarding its signal to the fetch.{ validate, maxAttempts, signal } as a generated prompt wrapper's
third argument, including prompt() from @optique/inquirer and
@optique/clack. The validator returns undefined to accept the prompted
value or a structured Message to retry, synchronously or asynchronously.
Attempt limits must be positive integers and default to unlimited retries.
Selection prompts keep their config and use the shared validate option.execute(config, context) so retries can show
context.previousValidationMessage, and forward context.signal when the
prompt library supports aborting active work. Adapter-native validation
remains separate and completes inside one shared attempt.command() combined by or(); add a literal field
such as command: constant("serve") per branch for a discriminated union.
Show hidden aliases in help with showAliases on command() or runner.run(parser, { completion: "both" }) for completion, or the object form
with completion.errors for custom shell errors. Do not hand-write scripts.usageLine: [{ type: "ellipsis" }] in runner options when a large root
synopsis should become a compact Usage: myapp ... line. This applies only
to root full help; use command()'s usageLine for subcommand help.showUsage: false in runner options when full help should show the
brief and command or option sections without the Usage: synopsis.
For deeply nested command trees, add commandList: "top-level" when root
help should list only first-level command groups.termWidth: "auto" in runner options when descriptions should align
after the widest visible help term. Optique measures terminal display
width after adding built-in help/version/completion entries.import { object } from "@optique/core/constructs";
import { message } from "@optique/core/message";
import { withDefault } from "@optique/core/modifiers";
import { argument, flag, option } from "@optique/core/primitives";
import { integer, string } from "@optique/core/valueparser";
import { run } from "@optique/run";
const parser = object({
input: argument(string({ metavar: "FILE" }), {
description: message`Input file to process.`,
}),
port: withDefault(
option("--port", integer({ min: 1, max: 65535 }), {
description: message`Port to listen on.`,
}),
3000,
),
verbose: withDefault(
flag("-v", "--verbose", { description: message`Enable verbose logging.` }),
false,
),
});
const config = run(parser, {
brief: message`Process a file.`,
completion: "both",
showDefault: true,
termWidth: "auto",
});
console.log(`Processing ${config.input} on port ${config.port}.`);Use command() for each branch and or() to require exactly one matching
subcommand. Use optional(or(...)) only when no subcommand is valid.
import { object, or } from "@optique/core/constructs";
import { withDefault } from "@optique/core/modifiers";
import { parse } from "@optique/core/parser";
import { command, constant, flag, option } from "@optique/core/primitives";
import { integer } from "@optique/core/valueparser";
const parser = or(
command("build", object({
command: constant("build"),
watch: withDefault(flag("--watch"), false),
})),
command("serve", object({
command: constant("serve"),
port: withDefault(option("--port", integer({ min: 1 })), 3000),
})),
);
const result = parse(parser, ["serve", "--port", "8080"]);
if (result.success) {
switch (result.value.command) {
case "build":
result.value.watch;
break;
case "serve":
result.value.port;
break;
}
}Prefer the built-in catalog first. If a one-to-one dictionary can describe the
input tokens and domain values, use biject(). If an existing parser already
accepts the right input syntax, wrap it with transform() before writing a
custom parser:
import { biject, choice, transform } from "@optique/core/valueparser";
const exitCode = biject({
ok: 0,
warning: 1,
error: 2,
});
const logLevel = transform(choice(["debug", "info", "warn", "error"] as const), {
map(value) {
return value.toUpperCase() as "DEBUG" | "INFO" | "WARN" | "ERROR";
},
unmap(value) {
return value.toLowerCase() as "debug" | "info" | "warn" | "error";
},
});When a custom domain is needed, keep the validation in a value parser so help, errors, defaults, prompts, and completion all see the same typed value.
import { message } from "@optique/core/message";
import type { ValueParser, ValueParserResult } from "@optique/core/valueparser";
const levels = ["debug", "info", "warn", "error"] as const;
type Level = typeof levels[number];
function isLevel(input: string): input is Level {
return (levels as readonly string[]).includes(input);
}
function logLevel(): ValueParser<"sync", Level> {
return {
mode: "sync",
metavar: "LEVEL",
placeholder: "info",
parse(input: string): ValueParserResult<Level> {
if (isLevel(input)) return { success: true, value: input };
return { success: false, error: message`Invalid log level: ${input}.` };
},
format(value: Level): string {
return value;
},
};
}
const parser = logLevel();run() for apps; use explicit argument arrays with
parse() in tests and embedded use. Do not pre-parse process.argv.or(a, b) as “zero or more alternatives.” It requires one
matching branch unless the whole or() is wrapped in optional() or
withDefault().object() for mutually exclusive subcommands. Use
or(command(...), command(...)).flag("--x") is required. Wrap it in optional() or
withDefault(..., false) for ordinary optional flags.multiple(p) to fail when absent; it returns []. Wrap with
nonEmpty() when at least one value is required.seq(). Most constructs let child
parsers compete by priority; use seq() only for truly ordered grammars.message values for errors and descriptions.bindEnv(), bindConfig(), bindDerivedDefault(),
and bindKeyring() in the runner's contexts option.bindEnv().readFallback() for env/default in error handlers.showEnvironment for env-only help; set documentation.description.dependency() rather than
duplicating one-level factories.when field and provide a typed otherwise value. The check then runs
only if parsing reaches the prompt fallback.For the detailed maintained guide, use https://optique.dev/pitfalls.md.
| Package | Use for | Docs |
|---|---|---|
@optique/env | Environment variable fallbacks | https://optique.dev/integrations/env.md |
@optique/keyring | Async OS credential-store password fallback | https://optique.dev/integrations/keyring.md |
@optique/config | Configuration file fallbacks | https://optique.dev/integrations/config.md |
@optique/derived-defaults | Defaults computed from first-pass results | https://optique.dev/concepts/derived-defaults.md |
@optique/prompt | Generic prompt adapter foundation | https://optique.dev/integrations/prompt.md |
@optique/clack | Clack interactive fallback prompts | https://optique.dev/integrations/clack.md |
@optique/inquirer | Inquirer.js interactive fallback prompts | https://optique.dev/integrations/inquirer.md |
@optique/standard-schema | Portable schema-backed value parsing | https://optique.dev/integrations/standard-schema.md |
@optique/zod | Zod-backed value parsing | https://optique.dev/integrations/zod.md |
@optique/valibot | Valibot-backed value parsing | https://optique.dev/integrations/valibot.md |
@optique/temporal | Temporal date and time parsers | https://optique.dev/integrations/temporal.md |
@optique/git | Async Git reference validation | https://optique.dev/integrations/git.md |
@optique/logtape | LogTape levels and formatter/output options | https://optique.dev/integrations/logtape.md |
@optique/man | Man page generation | https://optique.dev/concepts/man.md |
@optique/discover | File-based command discovery | https://optique.dev/concepts/discover.md |
@optique/testing | Layered CLI testing at a chosen boundary | https://optique.dev/concepts/testing.md |
© dahlia, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file in packages/core/skills/optique of dahlia/optique.
Open the folder on GitHubat commit f162fe0
Optique CLI Parser Patterns 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Optique CLI Parser Patterns this skilldahlia/optique | 737 | — | ~3.7k | Automated safety check: Pass | MIT | |
| Code Review ChecklistshareAI-lab/learn-claude-code | 78k | 5 repos | ~1.1k | Automated safety check: Pass | MIT | |
| Install Anti-Slop Oxlint Rulesdmmulroy/anti-slop | 5.3k | 1 repos | ~2.2k | Automated safety check: Pass | MIT | |
| Generate Release Notesteambit/bit | 18k | — | ~2.2k | Automated safety check: Pass | Custom licence | |
| Pnpm Engineteambit/bit | 18k | — | ~1.9k | Automated safety check: Pass | Custom licence | |
| Convert Internal Package to TypeScriptTryGhost/Ghost | 55k | — | ~1.2k | Automated safety check: Pass | MIT |
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.
dmmulroy/anti-slop
Installs, updates or migrates the vendored anti-slop Oxlint plugin in a repository, keeping local rule changes and the plugin's license and provenance files.
teambit/bit
Generate comprehensive release notes for Bit from git commits and pull requests.
teambit/bit
Work on the pnpm Rust engine (@pnpm/napi, the pacquet crates) that bit install runs through.
TryGhost/Ghost
Moves a legacy internal Ghost package from JavaScript and CommonJS to TypeScript and ESM in three focused commits that keep git file history intact.
kucherenko/jscpd
Measures a code port between languages or frameworks with jscpd's function-level comparison, porting tests before code and tracking what is left unmatched.
dahlia/optique
Create and publish releases for the Optique project. An agent skill from dahlia/optique.
Works with
Categories
Guides writing command-line interfaces with the Optique TypeScript library: composing parsers, choosing value types, subcommands and avoiding common mistakes. onShow` callbacks supply structured error and help output rather than printing directly. Parsers are composed from combinators such as `object()`, `tuple()`, `seq()`, `or()` and `merge()` rather than hand-written argument scanning.
Optique CLI Parser Patterns fits situations like: building a new command-line tool's argument parsing with Optique; adding a subcommand or new flag to an existing Optique-based CLI; choosing the right value parser for validating a CLI argument; writing tests for a CLI's parsing and help output.
Run `npx skills add dahlia/optique --skill optique -a claude-code`. Or copy the skill folder (packages/core/skills/optique in dahlia/optique) into .claude/skills/optique in your project. Claude Code loads it when a task matches its description.
Run `npx skills add dahlia/optique --skill optique -a codex`. Or copy the skill folder (packages/core/skills/optique in dahlia/optique) into .agents/skills/optique in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add dahlia/optique --skill optique -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/optique, .gemini/skills/optique, .github/skills/optique and .opencode/skills/optique in your project.
Going by SKILL.md and its folder, Optique CLI Parser Patterns needs TypeScript for the scripts in its folder. Our summary lists: The @optique/core and @optique/run packages.
SKILL.md names 1 domain. As links in the text: optique.dev. This is read from the text; nothing was executed.
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.
Optique CLI Parser Patterns is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.7k tokens (SKILL.md is roughly 15k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Optique CLI Parser Patterns: Code Review Checklist (shareAI-lab/learn-claude-code, 78k stars), Install Anti-Slop Oxlint Rules (dmmulroy/anti-slop, 5.3k stars), Generate Release Notes (teambit/bit, 18k stars) and Pnpm Engine (teambit/bit, 18k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
dahlia (a GitHub user) maintains it in dahlia/optique, which has 737 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on October 6, 2026.
Source: dahlia/optique on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.