add-python-command

Automate the four-way update workflow for Python CLI subcommands in ishlib tools.

Updated Mar 19, 2021
One-click install
npx skills add https://github.com/ishkamiel/ishlib --skill add-python-command
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-python-command
Source: https://github.com/ishkamiel/ishlib/tree/main/.claude/skills/add-python-command
Command: npx skills add https://github.com/ishkamiel/ishlib --skill add-python-command

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers add or update a Python CLI subcommand for ishlib, ensuring consistent implementation, parser wiring, dispatch, and testing across tools like ishfiles and isholate.

Core Features & Use Cases

  • Four-way update workflow: implementation, parser wiring, dispatch, and tests.
  • Keeps new subcommands aligned with existing CLI patterns and argparse subparsers.
  • Supports updating existing commands while preserving style and test coverage.

Quick Start

Add a new subcommand to ishlib by implementing the command, wiring it into the parser, dispatching the call, and updating the tests.

Frequently Asked Questions about add-python-command

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

FAQPage Schema
How do I add a subcommand to a Python CLI using argparse subparsers?

To add a Python CLI subcommand using argparse subparsers, you must follow a four-way update workflow: implement the command logic, wire the parser, update the dispatch function, and write tests. This ensures consistent CLI behavior and test coverage.

What is the standard workflow for updating an existing Python CLI subcommand?

Updating an existing Python CLI subcommand involves modifying the implementation, adjusting the argparse parser wiring, updating the dispatch logic, and expanding the test suite. This workflow preserves existing style and maintains hermetic testing standards for the CLI project.

Do I need to write tests when adding a new argparse subcommand to ishlib?

Yes, writing tests is required when adding an argparse subcommand to ishlib. The process mandates a hermetic testing setup and structured review of CLI changes, ensuring new subcommands conform to the project's established testing strategy and maintain coverage.

What's the best way to ensure consistent dispatch logic across multiple Python CLI subcommands?

The best way to ensure consistent dispatch logic across Python CLI subcommands is to use a structured four-way update workflow. This approach standardizes implementation, parser wiring, dispatch routing, and testing, conforming to established argparse subparsers patterns and project guidelines.

How does the four-way update workflow work for Python CLI tools?

The four-way update workflow for Python CLI tools operates by sequentially addressing implementation, parser wiring, dispatch, and tests. It ensures that adding or updating subcommands aligns with existing argparse patterns and project-specific configuration guidelines like CLAUDE.md.

Can I update ishlib CLI subcommands without breaking existing argparse parser configurations?

Yes, you can update ishlib CLI subcommands without breaking existing argparse parser configurations by following the prescribed workflow. It carefully integrates updates into the parser wiring and dispatch logic while preserving the original style and test coverage.