Agent skill
click
Command Line Interface Creation Kit
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/fixtures-skilldoai-skilldo
SKILL.md
Imports
import click
from click import command, option, argument
Core Patterns
Basic Command
Create a simple CLI command with Click.
import click
@click.command()
def hello():
click.echo('Hello World!')
if __name__ == '__main__':
hello()
Command with Options
Add options to your CLI command.
import click
@click.command()
@click.option('--count', default=1, help='Number of greetings.')
@click.option('--name', prompt='Your name', help='The person to greet.')
def hello(count, name):
for _ in range(count):
click.echo(f'Hello {name}!')
if __name__ == '__main__':
hello()
Command with Arguments
Use positional arguments in your CLI.
import click
@click.command()
@click.argument('name')
def hello(name):
click.echo(f'Hello {name}!')
if __name__ == '__main__':
hello()
Configuration
Click commands are decorated with @click.command() and options with @click.option().
Use click.echo() instead of print() for consistent output across platforms.
Pitfalls
Wrong: Using print() instead of click.echo()
@click.command()
def hello():
print("Hello") # May have encoding issues
Right: Always use click.echo()
@click.command()
def hello():
click.echo("Hello") # Handles encoding properly
References
- Official Documentation: https://click.palletsprojects.com/
- GitHub: https://github.com/pallets/click
- PyPI: https://pypi.org/project/click/
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?