Click CLI App Scaffolder

VerifiedSafe

Generate complete Python CLI scaffolds using Click, with command groups, context, and modern best practices.

Sby Skills Guide Bot
DevelopmentIntermediate
8/8/2026
Claude CodeCursorCodex
#python#click#cli#scaffolding#code-generation

Recommended for

Automated summary

Generates a complete Click-based Python CLI application with project structure, command groups, context passing, and custom parameter types.

Strengths

  • Produces a ready-to-use project layout (pyproject.toml, src/, commands/, utils/, tests/)
  • Supports command groups, typed options/arguments, and context sharing through click.pass_context
  • Includes Rich-powered console output and templates for custom parameter types
  • Configurable via project name, description, command list, Poetry or pip, and Python version

Limitations

  • Focused solely on the Python Click ecosystem; does not cover Typer, argparse, or other languages
  • Generated tests are stubs that still need to be filled in by hand
  • Getting full value requires describing commands in the expected JSON input format
When to use it

Use it to quickly bootstrap a new, well-structured Click CLI in Python instead of hand-writing the layout and boilerplate.

When not to use it

Avoid it when you only need to add a few commands to an existing CLI or when your project does not use Click.

Security analysis

Safe
Quality score88/100

The skill only generates Python Click CLI scaffolding files and directories. It does not instruct destructive actions, exfiltration, obfuscation, or disabling safety mechanisms. The declared Bash tool is for legitimate project initialization like git init, and no dangerous shell commands are present in the skill content.

No concerns found

How this analysis is made

Examples

New CLI from scratch
Scaffold a new Click CLI project called 'deploy-tool' with a description 'Deploy services to staging and prod', using Poetry and Python >=3.10.
CLI with command groups
Create a Click CLI named 'db-admin' with a top-level 'migrate' command and a 'config' group containing get, set, and list subcommands, with context passing between them.
Custom parameter types
Generate a Click CLI project 'api-client' that includes a custom parameter type for parsing key=value options and Rich console output.

name: click-scaffolder description: Generate Click-based Python CLI applications with decorators, groups, context, and modern Python patterns. Creates complete scaffolded CLI with proper project structure. allowed-tools: Read, Write, Edit, Bash, Glob, Grep graph: domains: [domain:software-engineering] specializations: [specialization:cli-mcp-development] skillAreas: [skill-area:cli-design, skill-area:cli-tooling] roles: [role:backend-engineer, role:platform-engineer] workflows: [workflow:feature-development] topics: [topic:developer-experience]


Click Scaffolder

Generate a complete Click CLI application with Python, proper project structure, and best practices.

Capabilities

  • Generate Python-based Click CLI projects
  • Create command groups with decorators
  • Set up context passing between commands
  • Configure type coercion and validation
  • Implement custom parameter types
  • Set up Poetry/pip project structure

Usage

Invoke this skill when you need to:

  • Bootstrap a new CLI application using Click
  • Create a Python CLI with decorator-based commands
  • Set up command groups and context
  • Configure rich terminal output

Inputs

| 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 | | usePoetry | boolean | No | Use Poetry for dependency management (default: true) | | pythonVersion | string | No | Python version requirement (default: ">=3.9") |

Command Structure

{
  "commands": [
    {
      "name": "init",
      "description": "Initialize a new project",
      "options": [
        { "name": "template", "type": "string", "help": "Template to use" },
        { "name": "force", "is_flag": true, "help": "Overwrite existing" }
      ],
      "arguments": [
        { "name": "directory", "required": true }
      ]
    }
  ],
  "groups": [
    {
      "name": "config",
      "description": "Configuration management",
      "commands": ["get", "set", "list"]
    }
  ]
}

Output Structure

<projectName>/
├── pyproject.toml
├── README.md
├── .gitignore
├── src/
│   └── <package_name>/
│       ├── __init__.py
│       ├── __main__.py        # Entry point
│       ├── cli.py             # Main Click setup
│       ├── commands/
│       │   ├── __init__.py
│       │   └── <command>.py   # Individual commands
│       ├── utils/
│       │   ├── __init__.py
│       │   ├── config.py      # Configuration
│       │   └── console.py     # Rich console output
│       └── types/
│           ├── __init__.py
│           └── custom.py      # Custom parameter types
└── tests/
    ├── __init__.py
    ├── conftest.py
    └── test_<command>.py

Generated Code Patterns

Main CLI Entry (src/<package>/cli.py)

import click
from rich.console import Console

from .commands import init, config

console = Console()

@click.group()
@click.version_option()
@click.option('--verbose', '-v', is_flag=True, help='Enable verbose output')
@click.pass_context
def cli(ctx: click.Context, verbose: bool) -> None:
    """<description>"""
    ctx.ensure_object(dict)
    ctx.obj['verbose'] = verbose
    ctx.obj['console'] = console

