Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Generate argparse-based Python CLI applications with subparsers, type converters, and standard library patterns. Creates lightweight Python CLIs without external dependencies.
.claude/skills/a5c-ai-argparse-scaffolder/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 73% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 31% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 31% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 73% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 52% | 0% |
Generate a complete argparse CLI application with Python standard library, subparsers, and best practices.
Invoke this skill when you need to:
| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | projectName | string | Yes | Name of the CLI project (kebab-case) | | description | string | Yes | Short description of the CLI | | commands | array | No | List of commands to scaffold | | pythonVersion | string | No | Python version requirement (default: ">=3.8") | | useSubparsers | boolean | No | Use subparsers for commands (default: true) |
json{ "commands": [ { "name": "convert", "description": "Convert file formats", "arguments": [ { "name": "input", "help": "Input file path" }, { "name": "output", "help": "Output file path", "nargs": "?" } ], "options": [ { "flags": ["-f", "--format"], "choices": ["json", "yaml", "xml"] }, { "flags": ["-v", "--verbose"], "action": "store_true" } ] } ] }
<projectName>/
├── pyproject.toml
├── README.md
├── .gitignore
├── src/
│ └── <package_name>/
│ ├── __init__.py
│ ├── __main__.py # Entry point
│ ├── cli.py # Argparse setup
│ ├── commands/
│ │ ├── __init__.py
│ │ └── <command>.py # Command handlers
│ ├── types/
│ │ ├── __init__.py
│ │ └── converters.py # Custom type converters
│ └── utils/
│ ├── __init__.py
│ └── helpers.py # Helper functions
└── tests/
├── __init__.py
└── test_<command>.pypythonimport argparse import sys from typing import Optional, Sequence from .commands import convert, validate def create_parser() -> argparse.ArgumentParser: """Create the argument parser with all subcommands.""" parser = argparse.ArgumentParser( prog='<projectName>', description='<description>', formatter_class=argparse.RawDescriptionHelpFormatter, epilog=''' Examples: %(prog)s convert input.json output.yaml %(prog)s validate config.yaml --strict ''' ) parser.add_argument( '-v', '--verbose', action='store_true', help='Enable verbose output' ) parser.add_argument( '--version', action='version', version='%(prog)s 1.0.0' ) # Create subparsers subparsers = parser.add_subparsers( dest='command', title='commands', description='Available commands', help='Command to run' ) # Register commands convert.register_parser(subparsers) validate.register_parser(subparsers) return parser def main(argv: Optional[Sequence[str]] = None) -> int: """Main entry point.""" parser = create_parser() args = parser.parse_args(argv) if args.command is None: parser.print_help() return 1 # Execute command return args.func(args) if __name__ == '__main__': sys.exit(main())
pythonimport argparse from pathlib import Path from typing import TYPE_CHECKING if TYPE_CHECKING: from argparse import _SubParsersAction def register_parser(subparsers: '_SubParsersAction[argparse.ArgumentParser]') -> None: """Register the convert subparser.""" parser = subparsers.add_parser( 'convert', help='Convert file formats', description='Convert files between different formats.', formatter_class=argparse.RawDescriptionHelpFormatter, ) parser.add_argument( 'input', type=Path, help='Input file path' ) parser.add_argument( 'output', type=Path, nargs='?', help='Output file path (default: stdout)' ) parser.add_argument( '-f', '--format', choices=['json', 'yaml', 'xml'], default='json', help='Output format (default: %(default)s)' ) # Mutually exclusive group group = parser.add_mutually_exclusive_group() group.add_argument('--compact', action='store_true', help='Compact output') group.add_argument('--pretty', action='store_true', help='Pretty print') parser.set_defaults(func=execute) def execute(args: argparse.Namespace) -> int: """Execute the convert command.""" print(f"Converting {args.input} to {args.format}") if args.output: print(f"Output: {args.output}") return 0
pythonimport argparse from pathlib import Path def existing_file(value: str) -> Path: """Type converter for existing file paths.""" path = Path(value) if not path.exists(): raise argparse.ArgumentTypeError(f"File not found: {value}") if not path.is_file(): raise argparse.ArgumentTypeError(f"Not a file: {value}") return path def port_number(value: str) -> int: """Type converter for port numbers.""" try: port = int(value) except ValueError: raise argparse.ArgumentTypeError(f"Invalid port number: {value}") if not 1 <= port <= 65535: raise argparse.ArgumentTypeError(f"Port must be 1-65535: {value}") return port
toml[project] name = "<projectName>" version = "1.0.0" requires-python = ">=3.8" dependencies = [] # No external dependencies! [project.optional-dependencies] dev = [ "pytest>=7.0.0", "pytest-cov>=4.0.0", "mypy>=1.0.0", ] [project.scripts] <projectName> = "<package_name>.cli:main"
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 19,420 | 25,548 | +32% | 1 | 1 | 0% | 4,727 | 8,186 | +73% | 0 | 0 | — |
case-02 | fail→pass | 25,815 | 25,953 | +1% | 1 | 1 | 0% | 6,226 | 8,173 | +31% | 0 | 0 | — |
case-03 | fail→pass | 25,963 | 25,617 | -1% | 1 | 1 | 0% | 6,219 | 8,166 | +31% | 0 | 0 | — |
case-04 | fail→fail | 15,414 | 20,216 | +31% | 1 | 1 | 0% | 3,728 | 6,852 | +84% | 0 | 0 | — |
case-05 | fail→fail | 15,415 | 26,789 | +74% | 1 | 1 | 0% | 3,278 | 8,118 | +148% | 0 | 0 | — |
case-06 | fail→fail | 11,002 | 11,059 | +1% | 1 | 1 | 0% | 2,132 | 4,133 | +94% | 0 | 0 | — |
case-07 | fail→pass | 7,445 | 3,158 | -58% | 1 | 1 | 0% | 1,467 | 2,538 | +73% | 0 | 0 | — |
case-08 | fail→pass | 8,122 | 3,462 | -57% | 1 | 1 | 0% | 1,698 | 2,586 | +52% | 0 | 0 | — |
case-09 | pass→pass | 9,155 | 7,544 | -18% | 1 | 1 | 0% | 1,909 | 3,205 | +68% | 0 | 0 | — |
case-10 | pass→pass | 7,078 | 2,890 | -59% | 1 | 1 | 0% | 1,403 | 2,529 | +80% | 0 | 0 | — |
case-11 | fail→fail | 6,074 | 3,369 | -45% | 1 | 1 | 0% | 1,262 | 2,697 | +114% | 0 | 0 | — |
case-12 | fail→pass | 6,807 | 2,966 | -56% | 1 | 1 | 0% | 1,229 | 2,459 | +100% | 0 | 0 | — |
case-13 | fail→pass | 11,827 | 6,481 | -45% | 1 | 1 | 0% | 2,434 | 3,396 | +40% | 0 | 0 | — |
case-14 | fail→pass | 11,619 | 3,615 | -69% | 1 | 1 | 0% | 2,081 | 2,575 | +24% | 0 | 0 | — |
case-15 | fail→pass | 9,127 | 2,415 | -74% | 1 | 1 | 0% | 1,681 | 2,339 | +39% | 0 | 0 | — |
case-16 | fail→fail | 4,156 | 2,451 | -41% | 1 | 1 | 0% | 813 | 2,410 | +196% | 0 | 0 | — |
case-17 | fail→pass | 3,442 | 2,550 | -26% | 1 | 1 | 0% | 549 | 2,377 | +333% | 0 | 0 | — |
case-18 | fail→fail | 3,026 | 3,546 | +17% | 1 | 1 | 0% | 590 | 2,581 | +337% | 0 | 0 | — |
case-19 | fail→fail | 6,235 | 2,100 | -66% | 1 | 1 | 0% | 1,272 | 2,325 | +83% | 0 | 0 | — |
case-20 | fail→pass | 10,454 | 5,104 | -51% | 1 | 1 | 0% | 1,940 | 2,944 | +52% | 0 | 0 | — |
case-21 | fail→pass | 10,287 | 3,329 | -68% | 1 | 1 | 0% | 1,600 | 2,498 | +56% | 0 | 0 | — |
case-22 | fail→fail | 6,344 | 6,433 | +1% | 1 | 1 | 0% | 1,283 | 3,184 | +148% | 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 +55 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.