Token导航 LogoToken导航TokenDH.com
前端设计执行命令github未标认证来源可访问clear审计提醒

command-optimization命令优化

Agent Skill

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

总安装

504

周安装

21

GitHub Stars

4

下载量

168
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:command-optimization(命令优化)
来源仓库:https://github.com/89jobrien/steve
仓库路径:skills/command-optimization
安装命令:
npx skills add https://github.com/89jobrien/steve --skill command-optimization
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/89jobrien/steve --skill command-optimization

简介

专注于命令行接口的设计与优化,提升 CLI 工具的可用性。

  • 适用于创建结构清晰的命令、参数解析逻辑和任务自动化流程。
  • 可辅助编写 Shell 脚本、配置补全及跨 shell 兼容性处理。
  • 使用时应结合具体宿主环境,避免依赖特定平台特性。
  • command-optimization 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Command Optimization

This skill specializes in creating, designing, and optimizing command-line interfaces. It focuses on command design patterns, argument parsing, task automation, and CLI best practices.

When to Use This Skill

  • When creating new CLI commands
  • When designing command interfaces
  • When optimizing existing commands
  • When implementing argument parsing
  • When automating tasks via CLI
  • When improving command user experience

What This Skill Does

  1. Command Design: Creates well-structured CLI commands
  2. Argument Parsing: Designs intuitive argument and option structures
  3. Task Automation: Automates repetitive tasks through commands
  4. User Experience: Improves command usability and feedback
  5. Error Handling: Implements robust error handling and validation
  6. Documentation: Creates clear command documentation and help text

How to Use

Create Command

Create a command to generate React components
Design a CLI command for database migrations

Optimize Command

Improve the user experience of this command

Command Design Patterns

Task-Oriented Commands

Structure:

  • Clear action verb (generate, create, build)
  • Target object (component, migration, test)
  • Options for customization
  • Helpful output and feedback

Example:

# Good: Clear and actionable
npm run generate:component UserProfile

# Bad: Unclear purpose
npm run make UserProfile

Analysis Commands

Structure:

  • Analysis type (analyze, check, audit)
  • Target to analyze
  • Output format options
  • Actionable recommendations

Example:

# Good: Clear analysis command
npm run analyze:dependencies -- --outdated

# Bad: Vague command
npm run check

Argument Handling

File/Directory Arguments

Pattern:

  • Accept single file or directory
  • Support glob patterns
  • Validate existence
  • Handle permissions

Example:

# Single file
lint src/utils.js

# Directory
lint src/

# Glob pattern
lint "src/**/*.js"

Configuration Options

Common Options:

  • --config: Custom configuration file
  • --output: Output directory or format
  • --verbose: Detailed logging
  • --dry-run: Preview without execution
  • --force: Override safety checks

Error Handling

Input Validation

Check:

  • File/directory existence
  • Read/write permissions
  • File format validity
  • Required dependencies
  • Configuration syntax

Error Messages

Good Error Messages:

  • Clear description of the problem
  • Specific location (file, line)
  • Suggested fix
  • Context about why it failed

Example:

# Good
Error: Configuration file not found: .eslintrc.json
  Run 'npm run init:config' to create it.

# Bad
Error: File not found

Examples

Example 1: Component Generator Command

Input: Create a command to generate React components

Output:

## Command: generate:component

### Usage

npm run generate:component ComponentName [options]


### Options

- `--path <path>`: Output path (default: src/components)
- `--type <type>`: Component type (functional|class) (default: functional)
- `--with-tests`: Generate test file
- `--with-styles`: Generate stylesheet

### Examples

Basic component

npm run generate:component UserCard

With options

npm run generate:component UserCard --path src/features/users --with-tests --with-styles


### Implementation

// scripts/generate-component.js const componentName = process.argv[2]; const options = parseArgs(process.argv.slice(3));

if (!componentName) { console.error('Error: Component name required'); console.log('Usage: npm run generate:component <Name>'); process.exit(1); }

generateComponent(componentName, options);


### Example 2: Database Migration Command

**Input**: Create a database migration command

**Output**:

Command: db:migrate

Usage

npm run db:migrate [migration-name] [options]

Options

  • --create <table>: Create new migration for table
  • --rollback: Rollback last migration
  • --status: Show migration status
  • --to <version>: Migrate to specific version

Examples

# Create migration
npm run db:migrate --create users

# Run migrations
npm run db:migrate

# Check status
npm run db:migrate --status

# Rollback
npm run db:migrate --rollback
## Reference Files

- **`references/SLASH_COMMAND.template.md`** - Slash command template with frontmatter, dynamic context, and workflow structure

## Best Practices

### Command Design

1. **Clear Names**: Use descriptive, action-oriented names
2. **Consistent Patterns**: Follow project conventions
3. **Helpful Defaults**: Sensible defaults for common use cases
4. **Good Feedback**: Clear output and progress indicators
5. **Error Handling**: Graceful failure with helpful messages

### User Experience

- **Progressive Disclosure**: Show basic usage, advanced options in help
- **Validation**: Validate inputs early with clear errors
- **Confirmation**: Ask for confirmation on destructive operations
- **Dry Run**: Support --dry-run for preview
- **Verbose Mode**: --verbose for detailed output

### Documentation

- **Help Text**: Clear, concise help for each command
- **Examples**: Include practical examples
- **Error Messages**: Explain what went wrong and how to fix
- **README**: Document commands in project README

## Related Use Cases

- Creating project-specific commands
- Automating development tasks
- Building CLI tools
- Improving command usability
- Standardizing command patterns

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

26.91%
按下载量换算45

Antigravity

25.54%
按下载量换算43

Codex

17%
按下载量换算29

OpenCode

11.78%
按下载量换算20

Gemini CLI

8.74%
按下载量换算15

windsurf

3.8%
按下载量换算6

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/89jobrien/steve --skill command-optimization;npx skills add 89jobrien/steve --skill "command-optimization" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills