add-python-command — for Claude Code add-python-command, ishlib, community, for Claude Code, ide skills, cli.py, CLAUDE.md, ishfiles, isholate, register(subparsers)

v1.0.0

Об этом навыке

Подходящий сценарий: Ideal for AI agents that need add or update a python cli subcommand. Локализованное описание: # Add or update a Python CLI subcommand Every CLI in src/pyishlib/ uses argparse subcommands — never flag-based dispatch. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

Возможности

Add or update a Python CLI subcommand
Every CLI in src/pyishlib/ uses argparse subcommands — never flag-based
dispatch. This skill walks through the four-way update every new or changed
Before you start: read the relevant CLI's current cli.py and one
nearby subcommand implementation so the new one matches style. Also

# Core Topics

ishkamiel ishkamiel
[0]
[0]
Updated: 4/19/2026

Killer-Skills Review

Decision support comes first. Repository text comes second.

Reference-Only Page Review Score: 8/11

This page remains useful for operators, but Killer-Skills treats it as reference material instead of a primary organic landing page.

Original recommendation layer Concrete use-case guidance Explicit limitations and caution
Review Score
8/11
Quality Score
49
Canonical Locale
en
Detected Body Locale
en

Подходящий сценарий: Ideal for AI agents that need add or update a python cli subcommand. Локализованное описание: # Add or update a Python CLI subcommand Every CLI in src/pyishlib/ uses argparse subcommands — never flag-based dispatch. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

Зачем использовать этот навык

Рекомендация: add-python-command helps agents add or update a python cli subcommand. Add or update a Python CLI subcommand Every CLI in src/pyishlib/ uses argparse subcommands — never flag-based dispatch. This AI agent

Подходит лучше всего

Подходящий сценарий: Ideal for AI agents that need add or update a python cli subcommand.

Реализуемые кейсы использования for add-python-command

Сценарий использования: Applying Add or update a Python CLI subcommand
Сценарий использования: Applying Every CLI in src/pyishlib/ uses argparse subcommands — never flag-based
Сценарий использования: Applying dispatch. This skill walks through the four-way update every new or changed

! Безопасность и ограничения

  • Ограничение: Output goes through log = logging.getLogger( name ). Only a
  • Ограничение: add common args(p)). Do not attach them to the top-level parser
  • Ограничение: parents=[common] pattern has the same bug and must not be used for

Why this page is reference-only

  • - Current locale does not satisfy the locale-governance contract.
  • - The underlying skill quality score is below the review floor.

Source Boundary

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

After The Review

Decide The Next Action Before You Keep Reading Repository Material

Killer-Skills should not stop at opening repository instructions. It should help you decide whether to install this skill, when to cross-check against trusted collections, and when to move into workflow rollout.

Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is add-python-command?

Подходящий сценарий: Ideal for AI agents that need add or update a python cli subcommand. Локализованное описание: # Add or update a Python CLI subcommand Every CLI in src/pyishlib/ uses argparse subcommands — never flag-based dispatch. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

How do I install add-python-command?

Run the command: npx killer-skills add ishkamiel/ishlib. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for add-python-command?

Key use cases include: Сценарий использования: Applying Add or update a Python CLI subcommand, Сценарий использования: Applying Every CLI in src/pyishlib/ uses argparse subcommands — never flag-based, Сценарий использования: Applying dispatch. This skill walks through the four-way update every new or changed.

Which IDEs are compatible with add-python-command?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for add-python-command?

Ограничение: Output goes through log = logging.getLogger( name ). Only a. Ограничение: add common args(p)). Do not attach them to the top-level parser. Ограничение: parents=[common] pattern has the same bug and must not be used for.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add ishkamiel/ishlib. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use add-python-command immediately in the current project.

! Reference-Only Mode

This page remains useful for installation and reference, but Killer-Skills no longer treats it as a primary indexable landing page. Read the review above before relying on the upstream repository instructions.

Upstream Repository Material

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

Upstream Source

add-python-command

# Add or update a Python CLI subcommand Every CLI in src/pyishlib/ uses argparse subcommands — never flag-based dispatch. This AI agent skill supports Claude

SKILL.md
Readonly
Upstream Repository Material
The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.
Supporting Evidence

Add or update a Python CLI subcommand

Every CLI in src/pyishlib/ uses argparse subcommands — never flag-based dispatch. This skill walks through the four-way update every new or changed subcommand needs.

