/cleye
Type-safe CLI argument parsing with cleye, the standard parser for this repo's Bun scripts. Use when writing or editing any script that takes arguments (flags, positional parameters, subcommands, --help) instead of reading existing scripts for the pattern.
$ npx -y skills add bendrucker/claude --skill cleye --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/cleye
Context preview
The summary Claude sees to decide when to auto-load this skill.
Type-safe CLI argument parsing with cleye, the standard parser for this repo's Bun scripts. Use when writing or editing any script that takes arguments (flags, positional parameters, subcommands, --help) instead of reading existing scripts for the pattern.
SKILL.md
cleye.SKILL.mdname: cleye
description: Type-safe CLI argument parsing with cleye, the standard parser for this repo's Bun scripts. Use when writing or editing any script that takes arguments (flags, positional parameters, subcommands, --help) instead of reading existing scripts for the pattern.
cleye
Type-safe CLI argument parsing for Bun scripts. Used across plugin scripts for flags, parameters, and subcommands.
Basic Usage
#!/usr/bin/env bun
import { cli } from "cleye";
const argv = cli({
name: "my-script",
parameters: ["<file>"],
flags: {
output: {
type: String,
alias: "o",
description: "Output path",
},
verbose: Boolean,
},
});
console.log(argv._.file); // string (required)
console.log(argv.flags.output); // string | undefined
console.log(argv.flags.verbose); // boolean | undefinedParameters
Positional arguments mapped to named properties on `argv._`:
parameters: [
"<required>", // must be provided
"[optional]", // may be omitted
"<files...>", // required variadic (1+), must be last
"[files...]", // optional variadic (0+), must be last
]
Required parameters must precede optional. Variadic must be last.
Access: `argv._.required`, `argv._.optional`, `argv._.files`.
Flags
Flags accept a type constructor or a config object:
flags: {
name: String, // shorthand
count: {
type: Number,
alias: "n",
default: 10,
description: "Max results",
},
tags: {
type: [String], // array: -t foo -t bar
description: "Tag names",
},
json: {
type: Boolean,
description: "Output as JSON",
},
}Kebab-case flags (`--dry-run`) become camelCase properties (`argv.flags.dryRun`).
Help Text
Set `help.description` on `cli()` for a summary line above the generated usage block:
const argv = cli({
name: "scan",
parameters: ["<path>"],
help: {
description: "Scan repository prose for AI writing tropes.",
},
flags: { ... },
});Subcommands
Define each subcommand as a named `command()` const with its callback, pass them via the `commands` array, and give the root `cli()` a callback that shows help when no subcommand matches:
import { cli, command } from "cleye";
const replyCmd = command(
{
name: "reply",
parameters: ["<thread-id>"],
flags: {
body: { type: String, description: "Reply text" },
},
},
async (parsed) => {
console.log(parsed._.threadId, parsed.flags.body);
},
);
cli(
{
name: "review-threads",
commands: [replyCmd],
},
(parsed) => {
parsed.showHelp();
},
);Conventions
- Shebang: `#!/usr/bin/env bun`
- Entry point: wrap CLI logic in `if (import.meta.main)` so the module is importable
- Export core functions for programmatic use; keep CLI parsing at the entry point
- Use [cleye](https://github.com/privatenumber/cleye) (not `parseArgs` from `node:util`) for scripts that need `--help` generation
Read more
name: cleye description: Type-safe CLI argument parsing with cleye, the standard parser for this repo's Bun scripts. Use when writing or editing any script that takes arguments (flags, positional parameters, subcommands, --help) instead of reading existing scripts for the pattern.
cleye
Type-safe CLI argument parsing for Bun scripts. Used across plugin scripts for flags, parameters, and subcommands.
Basic Usage
#!/usr/bin/env bun
import { cli } from "cleye";
const argv = cli({
name: "my-script",
parameters: ["<file>"],
flags: {
output: {
type: String,
alias: "o",
description: "Output path",
},
verbose: Boolean,
},
});
console.log(argv._.file); // string (required)
console.log(argv.flags.output); // string | undefined
console.log(argv.flags.verbose); // boolean | undefinedParameters
Positional arguments mapped to named properties on `argv._`:
parameters: [ "<required>", // must be provided "[optional]", // may be omitted "<files...>", // required variadic (1+), must be last "[files...]", // optional variadic (0+), must be last ]
Required parameters must precede optional. Variadic must be last.
Access: `argv._.required`, `argv._.optional`, `argv._.files`.
Flags
Flags accept a type constructor or a config object:
flags: {
name: String, // shorthand
count: {
type: Number,
alias: "n",
default: 10,
description: "Max results",
},
tags: {
type: [String], // array: -t foo -t bar
description: "Tag names",
},
json: {
type: Boolean,
description: "Output as JSON",
},
}Kebab-case flags (`--dry-run`) become camelCase properties (`argv.flags.dryRun`).
Help Text
Set `help.description` on `cli()` for a summary line above the generated usage block:
const argv = cli({
name: "scan",
parameters: ["<path>"],
help: {
description: "Scan repository prose for AI writing tropes.",
},
flags: { ... },
});Subcommands
Define each subcommand as a named `command()` const with its callback, pass them via the `commands` array, and give the root `cli()` a callback that shows help when no subcommand matches:
import { cli, command } from "cleye";
const replyCmd = command(
{
name: "reply",
parameters: ["<thread-id>"],
flags: {
body: { type: String, description: "Reply text" },
},
},
async (parsed) => {
console.log(parsed._.threadId, parsed.flags.body);
},
);
cli(
{
name: "review-threads",
commands: [replyCmd],
},
(parsed) => {
parsed.showHelp();
},
);Conventions
- Shebang: `#!/usr/bin/env bun`
- Entry point: wrap CLI logic in `if (import.meta.main)` so the module is importable
- Export core functions for programmatic use; keep CLI parsing at the entry point
- Use [cleye](https://github.com/privatenumber/cleye) (not `parseArgs` from `node:util`) for scripts that need `--help` generation
My personal plugin marketplace for Claude Code, Anthropic's AI coding assistant.
Repo: bendrucker/claude
Other skills on bendrucker-claude.
- /agent-ideas
Harvest agent-tooling ideas from prominent developers.
Open skill - /coverage
Measure Bun test coverage and close gaps on a specific file. Use when adding or editing tests, when asked about coverage, or when the PostToolUse coverage hook reports uncovered lines.
Open skill - /activity
Report real device usage from ActivityWatch. Covers per-app time, window titles, and active vs idle spans. Use when asked "what apps did I use", "how long was I in X", "what did I work on today", "how much was I active vs idle", or to mine usage patterns for automation.
Open skill - /history
Report shell history from atuin's local capture. Covers what commands ran, when, where, and how they exited. Use when asked "what commands did I run", "what was I working on in the terminal", "have I ever run X", "how do I usually invoke X", or about recent shell activity,
Open skill - /bun
Bun runtime patterns. Use when running bun commands, working with package.json/bun.lock, writing TypeScript scripts under Bun, or developing Claude Code plugins.
Open skill - /agent-team
Orchestrating Claude Code agent teams. Use when creating teams, spawning teammates, assigning tasks, configuring teammate modes, or setting up team quality gate hooks.
Open skill

