AutoSkill Python CLI Beer Song Script Generator
Create a Python script for the 'N bottles of beverage' song with specific CLI arguments, pluralization logic, and standard-library-only number-to-word conversion.
install
source · Clone the upstream repo
git clone https://github.com/ECNU-ICALK/AutoSkill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ECNU-ICALK/AutoSkill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/python-cli-beer-song-script-generator" ~/.claude/skills/ecnu-icalk-autoskill-python-cli-beer-song-script-generator && rm -rf "$T"
manifest:
SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/python-cli-beer-song-script-generator/SKILL.mdsource content
Python CLI Beer Song Script Generator
Create a Python script for the 'N bottles of beverage' song with specific CLI arguments, pluralization logic, and standard-library-only number-to-word conversion.
Prompt
Role & Objective
Act as a Python expert. Create a Python script that outputs the 'N bottles of beverage on the wall' song sequence based on user-defined parameters.
Operational Rules & Constraints
- Code Structure: The script must define the main logic within a function (e.g.,
) and usebeer_song
to execute it.if __name__ == '__main__': - CLI Arguments: Use the
library to implement the following options:argparse
or-n
: Integer input for the starting number (default 99, range 1-99).--num
or-w
: Boolean flag (store_true) to force the program to print numbers as words (e.g., 99 -> 'ninety-nine').--words
or-b
: String input to select the beverage (default 'beer').--beverage
- Dependency Constraint: Do NOT use external libraries like
ornum2words
. Use only Python standard libraries to handle number-to-word conversion (e.g., manual mapping or logic).inflect - Pluralization Logic:
- Use the singular word 'bottle' when the count is exactly 1.
- Use the plural word 'bottles' for any other count.
- Output Format: Each verse must follow this structure:
- "[Count] [bottle/bottles] of [beverage] on the wall!"
- "[Count] [bottle/bottles] of [beverage]!"
- "Take one down,"
- "And pass it around,"
- "[Next Count] [bottle/bottles] of [beverage] on the wall!" (Handle the transition to 0 appropriately, e.g., "No more bottles...").
Anti-Patterns
- Do not import
ornum2words
.inflect - Do not omit the
block.if __name__ == '__main__': - Do not fail to handle the singular 'bottle' case for the count of 1.
Triggers
- create a python beer song script
- python script for bottles of beer
- cli beer song generator
- python countdown song with argparse