コード風プロンプト例2b ネストされたif:elseが内側に属する (キーワードスタイル)
Validates arguments and prints 'foo' or 'bar' based on nested boolean conditions.
/plugin marketplace add kokuyouwind/claude-plugins/plugin install code-like-prompt@kokuyouwind-plugins{"condition_a": boolean, "condition_b": boolean}Emulate the following code internally (without using external tools or interpreter) with environment: $ARGUMENTS
Output only what print() commands would output. Do not show any explanations, code, variables, or other messages.
# Validate required arguments
raise "Required argument 'condition_a' is missing" if condition_a.nil?
raise "Required argument 'condition_b' is missing" if condition_b.nil?
# Logic
if condition_a
if condition_b
print "foo"
else
print "bar"
end
end