add-repository
FreeNo executable scriptsNot checkedAdd a new Git repository to the message registry for automatic message type loading. Use when the user wants to support message types from a new ROS2…
by ROBOTIS-GIT★ 32 GitHub starsAbout this skill
Add Repository
This skill guides you through adding a new Git repository to the zenoh_ros2_sdk/_repositories.py file to enable automatic message type loading.
When to Use
- User wants to add support for message types from a new ROS2 repository
- User asks to support a specific repository (e.g., "support geometry2", "add tf2_msgs")
- Message types are not found because the repository isn't registered
- Adding support for new message packages
1. Discover Repository Structure
First, identify the repository URL and explore its structure to find message packages.
A. Get Repository URL
The user may provide:
- Full GitHub URL (e.g.,
https://github.com/ros2/geometry2.git) - Repository name (e.g.,
geometry2) - Package name (e.g.,
tf2_msgs)
B. Explore Repository Contents
Use curl to check the repository structure:
# List all directories in the repository
curl -s https://api.github.com/repos/ros2/geometry2/contents | \
python3 -c "import sys, json; data = json.load(sys.stdin); \
dirs = [item['name'] for item in data if item['type'] == 'dir']; \
print('\n'.join(sorted(dirs)))"
C. Find Message Packages
Check which directories contain message definitions:
# Check if a package has a msg directory
curl -s https://api.github.com/repos/ros2/geometry2/contents/tf2_msgs | \
python3 -c "import sys, json; data = json.load(sys.stdin); \
print('\n'.join([item['name'] for item in data if item['type'] == 'dir']))"
D. List Available Messages
Check what messages are in a package:
# List .msg files in a package
curl -s https://api.github.com/repos/ros2/geometry2/contents/tf2_msgs/msg | \
python3 -c "import sys, json; data = json.load(sys.stdin); \
msgs = [item['name'] for item in data if item['name'].endswith('.msg')]; \
print('\n'.join(sorted(msgs)))"
2. Determine Repository Structure
Identify the repository layout pattern:
Pattern A: Meta-Repository (Multiple Packages)
Structure: <repo_root>/<package>/msg/<message>.msg
- Example:
common_interfaces,rcl_interfaces,geometry2 - Contains multiple packages in subdirectories
- Each package has its own
msg/directory
Pattern B: Single Package Repository
Structure: <repo_root>/msg/<message>.msg or <repo_root>/<package>/msg/<message>.msg
- Example:
example_interfaces - Single package, messages at repo root or in package subdirectory
3. Determine Commit/Tag
Choose an appropriate commit or tag:
- Recommended: Use stable ROS2 distribution tags (e.g.,
jazzy,iron,humble) for consistency with other repositories - Default: Use
jazzyto match existing repositories (rcl_interfaces,common_interfaces,example_interfaces,geometry2) - Rolling: Use
rollingbranch only if you need latest development features - Specific version: Use commit SHA or version tag for reproducibility
Check available tags:
curl -s https://api.github.com/repos/ros2/geometry2/tags | \
python3 -c "import sys, json; data = json.load(sys.stdin); \
print('\n'.join([tag['name'] for tag in data[:10]]))"
4. Add Repository Entry
Edit zenoh_ros2_sdk/_repositories.py and add a new entry to MESSAGE_REPOSITORIES:
Template for Meta-Repository
# Repository name (descriptive, matches repo name)
"repository_name": MessageRepository(
url="https://github.com/ros2/repository_name.git",
commit="jazzy", # Use jazzy for consistency with other repositories
cache_path="repository_name", # Local cache directory name
msg_path="", # Empty for standard structure: <package>/msg/<message>.msg
packages=[
"package1", # List all message packages in this repository
"package2",
# ... more packages
],
),
Template for Single Package Repository
"package_name": MessageRepository(
url="https://github.com/ros2/package_name.git",
commit="jazzy", # Use jazzy for consistency, or specific tag/commit
cache_path="package_name",
msg_path="", # Adjust if messages are at repo root vs package subdirectory
packages=[
"package_name", # Single package
],
),
Example: Adding geometry2
# Geometry2 (contains tf2_msgs and other TF2-related packages)
# This repository contains TF2 transform message definitions
# Reference: https://github.com/ros2/geometry2
"geometry2": MessageRepository(
url="https://github.com/ros2/geometry2.git",
commit="jazzy", # Use specific commit/tag for reproducibility
cache_path="geometry2",
msg_path="", # Messages are at <package>/msg/<message>.msg
packages=[
"tf2_msgs", # Contains TFMessage, TF2Error messages
],
),
5. Verify Package Mapping
The PACKAGE_TO_REPOSITORY mapping is automatically generated at the bottom of the file. Verify it includes your new packages:
# Mapping from message package namespace to repository name
PACKAGE_TO_REPOSITORY: Dict[str, str] = {}
for rep
Install add-repository in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the add-repository skill do?
Add a new Git repository to the message registry for automatic message type loading. Use when the user wants to support message types from a new ROS2 repository, or when adding support for a new message package.
How do I install the add-repository skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the add-repository skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
by Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
by Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
by Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
by Anthropic