Before you start: read the relevant CLI's current cli.py and one nearby subcommand implementation so the new one matches style. Also skim the "Python CLI Tools" section of CLAUDE.md.

Where each tool lives

ToolParserSubcommand implementations
ishfilesishfiles/cli.pyOne module per command in ishfiles/commands/<name>.py.
isholateisholate/cli.pyFunctions in isholate/container.py (or a sibling).

Other (future) Python CLIs follow the same split.

The four-way update

A subcommand is always four things kept in sync. Land them in the same commit.

1. Implementation

  • ishfiles: create src/pyishlib/ishfiles/commands/<name>.py with register(subparsers) and run(cfg) functions. register attaches the subparser; run takes the IshConfig object and returns int. Read paths/constants from cfg, never from module-level imports.
  • isholate: add a named function in container.py (or a sibling module if it's large). It takes explicit kwargs — not argparse.Namespace — so it's easy to unit-test.
  • Output goes through log = logging.getLogger(__name__). Only a command's product output (a diff, a table, a path) may use print(). See the Logging section in CLAUDE.md.

2. Parser wiring in cli.py

  • In build_parser(), add a subparser via sub.add_parser("<name>", help="...", description="...").
  • Attach the common -v/-q flags via the shared helper (e.g. _add_common_args(p)). Do not attach them to the top-level parser — argparse subparser defaults would clobber top-level values. The parents=[common] pattern has the same bug and must not be used for -v/-q.
  • Add subcommand-specific flags with full help=... text.
  • Use parser.add_mutually_exclusive_group() for mutex flag sets.
  • For passthrough command args, use nargs=argparse.REMAINDER as the last positional on the subparser (not the top-level parser).

3. Dispatch in main()

Match args.subcommand and call the implementation with explicit kwargs:

python
1if args.subcommand == "<name>": 2 return <implementation>( 3 username, 4 option=args.option, 5 ... 6 )

Don't pass the whole args namespace unless the implementation genuinely needs most of it (the run subcommand in isholate is the one exception — it forwards a lot of state to launch_and_exec).

4. Tests in pytest/python/test_<tool>.py

Hermetic environment. pytest/conftest.py replaces os.environ wholesale at session start, keeping only PATH/HOME/TMPDIR from the host and injecting fixed git identity and /dev/null git config vars. Subprocesses spawned without env= automatically inherit this clean environment — no per-test env setup needed. To override a var for a specific test, build env = os.environ.copy() and extend it. See CLAUDE.md §Hermetic subprocess environment.

At minimum:

  • Parser defaults — a test that parse_args(["<name>"]) sets the expected defaults.
  • Each flag — one test per non-trivial flag confirming it parses.
  • Mutex groups — a test that conflicting flags raise SystemExit.
  • Dispatch — a test that cli_main(["<name>", ...]) calls the implementation with the right kwargs (use unittest.mock.patch on the cli.py-level name, e.g. pyishlib.isholate.cli.<impl>).
  • Doesn't dispatch other things — when useful, assert that unrelated implementations (launch_and_exec, etc.) are NOT called.

Run just the affected test module while iterating:

bash
1pytest pytest/python/test_<tool>.py -q

Updating an existing subcommand

Same four-way update. Treat flag renames, removed flags, changed defaults, and changed dispatch kwargs as CLI-breaking: migrate the tests in the same commit. Don't leave dead --old-name aliases as compat shims unless the user asks for them explicitly.

Breaking CLI changes

Call out the break in the commit message so users who pull the change can update their invocations.

Quick checklist

  • Implementation module/function with docstring
  • Subparser in build_parser() with help= and description=
  • Common args via shared helper (NOT on top-level parser)
  • Dispatch branch in main()
  • Parser-shape tests (defaults + each flag)
  • Mutex-group tests (if any mutex flags)
  • Dispatch test with mocked implementation
  • README / docs swept for old invocation shapes (if renaming)
  • pytest pytest/python/test_<tool>.py passes
  • ruff check src/ and ruff format --check src/ clean

Связанные навыки

Looking for an alternative to add-python-command or another community skill for your workflow? Explore these related open-source skills.

Показать все

openclaw-release-maintainer

Logo of openclaw
openclaw

Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

widget-generator

Logo of f
f

Создание настраиваемых плагинов виджетов для системы ленты новостей prompts.chat

flags

Logo of vercel
vercel

Фреймворк React

138.4k
0
Браузер

pr-review

Logo of pytorch
pytorch

Tensors and Dynamic neural networks in Python with strong GPU acceleration

98.6k
0
Разработчик