-
Notifications
You must be signed in to change notification settings - Fork 15
docs: document installed skills management #376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| --- | ||
| name: code-review | ||
| description: Code review guidelines for the OpenHands documentation repository | ||
| triggers: | ||
| - /codereview | ||
| --- | ||
|
|
||
| # Documentation Repository Code Review Guidelines | ||
|
|
||
| You are reviewing changes to the OpenHands documentation site (Mintlify). This repository documents | ||
| multiple source-of-truth codebases. Accuracy is critical. | ||
|
|
||
| ## Source Code Verification (Required for SDK/CLI/App docs) | ||
|
|
||
| When reviewing documentation that references APIs, function signatures, class names, or code examples | ||
| from an upstream repository, you **MUST** clone the corresponding repository and verify the documentation | ||
| against the actual source code. Do not trust that code examples or API descriptions are accurate without | ||
| checking. | ||
|
|
||
| ### Repositories to clone for verification | ||
|
|
||
| | Documentation path | Source repository | | ||
| |--------------------|-------------------| | ||
| | `sdk/` | `OpenHands/software-agent-sdk` | | ||
| | `openhands/` | `OpenHands/OpenHands` | | ||
| | CLI-related docs | `OpenHands/OpenHands-CLI` | | ||
|
|
||
| ### What to verify | ||
|
|
||
| - **Import paths** exist and export the documented symbols | ||
| - **Function/class signatures** match (parameter names, types, defaults, return types) | ||
| - **Field/attribute names** on data classes and models are correct | ||
| - **Supported values** (e.g., format strings like `"github:owner/repo"`) are actually handled in code | ||
| - **Behavioral descriptions** match the implementation logic | ||
| - **Example code** would actually run without errors | ||
|
|
||
| ### How to verify | ||
|
|
||
| ```bash | ||
| # Clone the relevant repo (use --depth=1 for speed) | ||
| git clone --depth=1 https://github.com/OpenHands/software-agent-sdk.git /tmp/agent-sdk | ||
|
|
||
| # Search for the documented symbols | ||
| grep -rn "function_name" /tmp/agent-sdk/ | ||
| ``` | ||
|
|
||
| ## Review Decisions | ||
|
|
||
| ### When to APPROVE | ||
| - Documentation-only style/formatting changes | ||
| - Accurate content verified against source code | ||
| - Changes that correctly sync with upstream code changes | ||
|
|
||
| ### When to COMMENT | ||
| - Documentation claims that cannot be verified against source code | ||
| - Potentially hallucinated API surfaces (functions, parameters, classes that don't exist) | ||
| - Inaccurate signatures, return types, or field names | ||
| - Missing context that could mislead users | ||
|
|
||
| ## General Guidelines | ||
|
|
||
| - Follow the conventions in `/openhands/DOC_STYLE_GUIDE.md` | ||
| - Ensure MDX frontmatter is present and well-formed | ||
| - Check that internal links use absolute doc paths (e.g., `/overview/quickstart`) | ||
| - Verify code blocks with file references use the correct sync format (see `sdk-guidelines.md`) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -102,6 +102,37 @@ Skills are listed in the system prompt: | |
| Add `triggers` to a SKILL.md for **both** progressive disclosure AND automatic injection when keywords match. | ||
| </Tip> | ||
|
|
||
| ## Managing Installed Skills | ||
|
|
||
| You can install AgentSkills into a persistent directory and list/update them | ||
| using `openhands.sdk.skills`. Skills are stored under | ||
| `~/.openhands/skills/installed/` with a `.installed.json` metadata file. | ||
|
|
||
| ```python icon="python" | ||
| from openhands.sdk.skills import ( | ||
| install_skill, | ||
| list_installed_skills, | ||
| load_installed_skills, | ||
| uninstall_skill, | ||
| update_skill, | ||
| ) | ||
|
|
||
| # Install from GitHub (supports git URLs, local paths, and repo_path for monorepos) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Suggestion: The comment says "supports git URLs, local paths, and repo_path for monorepos" but you only show ONE format. Show what these actually look like: # GitHub shorthand
install_skill("githubOpenHands/repo", ref="v1.0.0")
# Git URL
install_skill("git+https://github.com/owner/repo.git")
# Local path
install_skill("/path/to/skill")
# Monorepo with repo_path
install_skill("githubOpenHands/monorepo", repo_path="skills/my-skill")Don't make developers guess the syntax. |
||
| info = install_skill("github:owner/my-skill", ref="v1.0.0") | ||
| print(f"Installed {info.name} from {info.source}") | ||
|
|
||
| # List installed skills | ||
| for skill_info in list_installed_skills(): | ||
| print(f"{skill_info.name}: {skill_info.description}") | ||
|
|
||
| # Load installed skills for an AgentContext | ||
| skills = load_installed_skills() | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 Important: Incomplete example - you say "Load installed skills for an AgentContext" but don't show HOW to use them with an AgentContext. This will break the mental model. Show the complete pattern: from openhands.sdk import Agent, LLM
# Load installed skills
skills = load_installed_skills()
# Use with agent
agent = Agent(llm=LLM("anthropic/claude-3-5-sonnet-20241022"), skills=skills)Or whatever the actual usage is. Half an example is worse than no example. |
||
|
|
||
| # Update or uninstall | ||
| update_skill("my-skill") | ||
| uninstall_skill("my-skill") | ||
| ``` | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @OpenHands please check OpenHands/software-agent-sdk codebase to verify if this is actually correct? Also /remember this in .agents/skills/code-review.md following https://docs.openhands.dev/openhands/usage/use-cases/code-review#repository-specific-review-guidelines I want to remember the preference that the code review bot SHOULD try to clone the repo (either OpenHands/software-agent-sdk, OpenHands/OpenHands-CLI, OpenHands/OpenHands) and find actual code corresponding to the code to verify that the docs is actually accurate and is not hallucinating stuff that doesn't exists in the codebase. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm on it! xingyaoww can track my progress at all-hands.dev There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. SummaryI addressed the PR comment by performing two actions: 1. Verified Documentation Accuracy ✅I cloned 2. Created
|
||
|
|
||
| --- | ||
|
|
||
| ## Full Example | ||
|
|
||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟠 Important: Missing context - WHY would someone use persistent installed skills instead of defining
AgentSkill()inline in their code?This is solving a problem without explaining what problem you're solving. Add 1-2 sentences explaining the use case: