create-cli-command

Generate agentbay-cli commands from frontend API actions with Cobra files and tests.

10|6|Updated Oct 22, 2025
One-click install
npx skills add https://github.com/aliyun/agentbay-cli --skill create-cli-command
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-cli-command
Source: https://github.com/aliyun/agentbay-cli/tree/main/.qoder/skills/create-cli-command
Command: npx skills add https://github.com/aliyun/agentbay-cli --skill create-cli-command

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires go, git, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

Turning frontend API implementations into consistent, tested, and user-friendly agentbay-cli commands is time-consuming and error-prone; this Skill standardizes the full engineering workflow so teams can deliver CLI features reliably and reproducibly.

Core Features & Use Cases

  • Standardized analysis of frontend API implementations, mapping Action, Version, and Product ID for CLI usage.
  • Generate SDK request/response models with validation helpers, client methods (WithOptions, WithContext, simple variants), and response parsers.
  • Create Cobra-based CLI command files with named flags, required-flag validation, command registration, unit tests, mock updates, and customer-facing documentation; common use cases include wrapping CreateApiKey, image management, and concurrency controls.

Quick Start

Ask the assistant to create a new agentbay-cli command by mapping a frontend API action into SDK models, client methods, a cobra command with named flags and validations, unit tests, mock updates, and a customer-facing document.

Frequently Asked Questions about create-cli-command

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

FAQPage Schema
How do I wrap a frontend API into a Go CLI command?

To wrap a frontend API into a Go CLI command, you map the API Action and Version to SDK request models, generate Cobra command files with named flags, and add required validations, unit tests, and documentation.

What's the best way to generate SDK request and response models for CLI commands?

The best way to generate SDK request and response models for CLI commands is to standardize frontend API implementations by creating validation helpers, client methods like WithOptions and WithContext, and automated response parsers.

Do I need Go and Git to create agentbay-cli commands?

Yes, you need Go and Git installed in your environment to create agentbay-cli commands, as the workflow generates Go-based SDK models, Cobra command files, and unit tests within a version-controlled repository.

How does mapping Product ID work for agentbay-cli actions?

Mapping Product ID for agentbay-cli actions involves linking the frontend API's specific Product ID, such as xiaoying, to standard CLI commands for tasks like API key creation, image management, and concurrency controls.

Can I generate unit tests and mock updates automatically for Cobra CLI commands?

Yes, you can generate unit tests and mock update guidance automatically for Cobra CLI commands alongside the command files, SDK models, and required-flag validations to ensure consistent and tested CLI features.

Why does standardizing frontend API implementations into CLI commands matter?

Standardizing frontend API implementations into CLI commands matters because manual wrapping is time-consuming and error-prone, and standardization delivers reliable, reproducible CLI features with consistent SDK models, tests, and customer-facing documentation.