cli.add_command(init.init)
cli.add_command(config.config)

def main() -> None:
    cli(obj={})

if __name__ == '__main__':
    main()

Command Template

import click
from rich.console import Console

@click.command()
@click.argument('directory', type=click.Path())
@click.option(
    '--template', '-t',
    type=click.Choice(['basic', 'advanced']),
    default='basic',
    help='Template to use'
)
@click.option('--force', '-f', is_flag=True, help='Overwrite existing files')
@click.pass_context
def init(ctx: click.Context, directory: str, template: str, force: bool) -> None:
    """Initialize a new project in DIRECTORY."""
    console: Console = ctx.obj['console']
    verbose: bool = ctx.obj['verbose']

    if verbose:
        console.print(f"[dim]Using template: {template}[/dim]")

    console.print(f"[green]Initializing project in {directory}[/green]")

Command Group Template

import click

@click.group()
def config() -> None:
    """Configuration management commands."""
    pass

@config.command()
@click.argument('key')
@click.pass_context
def get(ctx: click.Context, key: str) -> None:
    """Get a configuration value."""
    console = ctx.obj['console']
    console.print(f"Getting {key}")

@config.command()
@click.argument('key')
@click.argument('value')
def set(key: str, value: str) -> None:
    """Set a configuration value."""
    click.echo(f"Setting {key} = {value}")

Dependencies

[tool.poetry.dependencies]
python = ">=3.9"
click = "^8.1.0"
rich = "^13.0.0"

[tool.poetry.group.dev.dependencies]
pytest = "^8.0.0"
pytest-cov = "^4.0.0"
mypy = "^1.0.0"
ruff = "^0.1.0"

Workflow

  1. Validate inputs - Check project name, commands structure
  2. Create directory structure - Set up folders and base files
  3. Generate pyproject.toml - Configure project metadata
  4. Create CLI entry point - Click group setup
  5. Generate commands - Individual command files
  6. Create utilities - Console, config helpers
  7. Set up tests - pytest fixtures and command tests
  8. Initialize git - Optional git initialization

Best Practices Applied

  • Type hints throughout
  • Click context for shared state
  • Rich library for terminal output
  • Command groups for organization
  • Custom parameter types
  • Proper error handling

References

  • Click Documentation: https://click.palletsprojects.com/
  • Click GitHub: https://github.com/pallets/click
  • Rich Library: https://rich.readthedocs.io/

Target Processes

  • cli-application-bootstrap
  • cli-command-structure-design
  • argument-parser-setup

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/click-cli-app-scaffolder-msjwk4u9/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/click-cli-app-scaffolder-msjwk4u9' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/click-cli-app-scaffolder-msjwk4u9/download' --output '.skill-downloads/click-cli-app-scaffolder-msjwk4u9/SKILL.md.part' && mv '.skill-downloads/click-cli-app-scaffolder-msjwk4u9/SKILL.md.part' '.skill-downloads/click-cli-app-scaffolder-msjwk4u9/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Tools declared by the author (check availability in your agent): Read, Write, Edit, Bash, Glob, Grep

Original excerpt: Dependencies
[tool.poetry.dependencies]
python = ">=3.9"
click = "^8.1.0"
rich = "^13.0.0"

[tool.poetry.group.dev.dependencies]
pytest = "^8.0.0"
pytest-cov = "^4.0.0"
mypy = "^1.0.0"
ruff = "^0.1.0"

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/click-cli-app-scaffolder-msjwk4u9/SKILL.md' && test -s '.skill-downloads/click-cli-app-scaffolder-msjwk4u9/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/click-scaffolder' && cp -R '.skill-downloads/click-cli-app-scaffolder-msjwk4u9' '.claude/skills/click-scaffolder'

Cursor
test -f '.skill-downloads/click-cli-app-scaffolder-msjwk4u9/SKILL.md' && test -s '.skill-downloads/click-cli-app-scaffolder-msjwk4u9/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/click-scaffolder' && cp -R '.skill-downloads/click-cli-app-scaffolder-msjwk4u9' '.cursor/skills/click-scaffolder'

Codex
test -f '.skill-downloads/click-cli-app-scaffolder-msjwk4u9/SKILL.md' && test -s '.skill-downloads/click-cli-app-scaffolder-msjwk4u9/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/click-scaffolder' && cp -R '.skill-downloads/click-cli-app-scaffolder-msjwk4u9' '.agents/skills/click-scaffolder'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/click-cli-app-scaffolder-msjwk4u9'

openskills read 'click-cli-app-scaffolder-msjwk4u9'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/click-cli-app-scaffolder-msjwk4u9/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills