python-cli

Implement Python CLI conventions with Ruff, mypy, and pytest.

Updated Apr 30, 2026
One-click install
npx skills add https://github.com/zalman0813/gan-harness --skill python-cli-zalman0813
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-cli
Source: https://github.com/zalman0813/gan-harness/tree/main/improver/setup-gan-harness-skills/iteration-1/eval-greenfield-cli/without_skill/outputs/.claude/skills/python-cli
Command: npx skills add https://github.com/zalman0813/gan-harness --skill python-cli-zalman0813

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a set of conventions for Python CLI code development within the gan-harness framework, making it easier to create and manage CLI applications with specific layout, linting, and testing practices.

Core Features & Use Cases

  • Standard Layout: Utilizes src/ layout as per PEP 621 for clear organization.
  • Linting: Uses Ruff for linting with auto-fixing during pre-commit hooks.
  • Type Checking: Enforces strict type checking with mypy.
  • Testing: Implements unit tests with pytest to ensure CLI behavior.

Quick Start

Use the python-cli skill when initializing a new Python CLI project within the gan-harness.

Frequently Asked Questions about python-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up a Python CLI project with linting and type checking conventions?

Setting up a Python CLI project with linting and type checking involves using a standard `src/` layout, Ruff for automated linting, mypy for strict type checking, and pytest for testing. This Skill provides these conventions for the gan-harness framework to ensure consistent project structure.

What is the recommended project layout for Python CLI applications?

The recommended project layout for Python CLI applications is the `src/` layout as specified by PEP 621. This structure separates source code from project metadata, ensuring clear organization and preventing import errors during development and testing.

Does this Python CLI setup integrate Ruff for automated code linting?

Yes, this Python CLI setup integrates Ruff for automated code linting. Ruff is configured to run during pre-commit hooks with auto-fixing enabled, ensuring that code quality standards are enforced automatically before changes are committed.

Can I enforce strict type checking for my Python command-line application?

You can enforce strict type checking for your Python command-line application using mypy. This Skill configures mypy to apply strict type validation rules, catching type-related errors early in the development lifecycle to improve code reliability.

How do I test Python CLI behavior with pytest?

To test Python CLI behavior with pytest, you implement unit tests that validate command-line application functionality and edge cases. This Skill establishes testing practices using pytest to ensure comprehensive coverage of CLI behavior within the gan-harness framework.