Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →This skill covers the creation of shared options for CLI commands. Trigger: When defining command-line interfaces using the `click` library.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -38% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -63% | 0% |
| case-03 | ✗→✓ | ▲ Improved | -67% | 0% |
| case-04 | ✗→✓ | ▲ Improved | -31% | 0% |
| case-05 | ✗→✓ | ▲ Improved | -28% | 0% |
Use the main function to set up the entry point for your CLI application.
pythonimport click from repoforge.cli import main @main.command() def my_command(): click.echo("This is my command.")
Utilize the skills export to define reusable command options.
pythonimport click from repoforge.cli import skills @skills.option('--verbose', is_flag=True, help='Enable verbose output.') def my_command(verbose): if verbose: click.echo("Verbose mode is on.")
bashpython repoforge/cli.py my_command
Hardcoding options reduces flexibility and reusability across commands.
python# BAD @click.command() @click.option('--option', default='value', help='Hardcoded option.') def my_command(option): click.echo(option)
| Task | Pattern | |---------------------|------------------------| | Define a command | @main.command() | | Add shared options | @skills.option() |
Other measured skills in the registry, with their headline benchmark lift.