number}' --- Emulate the following code internally (without using external tools or interpreter) with environment: $ARGUMENTS Output only what puts() commands would output. Do not show any explanations, code, variables, or other messages. ```ruby # Validate required arguments raise "Required argument 'Milk.stock' is missing" if Milk.stock.nil? raise "Required argument 'Egg.stock' is missing" if Egg.stock.nil? # Shopping logic puts("Bought 1 milk.") if Egg.exists? # Egg.exists? means Egg.stock > 0 puts("Bought 6 eggs.") end ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 https://github.com/kokuyouwind/claude-plugins/blob/main/plugins/code-like-prompt/commands/01-shopping-request.md?plain=1 17
number}' --- Emulate the following code internally (without using external tools or interpreter) with environment: $ARGUMENTS Output only what puts() commands would output. Do not show any explanations, code, variables, or other messages. ```ruby # Validate required arguments raise "Required argument 'Milk.stock' is missing" if Milk.stock.nil? raise "Required argument 'Egg.stock' is missing" if Egg.stock.nil? # Shopping logic puts("Bought 1 milk.") if Egg.exists? # Egg.exists? means Egg.stock > 0 puts("Bought 6 eggs.") end ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 https://github.com/kokuyouwind/claude-plugins/blob/main/plugins/code-like-prompt/commands/01-shopping-request.md?plain=1 「外部ツールを使わずエミュレートする」 これを書かないとインタプリタで コードを実⾏しようとする 18
number}' --- Emulate the following code internally (without using external tools or interpreter) with environment: $ARGUMENTS Output only what puts() commands would output. Do not show any explanations, code, variables, or other messages. ```ruby # Validate required arguments raise "Required argument 'Milk.stock' is missing" if Milk.stock.nil? raise "Required argument 'Egg.stock' is missing" if Egg.stock.nil? # Shopping logic puts("Bought 1 milk.") if Egg.exists? # Egg.exists? means Egg.stock > 0 puts("Bought 6 eggs.") end ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 https://github.com/kokuyouwind/claude-plugins/blob/main/plugins/code-like-prompt/commands/01-shopping-request.md ここが疑似コード指示の本体 ( 以降はこの部分のみ表示) 19
foo が出⼒されるべき > /code-like-prompt:02a-dangling-else-outer-block { condition_a: true, condition_b: true } ⏺ foo # a = true, b = false なので 何も出⼒しないべき > /code-like-prompt:02a-dangling-else-outer-block { condition_a: true, condition_b: false } ⏺ I need to trace through this code with the given values: - condition_a = true - condition_b = false Following the execution: 1. condition_a is not NULL, so no error 2. condition_b is not NULL, so no error 3. condition_a is true, so enter the first if block 4. Inside that block, condition_b is false, so the inner if block is skipped 5. No else clause for the inner if, so nothing happens 6. The outer else clause is not executed because condition_a was true Therefore, no printf() statements are executed, resulting in no output. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 https://github.com/kokuyouwind/claude-plugins/blob/main/plugins/code-like-prompt/commands/02a-dangling-else-outer-block.md ? 27
String, value :: Int } deriving (Show, Eq) main :: IO () main = do -- record argument is provided as Record type let record = getRecord "record" case record of Record "foo" v -> putStrLn $ "foo:" ++ show v Record "bar" v | v > 10 -> putStrLn "bar-large" Record "bar" v -> putStrLn "bar-small" Record l _ -> putStrLn $ "other:" ++ l 1 2 3 4 5 6 7 8 9 10 11 12 13 https://github.com/kokuyouwind/claude-plugins/blob/main/plugins/code-like-prompt/commands/04b-structural-match.md 49
c). connected(X, Y) :- path(X, Y). connected(X, Y) :- path(X, Z), connected(Z, Y). ?- connected(a, X), write(X), write(' '), fail. 1 2 3 4 5 6 7 8 9 10 # b c d c d が出⼒されてほしいが、実⾏ごとに結果が変わってしまう > /code-like-prompt:07-b-multi-clause ⏺ a b c c d > /code-like-prompt:07-b-multi-clause ⏺ a b c d 1 2 3 4 5 6 😣 56
'./rbs_goose.yml') puts(file.contents) until('If there are no problems with the above settings file, please answer yes. If you wish to update the file, please describe the changes.') do file.update_contents end # Setup tools config = Config.load('./rbs_goose.yml') unless gemfile.contain?('rbs') puts('setup rbs...') fetch('https://github.com/soutaro/steep') setup_rbs # ... 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 https://github.com/kokuyouwind/claude-plugins/blob/main/plugins/rbs-goose/commands/setup.md 66
Record mode - always call API and update cache BOOT_VCR_MODE=record go test -v # Replay mode - only use cache (fail on cache miss) BOOT_VCR_MODE=replay go test -v # 標準実⾏で auto なので、⾃動で再⽣・追記される 1 2 3 4 5 6 7 8 73