Skip to content

Click package best practices and patterns. Use for any Click-related code including CLI development, commands, options, arguments, groups, contexts, parameters, or testing.

License

Notifications You must be signed in to change notification settings

fbruckhoff/click-package-skill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Click Package Skill

A comprehensive AI skill that guides AI agents in properly using the Click Python package for CLI development. This skill provides best practices, patterns, and detailed guidance for building robust command-line interfaces.

πŸ“ Skill Structure

click-package
β”œβ”€β”€ SKILL.md              # Main skill definition and overview
└── reference/            # Detailed reference documentation
    β”œβ”€β”€ click-advanced-groups-context.md
    β”œβ”€β”€ click-architecture.md
    β”œβ”€β”€ click-callbacks.md
    β”œβ”€β”€ click-commands.md
    β”œβ”€β”€ click-completion.md
    β”œβ”€β”€ click-context.md
    β”œβ”€β”€ click-decorators.md
    β”œβ”€β”€ click-exceptions.md
    β”œβ”€β”€ click-files.md
    β”œβ”€β”€ click-formatting.md
    β”œβ”€β”€ click-help.md
    β”œβ”€β”€ click-info.md
    β”œβ”€β”€ click-parameters.md
    β”œβ”€β”€ click-parsing.md
    β”œβ”€β”€ click-prompts.md
    β”œβ”€β”€ click-testing.md
    β”œβ”€β”€ click-types.md
    β”œβ”€β”€ click-unicode.md
    └── click-utilities.md

🎯 Purpose

This skill serves as an expert guide for AI assistants and developers working with Click, covering:

  • CLI architecture and design patterns
  • Command and group organization
  • Parameter handling and validation
  • User interaction and file handling
  • Testing and error handling
  • Advanced Click features

πŸš€ Usage

This skill is designed to be used by AI assistants when working with Click-related code. It provides comprehensive guidance for:

  • Getting Started: Project setup, dependencies, and entry points
  • Commands & Structure: Command organization, groups, and context management
  • Parameters & Validation: Options, arguments, types, and callbacks
  • User Interaction: Prompts, file handling, and utilities
  • Documentation: Help pages, formatting, and shell completion
  • Testing & Error Handling: Testing strategies and exception management
  • Advanced Topics: Parsing, Unicode support, and extension

πŸ“š Key Features

  • Comprehensive Coverage: 19 detailed reference documents covering all aspects of Click
  • Best Practices: Architecture patterns and CLI design guidelines
  • Practical Examples: Real-world usage patterns and code examples
  • Testing Guidance: Complete testing strategies with CliRunner
  • Error Handling: Robust exception handling and exit code management

πŸ› οΈ Reference Documentation

The skill includes detailed condensed reference documentation for every Click feature and best practices, using progressive disclosure for efficiency.

  • click-info.md - Click overview and concepts
  • click-architecture.md - Project structure and design patterns
  • click-commands.md - Commands and groups
  • click-parameters.md - Options, arguments, and validation
  • click-testing.md - Testing with CliRunner
  • click-context.md - Context object usage
  • click-types.md - Built-in and custom types
  • click-callbacks.md - Validation and callbacks
  • click-prompts.md - User input and interaction
  • click-files.md - File handling and I/O
  • click-utilities.md - Output, colors, and progress bars
  • click-help.md - Documentation and help pages
  • click-formatting.md - Custom help formatting
  • click-completion.md - Shell completion
  • click-exceptions.md - Error handling and exit codes
  • click-parsing.md - Command parsing
  • click-unicode.md - Unicode support
  • click-decorators.md - Common decorators and shortcuts
  • click-advanced-groups-context.md - Nested commands and shared state

πŸ€– AI Skill Integration

This skill is designed to be consumed by AI assistants to provide expert guidance on Click development. When working with Click-related code, the AI should:

  1. Reference the appropriate documentation based on the specific task
  2. Follow best practices outlined in the architecture guide
  3. Implement proper testing using the testing guidelines
  4. Handle errors appropriately using the exception handling patterns
  5. Provide comprehensive help and documentation for CLI tools

πŸ“– Getting Started with Click

For developers new to Click, the skill provides guidance on:

  • Setting up virtual environments
  • Adding Click to project dependencies
  • Creating package entry points
  • Following architectural best practices
  • Implementing proper testing strategies

🀝 Contributing

Contributions to improve the guidance, add new patterns, or update for newer Click versions are welcome.

Related Resources

πŸ“„ License

MIT. Enjoy πŸŽ‰

About

Click package best practices and patterns. Use for any Click-related code including CLI development, commands, options, arguments, groups, contexts, parameters, or testing.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published