본문으로 건너뛰기
cccskills
무료GitHub에 공개

help-text-formatter

Generate formatted help text with examples, descriptions, sections, and consistent styling for CLI applications.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(2)

  • SKILL.md5.9 KB
  • README.md1.1 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Help Text Formatter

Generate formatted, user-friendly help text for CLI applications.

Capabilities

  • Generate structured help text layouts
  • Create command examples with descriptions
  • Format options and arguments sections
  • Implement custom help formatters
  • Add color and styling support
  • Generate man page compatible output

Usage

Invoke this skill when you need to:

  • Create consistent help text formatting
  • Add examples to command help
  • Implement custom help renderers
  • Generate documentation from help text

Inputs

ParameterTypeRequiredDescription
languagestringYesTarget language (typescript, python, go)
commandsarrayYesCommand definitions with help text
stylingobjectNoColor and formatting options

Command Structure

{
  "commands": [
    {
      "name": "deploy",
      "description": "Deploy application to target environment",
      "longDescription": "Deploy the application with optional configuration...",
      "arguments": [
        { "name": "service", "description": "Service to deploy" }
      ],
      "options": [
        { "flags": "-e, --env", "description": "Target environment" }
      ],
      "examples": [
        { "command": "deploy api -e production", "description": "Deploy API to production" }
      ]
    }
  ]
}

Generated Patterns

TypeScript Help Formatter

import chalk from 'chalk';

interface HelpSection {
  title: string;
  content: string | string[];
}

export function formatHelp(command: CommandDefinition): string {
  const sections: HelpSection[] = [];

  // Description
  sections.push({
    title: '',
    content: command.description,
  });

  // Usage
  sections.push({
    title: 'Usage',
    content: `  $ ${command.name} ${formatUsage(command)}`,
  });

  // Arguments
  if (command.arguments?.length) {
    sections.push({
      title: 'Arguments',
      content: command.arguments.map(arg =>
        `  ${chalk.cyan(arg.name.padEnd(20))} ${arg.description}`
      ),
    });
  }

  // Options
  if (command.options?.length) {
    sections.push({
      title: 'Options',
      content: command.options.map(opt =>
        `  ${chalk.cyan(opt.flags.padEnd(20))} ${opt.description}`
      ),
    });
  }

  // Examples
  if (command.examples?.length) {
    sections.push({
      title: 'Examples',
      content: command.examples.map(ex =>
        `  ${chalk.dim('$')} ${ex.command}\n  ${chalk.dim(ex.description)}`
      ),
    });
  }

  return renderSections(sections);
}

function renderSections(sections: HelpSection[]): string {
  return sections.map(section => {
    const title = section.title
      ? chalk.bold.underline(section.title) + '\n\n'
      : '';
    const content = Array.isArray(section.content)
      ? section.content.join('\n')
      : section.content;
    return title + content;
  }).join('\n\n');
}

Python Help Formatter

from typing import List, Optional
import textwrap

class HelpFormatter:
    def __init__(self, width: int = 80, indent: int = 2):
        self.width = width
        self.indent = ' ' * indent

    def format_command(self, command: dict) -> str:
        sections = []

        # Description
        sections.append(command['description'])

        # Usage
        usage = self._format_usage(command)
        sections.append(f"Usage:\n{self.indent}{usage}")

        # Arguments
        if args := command.get('arguments'):
            section = self._format_section('Arguments', args)
            sections.append(section)

        # Options
        if opts := command.get('options'):
            section = self._format_section('Options', opts)
            sections.append(section)

        # Examples
        if examples := command.get('examples'):
            section = self._format_examples(examples)
            sections.append(section)

        return '\n\n'.join(sections)

    def _format_section(self, title: str, items: List[dict]) -> str:
        lines = [f"{title}:"]
        for item in items:
            name = item.get('name') or item.get('flags', '')
            desc = item.get('description', '')
            lines.append(f"{self.indent}{name:<20} {desc}")
        return '\n'.join(lines)

    def _format_examples(self, examples: List[dict]) -> str:
        lines = ["Examples:"]
        for ex in examples:
            lines.append(f"{self.indent}$ {ex['command']}")
            lines.append(f"{self.indent}  {ex['description']}")
            lines.append('')
        return '\n'.join(lines).rstrip()

    def _format_usage(self, command: dict) -> str:
        parts = [command['name']]
        for arg in command.get('arguments', []):
            if arg.get('required', True):
                parts.append(f"<{arg['name']}>")
            else:
                parts.append(f"[{arg['name']}]")
        parts.append('[options]')
        return ' '.join(parts)

Workflow

  1. Analyze commands - Review command definitions
  2. Structure sections - Organize help content
  3. Format content - Apply styling and layout
  4. Add examples - Include usage examples
  5. Generate output - Create final help text

Best Practices Applied

  • Consistent section ordering
  • Appropriate indentation
  • Color coding for clarity
  • Example-driven documentation
  • Terminal width awareness
  • Screen reader friendly

Target Processes

  • cli-documentation-generation
  • argument-parser-setup
  • cli-command-structure-design

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Provide implementations of advanced data structures

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

a5c-ai/babysitter1.9천2026년 9월 17일 업데이트

Fresh adversarial code review with binary PASS/FAIL verdicts, evidence citations, and anchoring bias prevention via fresh reviewer spawning.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

a5c-ai/babysitter1.9천2026년 9월 17일 업데이트

WASM-based instant code transforms for simple tasks, achieving 352x speedup over LLM inference with zero cost.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

a5c-ai/babysitter1.9천2026년 9월 17일 업데이트

Coordinate Crew (persistent) and Polecat (transient) agents using Gas Town's hook-based work distribution and GUPP principle.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

a5c-ai/babysitter1.9천2026년 9월 17일 업데이트

Generate visual representations of algorithm execution

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

a5c-ai/babysitter1.9천2026년 9월 17일 업데이트

Hierarchical coordination and drift detection with frequent checkpoints, shared memory coherence validation, role specialization enforcement, and short task cycles.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

a5c-ai/babysitter1.9천2026년 9월 17일 업데이트

a5c-ai의 스킬 모두 보기

이 스킬의 문제 신고