Conversation
Adds a cloudamqp-cli skill that teaches Claude Code how to use the CLI. Ships via `cloudamqp install skills` which embeds the skill files in the binary and copies them to ~/.claude/skills/cloudamqp-cli/.
P1/P2 fixes: - install.go: use strings.TrimPrefix + filepath.FromSlash instead of filepath.Rel on embedded paths — fixes cross-platform path handling on Windows where embed always uses forward slashes - install.go: add cobra.NoArgs to installSkillsCmd to reject unexpected positional arguments - cmd/install_test.go: add unit test for installSkillsCmd that verifies all skill files are written to the correct HOME-relative path - SKILL.md: clarify output flag support — only read commands support -o json, write commands print plain text - scripting.md: fix jq filter for ready (string "Yes"/"No", not bool), fix tag filter (tags is comma-joined string, requires --details), fix instance create pipe (human prefix before JSON, use tail -n +2) Dismissed: - SKILL.md quick-start comment about API key: removed in earlier iteration, not present in current diff Verification: go fmt, go vet, go test all pass (Go not on PATH locally; CI will validate)
This comment was marked as resolved.
This comment was marked as resolved.
snichme
left a comment
There was a problem hiding this comment.
There are references to non-existing flags in the skill.
Also is the skill needed? When I've asked Claude to use the CLI it has figured out the usage by appending --help to each sub command and then built up the knowledge.
| cloudamqp instance get --id <id> -o json | jq -r '.url' | ||
|
|
||
| # find instances that aren't ready (requires --details; ready is "Yes"/"No" string) | ||
| cloudamqp instance list --details -o json | jq -r '.[] | select(.ready == "No") | "\(.id) \(.name)"' |
There was a problem hiding this comment.
--details and -o json isn't valid flags for the CLI
Will looking into it
It will be much better at knowing when and how to use the cli. You won't have to be as explicit in telling it to use the cli. E.g |
Yes, if it makes the usage better of course. I know this works now:
But you need to tell it to use the CLI :) |
Exactly :) |
baelter
left a comment
There was a problem hiding this comment.
Re the comment on scripting.md: --details and -o json are valid. --details is defined on instance list, and -o is a persistent global flag (--output) on the root command. cloudamqp instance list --help shows both.
Skill value: before/after comparisonRan 3 prompts with and without the skill loaded (using Prompt: "spin up a RabbitMQ instance on AWS in us-east-1"Without skill — Claude fabricates a positional-argument interface: cloudamqp instance create my-rabbitmq lemur amazon-web-services::us-east-1It also invents plan names ( With skill — correct flag syntax, and tells you to look up plan/region names first: cloudamqp plans --backend=rabbitmq
cloudamqp regions --provider=amazon-web-services
cloudamqp instance create \
--name=my-rabbit \
--plan=<plan-name> \
--region=amazon-web-services::us-east-1 \
--waitPrompt: "get the connection URL for instance 12345 without showing credentials"Without skill — wrong flag ( cloudamqp instance get 12345 --format=json | jq -r '.url | gsub(...)'With skill — correct, plus knows about the cloudamqp instance get --id 12345 -o json | jq -r '.url'
# URL is masked by default; add --show-url if you want credentialsPrompt: "upgrade all instances tagged staging to latest RabbitMQ"Both produced correct output here. The upgrade patterns are common enough that the model gets them right from training data alone. The gap is widest where the CLI deviates from conventions Claude has seen before. The training data shows a positional-argument style CLI; the actual CLI uses named flags throughout. Without the skill, Claude confidently produces wrong syntax. With it, it uses the right interface on the first try. |
My bad, I was checking against an older version of the CLI. Yes they exists and work. |
Summary
cmd/skills/cloudamqp-cli/— a Claude Code skill that teaches Claude how to use thecloudamqpCLI (commands, auth, async behavior, reference guides for scripting, upgrades, and VPC setup)cmd/install.go— implementscloudamqp install skillswhich embeds the skill files in the binary and copies them to~/.claude/skills/cloudamqp-cli/README.mdwith a short Claude Code sectionMirrors the pattern from microsoft/playwright-cli.
Test plan
cloudamqp install skillscreates~/.claude/skills/cloudamqp-cli/withSKILL.mdandreferences/go buildsucceeds with embedded skill files