help-text-formatter
Generate formatted help text with examples, descriptions, sections, and consistent styling for CLI applications.
What this skill does
# 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
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| language | string | Yes | Target language (typescript, python, go) |
| commands | array | Yes | Command definitions with help text |
| styling | object | No | Color and formatting options |
### Command Structure
```json
{
"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
```typescript
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
```python
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
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.