SuperAPI AI Directory

hello-world

General & other

View repository

Updated 10-16 06:37

About this skill

Hello World Skill

A reference skill demonstrating all available skill elements: metadata, instructions, workflows, templates, examples, checklists, conditional logic, feedback loops, progressive disclosure, and utility scripts.

Quick Start

  1. Determine the greeting target (user name or default "World")
  2. Select a greeting style (formal, casual, or festive)
  3. Run: python scripts/hello.py --name <target> --style <style>
  4. Return the formatted greeting to the user

Instructions

Step 1: Identify the Target

Extract the greeting target from the user's message. If no name is specified, default to "World".

Step 2: Select Greeting Style

Choose the appropriate style based on context:

Style When to Use Example Output
formal Professional or unknown context "Good day, Dr. Smith."
casual Friendly or informal conversation "Hey there, Alice!"
festive Holidays or celebratory context "Happy holidays, Bob! 🎉"

Step 3: Generate and Deliver

Run the greeting script and return the result to the user.

Workflow

Copy this checklist and track progress:

Task Progress:
- [ ] Step 1: Parse user input for target name
- [ ] Step 2: Determine greeting style from context
- [ ] Step 3: Generate greeting via script or template
- [ ] Step 4: Validate output format
- [ ] Step 5: Deliver greeting to user

Conditional Workflow

  1. Determine the input type:

    User provides a name? → Use that name as the target No name provided? → Default to "World"

  2. Determine the style:

    Formal keywords detected (e.g., "sir", "madam", "professional")? → Use formal Festive keywords detected (e.g., "holiday", "birthday", "celebrate")? → Use festive Otherwise → Use casual

Output Template

Use this template for the greeting response:

# Greeting

**To:** [Target Name]
**Style:** [formal | casual | festive]

---

[Generated Greeting Message]

---

*Generated by hello-world skill*

Examples

Example 1 — Casual greeting:

Input: "Say hi to Alice" Output:

Hey there, Alice! 👋 Welcome aboard!

Example 2 — Formal greeting:

Input: "Please greet Professor Zhang formally" Output:

Good day, Professor Zhang. It is a pleasure to make your acquaintance.

Example 3 — Festive greeting:

Input: "Wish Bob a happy birthday" Output:

Happy Birthday, Bob! 🎂🎉 Wishing you a fantastic year ahead!

Feedback Loop

  1. Generate the greeting
  2. Validate immediately: python scripts/hello.py --validate --input "greeting text"
  3. If validation fails:
    • Review the error message (e.g., missing name, empty output)
    • Fix the issue
    • Run validation again
  4. Only deliver the greeting when validation passes

Utility Scripts

hello.py: Generate and validate greetings

# Generate a greeting
python scripts/hello.py --name "Alice" --style casual

# Validate a greeting
python scripts/hello.py --validate --input "Hey there, Alice!"

# List available styles
python scripts/hello.py --list-styles

Configuration

Default settings can be overridden via environment variables:

Variable Default Description
HELLO_DEFAULT_STYLE casual Default greeting style
HELLO_DEFAULT_NAME World Default target name
HELLO_LOCALE en Locale for greeting language

Resources

Greeting templates and locale data are stored in resources/greetings.json:

  • styles — each style contains a list of templates, the script randomly picks one
  • locales — locale-keyed simple greeting templates (en, zh, ja, es, fr, de)
  • defaults — fallback values for name, style, and locale

To add a new style or locale, edit resources/greetings.json directly — no code changes needed.

Additional Resources