Skip to content

Conversation

@neubig
Copy link
Contributor

@neubig neubig commented Jan 5, 2026

Summary

This PR adds validation improvements for skills, following the AgentSkills standard.

Changes

1. Export validate_skill_name in Public API

from openhands.sdk.context.skills import validate_skill_name

errors = validate_skill_name("my-skill")
if errors:
    print("Invalid skill name:", errors)

2. Description Length Validation

Pydantic validator enforces max 1024 characters per AgentSkills spec:

from openhands.sdk.context.skills import Skill

# This will raise SkillValidationError
skill = Skill(name="test", content="...", description="x" * 1025)

Backward Compatibility

  • All changes are backward compatible
  • New exports are additive

Testing

Added 2 tests for description length validation.

Related Issues

Part of #1473 (Support AgentSkills standard)


Agent Server images for this PR

GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server

Variants & Base Images

Variant Architectures Base Image Docs / Tags
java amd64, arm64 eclipse-temurin:17-jdk Link
python amd64, arm64 nikolaik/python-nodejs:python3.12-nodejs22 Link
golang amd64, arm64 golang:1.21-bookworm Link

Pull (multi-arch manifest)

# Each variant is a multi-arch manifest supporting both amd64 and arm64
docker pull ghcr.io/openhands/agent-server:b7b1667-python

Run

docker run -it --rm \
  -p 8000:8000 \
  --name agent-server-b7b1667-python \
  ghcr.io/openhands/agent-server:b7b1667-python

All tags pushed for this build

ghcr.io/openhands/agent-server:b7b1667-golang-amd64
ghcr.io/openhands/agent-server:b7b1667-golang_tag_1.21-bookworm-amd64
ghcr.io/openhands/agent-server:b7b1667-golang-arm64
ghcr.io/openhands/agent-server:b7b1667-golang_tag_1.21-bookworm-arm64
ghcr.io/openhands/agent-server:b7b1667-java-amd64
ghcr.io/openhands/agent-server:b7b1667-eclipse-temurin_tag_17-jdk-amd64
ghcr.io/openhands/agent-server:b7b1667-java-arm64
ghcr.io/openhands/agent-server:b7b1667-eclipse-temurin_tag_17-jdk-arm64
ghcr.io/openhands/agent-server:b7b1667-python-amd64
ghcr.io/openhands/agent-server:b7b1667-nikolaik_s_python-nodejs_tag_python3.12-nodejs22-amd64
ghcr.io/openhands/agent-server:b7b1667-python-arm64
ghcr.io/openhands/agent-server:b7b1667-nikolaik_s_python-nodejs_tag_python3.12-nodejs22-arm64
ghcr.io/openhands/agent-server:b7b1667-golang
ghcr.io/openhands/agent-server:b7b1667-java
ghcr.io/openhands/agent-server:b7b1667-python

About Multi-Architecture Support

  • Each variant tag (e.g., b7b1667-python) is a multi-arch manifest supporting both amd64 and arm64
  • Docker automatically pulls the correct architecture for your platform
  • Individual architecture tags (e.g., b7b1667-python-amd64) are also available if needed

- Enhanced SkillValidationError with errors list parameter
- Export validate_skill_name in public API
- Add Pydantic validator for description length (max 1024 chars)

Part of #1473 (Support AgentSkills standard)

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

github-actions bot commented Jan 5, 2026

Coverage

Coverage Report •
FileStmtsMissCoverMissing
openhands-sdk/openhands/sdk/context/skills
   skill.py28120327%64, 68–69, 73–74, 78–79, 181–182, 185, 191–197, 203–207, 213–220, 248, 250–251, 253–254, 256, 267–268, 270–273, 276, 279–281, 286–289, 292–295, 297, 313–315, 318–319, 323, 325–328, 331, 334–336, 338, 364, 367, 375, 380–382, 388, 390–396, 399, 410–411, 422, 439, 441–442, 454–455, 460, 467, 477–478, 480, 486–487, 489, 498–501, 503–506, 514–516, 524–526, 549–550, 552–555, 558–559, 562–564, 567–568, 573–574, 579–580, 584–585, 591, 612–613, 615–618, 620–622, 627–631, 633, 637–638, 640, 643, 661–662, 664–665, 668, 673–675, 678, 680–682, 687–691, 693, 698–699, 703, 706, 745, 747, 749–750, 752–754, 757–760, 763, 765, 768–770, 774–780, 782–783, 785, 788
TOTAL14646696152% 

- Remove SkillValidationError errors list (overkill)
- Slim down tests to just description validation (2 tests)
- Keep validate_skill_name export and description length validator

Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
@neubig neubig marked this pull request as ready for review January 6, 2026 13:26
@neubig neubig requested a review from juanmichelini January 6, 2026 15:15
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!

@neubig neubig merged commit 5ec1804 into main Jan 7, 2026
22 checks passed
@neubig neubig deleted the feat/skill-validation-improvements branch January 7, 2026 14:19
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