Skip to content

Add Claude Code skill and install command#43

Merged
baelter merged 6 commits intomainfrom
skill/claude-code
Apr 2, 2026
Merged

Add Claude Code skill and install command#43
baelter merged 6 commits intomainfrom
skill/claude-code

Conversation

@baelter
Copy link
Copy Markdown
Member

@baelter baelter commented Mar 31, 2026

Summary

  • Adds cmd/skills/cloudamqp-cli/ — a Claude Code skill that teaches Claude how to use the cloudamqp CLI (commands, auth, async behavior, reference guides for scripting, upgrades, and VPC setup)
  • Adds cmd/install.go — implements cloudamqp install skills which embeds the skill files in the binary and copies them to ~/.claude/skills/cloudamqp-cli/
  • Updates README.md with a short Claude Code section

Mirrors the pattern from microsoft/playwright-cli.

Test plan

  • cloudamqp install skills creates ~/.claude/skills/cloudamqp-cli/ with SKILL.md and references/
  • Skill appears in Claude Code skill list after install
  • go build succeeds with embedded skill files

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/.
@baelter baelter marked this pull request as ready for review March 31, 2026 19:51
@baelter baelter requested review from Copilot and snichme March 31, 2026 19:51

This comment was marked as resolved.

baelter added 2 commits March 31, 2026 22:03
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)
@baelter

This comment was marked as resolved.

Copy link
Copy Markdown
Member

@snichme snichme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)"'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--details and -o json isn't valid flags for the CLI

@baelter
Copy link
Copy Markdown
Member Author

baelter commented Apr 1, 2026

There are references to non-existing flags in the skill.

Will looking into it

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.

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
"What regions are supported on CloudAMQP?" - without to skill I doubt it will figure out to use the cli?

@snichme
Copy link
Copy Markdown
Member

snichme commented Apr 1, 2026

"What regions are supported on CloudAMQP?" - without to skill I doubt it will figure out to use the cli?

Yes, if it makes the usage better of course.

I know this works now:

"Using the CloudAMQP CLI, create a new 3-node RabbitMQ cluster called 'production-bunny' in the US-East region with the bunny plan. Once the cluster is provisioned and ready, enable the MQTT plugin."

But you need to tell it to use the CLI :)

@baelter
Copy link
Copy Markdown
Member Author

baelter commented Apr 2, 2026

But you need to tell it to use the CLI

Exactly :)

Copy link
Copy Markdown
Member Author

@baelter baelter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@baelter
Copy link
Copy Markdown
Member Author

baelter commented Apr 2, 2026

Skill value: before/after comparison

Ran 3 prompts with and without the skill loaded (using --append-system-prompt to inject skill content for the WITH case; baseline used the model's training data only). The main finding: Claude's training data has a completely different and wrong interface for this CLI.


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-1

It also invents plan names (tiger, bunny, rabbit) and gets the instance info syntax wrong.

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 \
  --wait

Prompt: "get the connection URL for instance 12345 without showing credentials"

Without skill — wrong flag (--format instead of -o), positional ID:

cloudamqp instance get 12345 --format=json | jq -r '.url | gsub(...)'

With skill — correct, plus knows about the --show-url flag for the inverse case:

cloudamqp instance get --id 12345 -o json | jq -r '.url'
# URL is masked by default; add --show-url if you want credentials

Prompt: "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.

@snichme
Copy link
Copy Markdown
Member

snichme commented Apr 2, 2026

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.

My bad, I was checking against an older version of the CLI. Yes they exists and work.

@baelter baelter merged commit b66425e into main Apr 2, 2026
1 check passed
@baelter baelter deleted the skill/claude-code branch April 2, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants