Agent skill

interactive-menu-builder-1-basic-menu-structure

Sub-skill of interactive-menu-builder: 1. Basic Menu Structure.

Stars 4
Forks 4

Install this agent skill to your Project

npx add-skill https://github.com/vamseeachanta/workspace-hub/tree/main/.claude/skills/_core/bash/interactive-menu-builder/1-basic-menu-structure

SKILL.md

1. Basic Menu Structure

1. Basic Menu Structure

Single-level menu with numbered options:

bash
#!/bin/bash
# ABOUTME: Basic interactive menu pattern
# ABOUTME: Simple numbered option selection

# Colors
CYAN='\033[0;36m'
GREEN='\033[0;32m'
RED='\033[0;31m'
NC='\033[0m'

show_menu() {
    clear
    echo -e "${CYAN}═══════════════════════════════════════${NC}"
    echo -e "${CYAN}          Main Menu${NC}"
    echo -e "${CYAN}═══════════════════════════════════════${NC}"
    echo ""
    echo "  1) Option One"
    echo "  2) Option Two"
    echo "  3) Option Three"
    echo ""
    echo "  0) Exit"
    echo ""
    echo -e "${CYAN}═══════════════════════════════════════${NC}"
    echo ""
}

handle_choice() {
    local choice="$1"

    case "$choice" in
        1)
            echo "Running Option One..."
            # Implementation
            ;;
        2)
            echo "Running Option Two..."
            # Implementation
            ;;
        3)
            echo "Running Option Three..."
            # Implementation
            ;;
        0)
            echo "Goodbye!"
            exit 0
            ;;
        *)
            echo -e "${RED}Invalid option${NC}"
            ;;
    esac
}

# Main loop
while true; do
    show_menu
    read -p "Select option: " choice
    handle_choice "$choice"
    echo ""
    read -p "Press Enter to continue..."
done

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results