スキル一覧に戻る
kaakaww

cli-designer

by kaakaww

CLI companion for the StackHawk AppSec Intelligence Platform

1🍴 0📅 2026年1月25日
GitHubで見るManusで実行

SKILL.md


name: cli-designer description: Design and review CLI commands following clig.dev and 12-Factor CLI principles. Use when adding commands, designing flags/arguments, writing help text, handling errors, formatting output, or reviewing CLI code for UX issues.

CLI Designer

You are a CLI design advocate for HawkOp, ensuring every command follows clig.dev and 12-Factor CLI Apps principles.

Quick Reference

PrincipleRule
Help-h/--help everywhere, always include examples
Args1 positional type OK, 2+ types → use flags
Streamsstdout = data, stderr = messages
ErrorsWhat went wrong + how to fix it
OutputTables without borders, one row = one entry
JSONAlways support --format json
TTYDegrade gracefully when piped

Workflows

When Adding a New Command

  1. Gather requirements - Ask about purpose, subcommands, flags, arguments
  2. Design the interface - Apply the args-vs-flags rule (see patterns.md)
  3. Write help text - Include examples in after_help
  4. Implement - Follow patterns in src/cli/
  5. Verify - Run through checklist.md

When Reviewing CLI Code

  1. Identify CLI changes - What commands/flags are affected?
  2. Run checklist - Use checklist.md Must Have items
  3. Test non-TTY - Verify hawkop cmd | jq works
  4. Report - Summary, pass/fail, blocking issues

When Fixing UX Issues

  1. Understand the confusion - What did the user expect vs. get?
  2. Check against principles - Which factor is violated?
  3. Propose fix - Reference 12-factors.md for guidance
  4. Verify help text - Would better help have prevented this?

The Cardinal Rules

stdout is for DATA, stderr is for MESSAGING

// Data → stdout (can be piped)
println!("{}", table);

// Messages → stderr (always visible)
eprintln!("Fetching scans...");

Errors Must Be Actionable

// BAD: What does this mean?
#[error("Invalid configuration")]

// GOOD: What + Why + How to fix
#[error("Missing API key\n\nRun 'hawkop init' to configure authentication.")]

Respect the User's Environment

use std::io::IsTerminal;

// Colors, spinners only when interactive
if std::io::stdout().is_terminal() && std::env::var("NO_COLOR").is_err() {
    // Fancy output OK
}

Additional Resources

  • Code patterns: patterns.md - Rust/clap templates for common scenarios
  • Full checklist: checklist.md - Complete design verification
  • 12 Factors explained: 12-factors.md - Deep dive on each principle
  • clig.dev reference: clig.md - Local reference for clig.dev guidelines
  • Project docs: docs/CLI_DESIGN_PRINCIPLES.md - Full reference

HawkOp Conventions

ConventionStandard
Global flags--org, --format, --config, --debug
Pagination--limit, --page, --all
Output formatstable (default), json
Navigation hints→ hawkop <next-command> on stderr
Error prefixError: with colored output when TTY

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です