Skip to content
Back to skills

Cli

ASecurity

This skill covers the creation of shared options for CLI commands. Trigger: When defining command-line interfaces using the `click` library.

  • 5 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 26, 2026
ai-agentspythonbash

Works with

  • cli

Security analysis

A100/100

Scanned September 26, 2026

npx -y skills add JNZader/repoforge --skill cli --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cli?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Cli
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jnzader-cli/badge)](https://www.skillsdirectory.com/skills/jnzader-cli)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: add-cli-options
description: >
  This skill covers the creation of shared options for CLI commands.
  Trigger: When defining command-line interfaces using the `click` library.
license: Apache-2.0
metadata:
  author: repoforge
  version: "1.0"
---

## Critical Patterns

### Define Main Command

Use the `main` function to set up the entry point for your CLI application.

```python
import click
from repoforge.cli import main

@main.command()
def my_command():
    click.echo("This is my command.")
```

### Add Skills

Utilize the `skills` export to define reusable command options.

```python
import 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.")
```

## When to Use

- When creating a new command for the CLI.
- To add common options across multiple commands.
- To streamline the execution of default commands.

## Commands

```bash
python repoforge/cli.py my_command
```

## Anti-Patterns

### Don't: Hardcode Options

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)
```

## Quick Reference

| Task                | Pattern                |
|---------------------|------------------------|
| Define a command    | `@main.command()`      |
| Add shared options   | `@skills.option()`     |

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.