Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Generate getopts-based argument parsing for shell scripts with short/long options and validation.
.claude/skills/a5c-ai-getopts-parser-generator/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -3% | 0% |
| case-11 | ✗→✓ | ▲ Improved | -14% | 0% |
| case-13 | ✗→✓ | ▲ Improved | -12% | 0% |
| case-18 | ✗→✓ | ▲ Improved | -25% | 0% |
| case-21 | ✓→✗ | ▼ Worse | -9% | 0% |
Generate getopts-based argument parsing for shell scripts.
Invoke this skill when you need to:
bash#!/usr/bin/env bash # Default values VERBOSE=false OUTPUT="" FORMAT="text" FORCE=false # Usage function usage() { cat <<EOF Usage: $(basename "$0") [OPTIONS] <input> Options: -h, --help Show this help -v, --verbose Enable verbose output -o, --output FILE Output file (default: stdout) -f, --format FORMAT Output format: text, json, csv (default: text) -F, --force Force overwrite existing files Arguments: input Input file to process EOF } # Parse options parse_options() { # Transform long options to short ones for arg in "$@"; do shift case "$arg" in '--help') set -- "$@" '-h' ;; '--verbose') set -- "$@" '-v' ;; '--output') set -- "$@" '-o' ;; '--format') set -- "$@" '-f' ;; '--force') set -- "$@" '-F' ;; *) set -- "$@" "$arg" ;; esac done # Parse short options local OPTIND opt while getopts ":hvo:f:F" opt; do case "$opt" in h) usage; exit 0 ;; v) VERBOSE=true ;; o) OUTPUT="$OPTARG" ;; f) case "$OPTARG" in text|json|csv) FORMAT="$OPTARG" ;; *) die "Invalid format: $OPTARG" ;; esac ;; F) FORCE=true ;; :) die "Option -$OPTARG requires an argument" ;; \?) die "Unknown option: -$OPTARG" ;; esac done shift $((OPTIND - 1)) # Remaining arguments if [[ $# -lt 1 ]]; then usage die "Missing required argument: input" fi INPUT="$1" shift # Extra arguments EXTRA_ARGS=("$@") } die() { echo "Error: $*" >&2 exit 1 } # Parse and validate parse_options "$@" # Validation [[ -f "$INPUT" ]] || die "Input file not found: $INPUT" [[ -n "$OUTPUT" && -f "$OUTPUT" && "$FORCE" != true ]] && \ die "Output file exists: $OUTPUT (use --force to overwrite)"
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 12,671 | 9,090 | -28% | 1 | 1 | 0% | 2,660 | 2,576 | -3% | 0 | 0 | — |
case-02 | fail→fail | 13,749 | 12,694 | -8% | 1 | 1 | 0% | 2,926 | 3,328 | +14% | 0 | 0 | — |
case-03 | fail→fail | 17,612 | 12,764 | -28% | 1 | 1 | 0% | 3,563 | 3,522 | -1% | 0 | 0 | — |
case-04 | fail→fail | 12,429 | 9,960 | -20% | 1 | 1 | 0% | 2,735 | 2,991 | +9% | 0 | 0 | — |
case-05 | fail→fail | 9,569 | 9,462 | -1% | 1 | 1 | 0% | 1,966 | 2,616 | +33% | 0 | 0 | — |
case-06 | fail→fail | 10,761 | 7,186 | -33% | 1 | 1 | 0% | 2,369 | 2,253 | -5% | 0 | 0 | — |
case-07 | fail→fail | 12,352 | 11,625 | -6% | 1 | 1 | 0% | 2,355 | 3,053 | +30% | 0 | 0 | — |
case-08 | fail→fail | 9,647 | 7,364 | -24% | 1 | 1 | 0% | 1,870 | 2,162 | +16% | 0 | 0 | — |
case-09 | fail→fail | 8,293 | 5,901 | -29% | 1 | 1 | 0% | 1,570 | 1,868 | +19% | 0 | 0 | — |
case-10 | fail→fail | 7,683 | 4,098 | -47% | 1 | 1 | 0% | 1,286 | 1,488 | +16% | 0 | 0 | — |
case-11 | fail→pass | 16,849 | 10,678 | -37% | 1 | 1 | 0% | 3,255 | 2,808 | -14% | 0 | 0 | — |
case-12 | fail→fail | 6,638 | 3,835 | -42% | 1 | 1 | 0% | 1,362 | 1,419 | +4% | 0 | 0 | — |
case-13 | fail→pass | 10,891 | 6,293 | -42% | 1 | 1 | 0% | 2,250 | 1,977 | -12% | 0 | 0 | — |
case-14 | pass→pass | 12,523 | 11,328 | -10% | 1 | 1 | 0% | 2,458 | 2,526 | +3% | 0 | 0 | — |
case-15 | fail→fail | 6,631 | 4,383 | -34% | 1 | 1 | 0% | 1,223 | 1,618 | +32% | 0 | 0 | — |
case-16 | fail→fail | 6,956 | 5,788 | -17% | 1 | 1 | 0% | 1,299 | 1,625 | +25% | 0 | 0 | — |
case-17 | pass→pass | 11,336 | 9,524 | -16% | 1 | 1 | 0% | 2,124 | 2,554 | +20% | 0 | 0 | — |
case-18 | fail→pass | 10,988 | 4,143 | -62% | 1 | 1 | 0% | 2,024 | 1,514 | -25% | 0 | 0 | — |
case-19 | pass→pass | 12,063 | 5,732 | -52% | 1 | 1 | 0% | 2,640 | 1,781 | -33% | 0 | 0 | — |
case-20 | fail→fail | 5,118 | 3,696 | -28% | 1 | 1 | 0% | 936 | 1,450 | +55% | 0 | 0 | — |
case-21 | pass→fail | 11,957 | 6,132 | -49% | 1 | 1 | 0% | 1,968 | 1,792 | -9% | 0 | 0 | — |
case-22 | fail→fail | 17,476 | 12,660 | -28% | 1 | 1 | 0% | 2,746 | 3,253 | +18% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +14 percentage points is the difference between those two pass rates over the 22 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.