add-cli-flag

Standardize new CLI argument implementation across structs, validation, tests, and README updates.

3|2|Updated May 20, 2026
One-click install
npx skills add https://github.com/openkaiden/openshell-image-builder --skill add-cli-flag
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-cli-flag
Source: https://github.com/openkaiden/openshell-image-builder/tree/main/.agents/skills/add-cli-flag
Command: npx skills add https://github.com/openkaiden/openshell-image-builder --skill add-cli-flag

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a comprehensive, end-to-end checklist for developers to ensure that new CLI flags in the openshell-image-builder are correctly implemented, tested, and documented without missing critical integration steps.

Core Features & Use Cases

  • Structural Integrity: Guides the developer through updating the Clap CLI struct and passing arguments through the application lifecycle.
  • Validation & Testing: Ensures proper error handling for incompatible flag combinations and mandates both unit and integration testing.
  • Documentation Sync: Automates the process of updating the README tables and feature lists to keep user-facing documentation accurate.

Quick Start

Follow the add-cli-flag checklist to implement and verify a new command line argument for the image builder.

Frequently Asked Questions about add-cli-flag

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

FAQPage Schema
What steps are required to add a new CLI flag in Rust?

Adding a CLI flag in Rust requires updating the Clap struct definition, passing arguments through the application lifecycle, adding validation logic for incompatible combinations, writing unit and integration tests, and updating README documentation tables.

How do I ensure my new CLI argument is properly tested in Rust?

Proper testing for a new CLI argument requires writing unit tests and integration tests that validate the flag's behavior, verify error handling for incompatible flag combinations, and ensure consistent integration across CLI and container build modules.

How do I keep CLI documentation synchronized when adding new command line arguments?

To keep CLI documentation synchronized, you must update README tables and feature lists during the flag implementation process to ensure user-facing documentation accurately reflects the new command line arguments and their behavior.

Why do I need a checklist for CLI flag development?

A CLI flag development checklist is needed to prevent missing critical integration steps across struct definitions, validation logic, testing, and documentation, ensuring new features are consistently integrated across the CLI, container build, and policy generation modules.

How do I handle incompatible CLI flag combinations in Rust?

To handle incompatible CLI flag combinations in Rust, implement validation logic that detects conflicting arguments passed through the application lifecycle and enforces proper error handling before the container build process begins.

Does this CLI flag implementation process work with container build and policy generation modules?

Yes, this implementation process ensures new CLI arguments are consistently integrated across the CLI, container build process, and policy generation modules, standardizing the feature lifecycle from struct definition to documentation.