Skip to content

Add sample plugins for testing and training#59

Open
jpshackelford wants to merge 3 commits intomainfrom
add-sample-plugins
Open

Add sample plugins for testing and training#59
jpshackelford wants to merge 3 commits intomainfrom
add-sample-plugins

Conversation

@jpshackelford
Copy link
Contributor

Summary

Add two sample plugins from jpshackelford/openhands-sample-plugins for testing plugin infrastructure and training users on the plugin format.

Added Plugins

city-weather

Get current weather, time, and precipitation forecast for any city using the free Open-Meteo API (no API key required).

Features:

  • Provides slash command /city-weather:now <city>
  • Shows temperature in both Fahrenheit and Celsius
  • Displays precipitation forecast for next 4 hours

Usage:

/city-weather:now New York
/city-weather:now Tokyo
/city-weather:now London

magic-test

A simple test plugin for verifying plugin loading works correctly.

Features:

  • Triggers on magic words: "alakazam", "abracadabra", "magic word"
  • Returns a specific phrase to verify plugins are working correctly

Purpose:

  • Verify that plugins are fetched correctly from the repository
  • Confirm skill loading and merging into agent context
  • Test that skill triggers are working properly

Testing

These plugins were originally developed and tested in the source repository and follow the Claude Code plugin marketplace format.

@jpshackelford can click here to continue refining the PR

Add two sample plugins from jpshackelford/openhands-sample-plugins:

- city-weather: Get current weather, time, and precipitation forecast
  for any city using the free Open-Meteo API (no API key required)
  - Provides slash command /city-weather:now <city>
  - Shows temperature in both Fahrenheit and Celsius
  - Displays precipitation forecast for next 4 hours

- magic-test: A simple test plugin for verifying plugin loading
  - Triggers on magic words: alakazam, abracadabra
  - Returns a specific phrase to verify plugins are working

These plugins are useful for testing plugin infrastructure and training
users on the plugin format.

Co-authored-by: openhands <openhands@all-hands.dev>
Register city-weather and magic-test plugins in the marketplace
for discoverability.

Co-authored-by: openhands <openhands@all-hands.dev>
@jpshackelford
Copy link
Contributor Author

Note that the use of .claude-plugin folder here is intentional as the city-weather plugin is used to demonstrate Claude / OpenHands plugin compatibility.

Document the city-weather plugin with:
- Feature overview and usage examples
- Instructions for testing plugin loading via OpenHands Cloud API
- SDK usage example for software-agent-sdk 1.10.0+
- Plugin structure and API reference

Co-authored-by: openhands <openhands@all-hands.dev>
@jpshackelford jpshackelford marked this pull request as ready for review February 19, 2026 20:58
@neubig
Copy link
Contributor

neubig commented Feb 20, 2026

Note that the use of .claude-plugin folder here is intentional as the city-weather plugin is used to demonstrate Claude / OpenHands plugin compatibility.

Are you sure that claude plugins need this though? I think they can also just support .plugin, which would be more natural here.

Copy link
Collaborator

@juanmichelini juanmichelini left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor Author

I investigated this and unfortunately Claude Code only supports .claude-plugin - it does not recognize .plugin as an alternative.

Tested with Claude Code v2.1.62 using non-interactive validation:

# With .claude-plugin directory - works
claude plugin validate plugins/city-weather
# ✔ Validation passed

# With only .plugin directory (renamed .claude-plugin away) - fails
claude plugin validate plugins/city-weather
# ✘ Found 1 error:
#   ❯ directory: No manifest found in directory. Expected .claude-plugin/marketplace.json or .claude-plugin/plugin.json

The CLI explicitly looks for .claude-plugin/plugin.json or .claude-plugin/marketplace.json - there's no fallback to .plugin.

So the current structure with .claude-plugin/plugin.json in each plugin directory is correct and required for Claude Code compatibility.

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.

4 participants