@openhands/extensions 0.0.1-alpha → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/custom-codereview-guide.md +25 -0
- package/.github/pull_request_template.md +38 -0
- package/.github/release.yml +14 -0
- package/.github/workflows/check-extensions.yml +72 -0
- package/.github/workflows/npm-publish.yml +89 -0
- package/.github/workflows/pr.yml +30 -0
- package/.github/workflows/release.yml +24 -0
- package/.github/workflows/tests.yml +25 -0
- package/.github/workflows/vulnerability-scan.yml +87 -0
- package/.release-please-manifest.json +3 -0
- package/AGENTS.md +132 -0
- package/README.md +10 -0
- package/analysis_results.md +162 -0
- package/marketplaces/large-codebase.json +66 -0
- package/marketplaces/openhands-extensions.json +682 -0
- package/package.json +4 -10
- package/plugins/README.md +30 -0
- package/plugins/city-weather/.plugin/plugin.json +13 -0
- package/plugins/city-weather/README.md +145 -0
- package/plugins/city-weather/commands/now.md +56 -0
- package/plugins/cobol-modernization/.plugin/plugin.json +19 -0
- package/plugins/cobol-modernization/README.md +201 -0
- package/plugins/cobol-modernization/references/troubleshooting.md +18 -0
- package/plugins/cobol-modernization/skills/build-setup/SKILL.md +78 -0
- package/plugins/cobol-modernization/skills/build-setup/scripts/install-gnucobol.sh +32 -0
- package/plugins/cobol-modernization/skills/cobol-modernization-overview/SKILL.md +113 -0
- package/plugins/cobol-modernization/skills/mainfraime-removal/SKILL.md +62 -0
- package/plugins/cobol-modernization/skills/mainfraime-removal/references/cics-transformation-examples.md +45 -0
- package/plugins/cobol-modernization/skills/mainframe-planning/SKILL.md +78 -0
- package/plugins/cobol-modernization/skills/to-java-migration/SKILL.md +59 -0
- package/plugins/cobol-modernization/skills/to-java-migration/references/cobol-to-java-example.md +58 -0
- package/plugins/cobol-modernization/skills/to-java-migration/references/datatype-mappings.md +19 -0
- package/plugins/issue-duplicate-checker/.plugin/plugin.json +13 -0
- package/plugins/issue-duplicate-checker/README.md +51 -0
- package/plugins/issue-duplicate-checker/action.yml +349 -0
- package/plugins/issue-duplicate-checker/scripts/auto_close_duplicate_issues.py +569 -0
- package/plugins/issue-duplicate-checker/scripts/issue_duplicate_check_openhands.py +681 -0
- package/plugins/issue-duplicate-checker/scripts/post_duplicate_notice.js +220 -0
- package/plugins/issue-duplicate-checker/scripts/remove_duplicate_candidate_label.js +27 -0
- package/plugins/magic-test/.plugin/plugin.json +13 -0
- package/plugins/magic-test/skills/magic-word/SKILL.md +33 -0
- package/plugins/migration-scoring/.plugin/plugin.json +19 -0
- package/plugins/migration-scoring/README.md +244 -0
- package/plugins/migration-scoring/skills/migration-mapping/SKILL.md +72 -0
- package/plugins/migration-scoring/skills/migration-report/SKILL.md +118 -0
- package/plugins/migration-scoring/skills/migration-scoring-overview/SKILL.md +126 -0
- package/plugins/migration-scoring/skills/score-quality/SKILL.md +54 -0
- package/plugins/migration-scoring/skills/score-quality/references/scoring-criteria.md +30 -0
- package/plugins/migration-scoring/skills/score-style/SKILL.md +106 -0
- package/plugins/onboarding/.plugin/plugin.json +20 -0
- package/plugins/onboarding/README.md +30 -0
- package/plugins/onboarding/references/criteria.md +144 -0
- package/plugins/onboarding/skills/agent-readiness-report/README.md +23 -0
- package/plugins/onboarding/skills/agent-readiness-report/SKILL.md +122 -0
- package/plugins/onboarding/skills/agent-readiness-report/scripts/scan_agent_instructions.sh +88 -0
- package/plugins/onboarding/skills/agent-readiness-report/scripts/scan_build_env.sh +114 -0
- package/plugins/onboarding/skills/agent-readiness-report/scripts/scan_feedback_loops.sh +133 -0
- package/plugins/onboarding/skills/agent-readiness-report/scripts/scan_policy.sh +113 -0
- package/plugins/onboarding/skills/agent-readiness-report/scripts/scan_workflows.sh +127 -0
- package/plugins/onboarding/skills/improve-agent-readiness/README.md +19 -0
- package/plugins/onboarding/skills/improve-agent-readiness/SKILL.md +167 -0
- package/plugins/onboarding/skills/setup-agents-md/README.md +15 -0
- package/plugins/onboarding/skills/setup-agents-md/SKILL.md +150 -0
- package/plugins/onboarding/skills/setup-openhands/README.md +20 -0
- package/plugins/onboarding/skills/setup-openhands/SKILL.md +56 -0
- package/plugins/onboarding/skills/setup-pr-review/README.md +23 -0
- package/plugins/onboarding/skills/setup-pr-review/SKILL.md +72 -0
- package/plugins/openhands/.plugin/plugin.json +13 -0
- package/plugins/openhands/README.md +52 -0
- package/plugins/openhands/SKILL.md +61 -0
- package/plugins/openhands/commands/create.md +55 -0
- package/plugins/openhands/commands/openhands-cloud.md +8 -0
- package/plugins/openhands/scripts/run.sh +69 -0
- package/plugins/pr-review/.plugin/plugin.json +13 -0
- package/plugins/pr-review/README.md +393 -0
- package/plugins/pr-review/action.yml +298 -0
- package/plugins/pr-review/scripts/agent_script.py +1282 -0
- package/plugins/pr-review/scripts/evaluate_review.py +655 -0
- package/plugins/pr-review/scripts/prompt.py +260 -0
- package/plugins/pr-review/workflows/pr-review-by-openhands.yml +51 -0
- package/plugins/pr-review/workflows/pr-review-evaluation.yml +85 -0
- package/plugins/qa-changes/.plugin/plugin.json +11 -0
- package/plugins/qa-changes/README.md +185 -0
- package/plugins/qa-changes/action.yml +181 -0
- package/plugins/qa-changes/scripts/agent_script.py +406 -0
- package/plugins/qa-changes/scripts/evaluate_qa_changes.py +385 -0
- package/plugins/qa-changes/scripts/prompt.py +174 -0
- package/plugins/qa-changes/workflows/qa-changes-by-openhands.yml +50 -0
- package/plugins/qa-changes/workflows/qa-changes-evaluation.yml +85 -0
- package/plugins/release-notes/.plugin/plugin.json +19 -0
- package/plugins/release-notes/README.md +283 -0
- package/plugins/release-notes/SKILL.md +83 -0
- package/plugins/release-notes/action.yml +117 -0
- package/plugins/release-notes/commands/release-notes.md +8 -0
- package/plugins/release-notes/scripts/agent_script.py +292 -0
- package/plugins/release-notes/scripts/generate_release_notes.py +733 -0
- package/plugins/release-notes/scripts/prompt.py +90 -0
- package/plugins/release-notes/scripts/validate_release_notes.py +328 -0
- package/plugins/release-notes/workflows/release-notes.yml +76 -0
- package/plugins/vulnerability-remediation/.plugin/plugin.json +19 -0
- package/plugins/vulnerability-remediation/README.md +217 -0
- package/plugins/vulnerability-remediation/action.yml +187 -0
- package/plugins/vulnerability-remediation/scripts/scan_and_remediate.py +561 -0
- package/plugins/vulnerability-remediation/workflows/vulnerability-scan.yml +87 -0
- package/pyproject.toml +12 -0
- package/release-please-config.json +16 -0
- package/scripts/sync_extensions.py +494 -0
- package/scripts/sync_openhands_sdk_skill.py +264 -0
- package/skills/README.md +159 -0
- package/skills/add-javadoc/.plugin/plugin.json +18 -0
- package/skills/add-javadoc/README.md +40 -0
- package/skills/add-javadoc/SKILL.md +35 -0
- package/skills/add-javadoc/references/example.md +32 -0
- package/skills/add-skill/.plugin/plugin.json +18 -0
- package/skills/add-skill/README.md +67 -0
- package/skills/add-skill/SKILL.md +47 -0
- package/skills/add-skill/scripts/fetch_skill.py +259 -0
- package/skills/agent-creator/.plugin/plugin.json +20 -0
- package/skills/agent-creator/README.md +104 -0
- package/skills/agent-creator/SKILL.md +190 -0
- package/skills/agent-creator/commands/agent-creator.md +8 -0
- package/skills/agent-creator/references/fallback.md +117 -0
- package/skills/agent-memory/.plugin/plugin.json +18 -0
- package/skills/agent-memory/README.md +35 -0
- package/skills/agent-memory/SKILL.md +30 -0
- package/skills/agent-memory/commands/remember.md +8 -0
- package/skills/agent-sdk-builder/.plugin/plugin.json +18 -0
- package/skills/agent-sdk-builder/README.md +40 -0
- package/skills/agent-sdk-builder/SKILL.md +37 -0
- package/skills/agent-sdk-builder/commands/agent-builder.md +8 -0
- package/skills/azure-devops/.plugin/plugin.json +18 -0
- package/skills/azure-devops/README.md +55 -0
- package/skills/azure-devops/SKILL.md +50 -0
- package/skills/bitbucket/.plugin/plugin.json +17 -0
- package/skills/bitbucket/README.md +50 -0
- package/skills/bitbucket/SKILL.md +45 -0
- package/skills/code-review/.plugin/plugin.json +19 -0
- package/skills/code-review/README.md +18 -0
- package/skills/code-review/SKILL.md +208 -0
- package/skills/code-review/commands/codereview-roasted.md +8 -0
- package/skills/code-review/commands/codereview.md +8 -0
- package/skills/code-review/references/risk-evaluation.md +41 -0
- package/skills/code-review/references/supply-chain-security.md +31 -0
- package/skills/code-simplifier/.plugin/plugin.json +21 -0
- package/skills/code-simplifier/README.md +30 -0
- package/skills/code-simplifier/SKILL.md +91 -0
- package/skills/code-simplifier/commands/simplify.md +8 -0
- package/skills/code-simplifier/references/code-quality-review.md +86 -0
- package/skills/code-simplifier/references/code-reuse-review.md +63 -0
- package/skills/code-simplifier/references/efficiency-review.md +81 -0
- package/skills/datadog/.plugin/plugin.json +19 -0
- package/skills/datadog/README.md +100 -0
- package/skills/datadog/SKILL.md +95 -0
- package/skills/deno/.plugin/plugin.json +18 -0
- package/skills/deno/README.md +5 -0
- package/skills/deno/SKILL.md +99 -0
- package/skills/deno/references/README.md +6 -0
- package/skills/discord/.plugin/plugin.json +18 -0
- package/skills/discord/README.md +31 -0
- package/skills/discord/SKILL.md +109 -0
- package/skills/discord/__init__.py +0 -0
- package/skills/discord/references/REFERENCE.md +78 -0
- package/skills/discord/scripts/__init__.py +0 -0
- package/skills/discord/scripts/_http.py +127 -0
- package/skills/discord/scripts/post_webhook.py +106 -0
- package/skills/discord/scripts/send_message.py +102 -0
- package/skills/docker/.plugin/plugin.json +17 -0
- package/skills/docker/README.md +34 -0
- package/skills/docker/SKILL.md +29 -0
- package/skills/evidence-based-citations/.plugin/plugin.json +20 -0
- package/skills/evidence-based-citations/README.md +31 -0
- package/skills/evidence-based-citations/SKILL.md +59 -0
- package/skills/flarglebargle/.plugin/plugin.json +16 -0
- package/skills/flarglebargle/README.md +14 -0
- package/skills/flarglebargle/SKILL.md +9 -0
- package/skills/frontend-design/.plugin/plugin.json +21 -0
- package/skills/frontend-design/LICENSE.txt +177 -0
- package/skills/frontend-design/README.md +42 -0
- package/skills/frontend-design/SKILL.md +42 -0
- package/skills/github/.plugin/plugin.json +19 -0
- package/skills/github/README.md +42 -0
- package/skills/github/SKILL.md +106 -0
- package/skills/github-pr-review/.plugin/plugin.json +18 -0
- package/skills/github-pr-review/README.md +145 -0
- package/skills/github-pr-review/SKILL.md +148 -0
- package/skills/github-pr-review/commands/github-pr-review.md +8 -0
- package/skills/github-pr-reviewer/.plugin/plugin.json +20 -0
- package/skills/github-pr-reviewer/README.md +34 -0
- package/skills/github-pr-reviewer/SKILL.md +89 -0
- package/skills/github-pr-reviewer/commands/pr-reviewer:setup.md +8 -0
- package/skills/github-repo-monitor/.plugin/plugin.json +22 -0
- package/skills/github-repo-monitor/README.md +70 -0
- package/skills/github-repo-monitor/SKILL.md +316 -0
- package/skills/github-repo-monitor/commands/github-monitor:poll.md +8 -0
- package/skills/github-repo-monitor/references/github-api.md +241 -0
- package/skills/github-repo-monitor/references/state-schema.md +160 -0
- package/skills/github-repo-monitor/scripts/main.py +915 -0
- package/skills/github-repo-monitor/tests/test_main.py +400 -0
- package/skills/gitlab/.plugin/plugin.json +17 -0
- package/skills/gitlab/README.md +37 -0
- package/skills/gitlab/SKILL.md +32 -0
- package/skills/incident-retrospective/.plugin/plugin.json +21 -0
- package/skills/incident-retrospective/README.md +34 -0
- package/skills/incident-retrospective/SKILL.md +98 -0
- package/skills/incident-retrospective/commands/incident-retro:setup.md +8 -0
- package/skills/iterate/.plugin/plugin.json +13 -0
- package/skills/iterate/README.md +25 -0
- package/skills/iterate/SKILL.md +399 -0
- package/skills/iterate/commands/babysit.md +8 -0
- package/skills/iterate/commands/iterate.md +8 -0
- package/skills/iterate/commands/verify.md +8 -0
- package/skills/iterate/references/heuristics.md +58 -0
- package/skills/iterate/references/verification.md +96 -0
- package/skills/jupyter/.plugin/plugin.json +18 -0
- package/skills/jupyter/README.md +55 -0
- package/skills/jupyter/SKILL.md +50 -0
- package/skills/kubernetes/.plugin/plugin.json +18 -0
- package/skills/kubernetes/README.md +53 -0
- package/skills/kubernetes/SKILL.md +48 -0
- package/skills/learn-from-code-review/.plugin/plugin.json +19 -0
- package/skills/learn-from-code-review/README.md +64 -0
- package/skills/learn-from-code-review/SKILL.md +186 -0
- package/skills/learn-from-code-review/commands/learn-from-reviews.md +8 -0
- package/skills/linear/.plugin/plugin.json +19 -0
- package/skills/linear/README.md +58 -0
- package/skills/linear/SKILL.md +213 -0
- package/skills/linear-triage/.plugin/plugin.json +21 -0
- package/skills/linear-triage/README.md +34 -0
- package/skills/linear-triage/SKILL.md +91 -0
- package/skills/linear-triage/commands/linear-triage:setup.md +8 -0
- package/skills/notion/.plugin/plugin.json +17 -0
- package/skills/notion/README.md +114 -0
- package/skills/notion/SKILL.md +109 -0
- package/skills/npm/.plugin/plugin.json +17 -0
- package/skills/npm/README.md +14 -0
- package/skills/npm/SKILL.md +9 -0
- package/skills/openhands-api/.plugin/plugin.json +22 -0
- package/skills/openhands-api/README.md +48 -0
- package/skills/openhands-api/SKILL.md +399 -0
- package/skills/openhands-api/references/README.md +33 -0
- package/skills/openhands-api/references/TROUBLESHOOTING.md +81 -0
- package/skills/openhands-api/references/example_prompt.md +12 -0
- package/skills/openhands-api/scripts/openhands_api.py +606 -0
- package/skills/openhands-api/scripts/openhands_api.ts +252 -0
- package/skills/openhands-automation/.plugin/plugin.json +19 -0
- package/skills/openhands-automation/README.md +89 -0
- package/skills/openhands-automation/SKILL.md +875 -0
- package/skills/openhands-automation/commands/automation:create.md +8 -0
- package/skills/openhands-automation/references/ab-testing.md +185 -0
- package/skills/openhands-automation/references/custom-automation.md +644 -0
- package/skills/openhands-sdk/.plugin/plugin.json +20 -0
- package/skills/openhands-sdk/README.md +22 -0
- package/skills/openhands-sdk/SKILL.md +229 -0
- package/skills/openhands-sdk/commands/sdk.md +8 -0
- package/skills/pdflatex/.plugin/plugin.json +18 -0
- package/skills/pdflatex/README.md +39 -0
- package/skills/pdflatex/SKILL.md +34 -0
- package/skills/prd/.plugin/plugin.json +19 -0
- package/skills/prd/README.md +28 -0
- package/skills/prd/SKILL.md +237 -0
- package/skills/prd/commands/prd.md +8 -0
- package/skills/qa-changes/README.md +18 -0
- package/skills/qa-changes/SKILL.md +229 -0
- package/skills/qa-changes/commands/qa-changes.md +8 -0
- package/skills/release-notes/README.md +24 -0
- package/skills/release-notes/SKILL.md +19 -0
- package/skills/release-notes/commands/release-notes.md +8 -0
- package/skills/research-brief/.plugin/plugin.json +20 -0
- package/skills/research-brief/README.md +34 -0
- package/skills/research-brief/SKILL.md +99 -0
- package/skills/research-brief/commands/research-brief:setup.md +8 -0
- package/skills/security/.plugin/plugin.json +18 -0
- package/skills/security/README.md +38 -0
- package/skills/security/SKILL.md +33 -0
- package/skills/skill-creator/.plugin/plugin.json +17 -0
- package/skills/skill-creator/LICENSE.txt +202 -0
- package/skills/skill-creator/README.md +182 -0
- package/skills/skill-creator/SKILL.md +545 -0
- package/skills/skill-creator/references/output-patterns.md +82 -0
- package/skills/skill-creator/references/workflows.md +28 -0
- package/skills/skill-creator/scripts/init_skill.py +303 -0
- package/skills/skill-creator/scripts/quick_validate.py +95 -0
- package/skills/slack-channel-monitor/.plugin/plugin.json +21 -0
- package/skills/slack-channel-monitor/README.md +91 -0
- package/skills/slack-channel-monitor/SKILL.md +276 -0
- package/skills/slack-channel-monitor/commands/slack-monitor:poll.md +8 -0
- package/skills/slack-channel-monitor/references/slack-api.md +207 -0
- package/skills/slack-channel-monitor/references/state-schema.md +180 -0
- package/skills/slack-channel-monitor/scripts/main.py +962 -0
- package/skills/slack-standup-digest/.plugin/plugin.json +21 -0
- package/skills/slack-standup-digest/README.md +34 -0
- package/skills/slack-standup-digest/SKILL.md +92 -0
- package/skills/slack-standup-digest/commands/standup-digest:setup.md +8 -0
- package/skills/spark-version-upgrade/.plugin/plugin.json +20 -0
- package/skills/spark-version-upgrade/README.md +54 -0
- package/skills/spark-version-upgrade/SKILL.md +233 -0
- package/skills/ssh/.plugin/plugin.json +18 -0
- package/skills/ssh/README.md +140 -0
- package/skills/ssh/SKILL.md +135 -0
- package/skills/swift-linux/.plugin/plugin.json +17 -0
- package/skills/swift-linux/README.md +86 -0
- package/skills/swift-linux/SKILL.md +81 -0
- package/skills/theme-factory/.plugin/plugin.json +19 -0
- package/skills/theme-factory/LICENSE.txt +202 -0
- package/skills/theme-factory/README.md +58 -0
- package/skills/theme-factory/SKILL.md +59 -0
- package/skills/theme-factory/theme-showcase.pdf +0 -0
- package/skills/theme-factory/themes/arctic-frost.md +19 -0
- package/skills/theme-factory/themes/botanical-garden.md +19 -0
- package/skills/theme-factory/themes/desert-rose.md +19 -0
- package/skills/theme-factory/themes/forest-canopy.md +19 -0
- package/skills/theme-factory/themes/golden-hour.md +19 -0
- package/skills/theme-factory/themes/midnight-galaxy.md +19 -0
- package/skills/theme-factory/themes/modern-minimalist.md +19 -0
- package/skills/theme-factory/themes/ocean-depths.md +19 -0
- package/skills/theme-factory/themes/sunset-boulevard.md +19 -0
- package/skills/theme-factory/themes/tech-innovation.md +19 -0
- package/skills/uv/.plugin/plugin.json +18 -0
- package/skills/uv/README.md +5 -0
- package/skills/uv/SKILL.md +95 -0
- package/skills/uv/references/README.md +5 -0
- package/skills/vercel/.plugin/plugin.json +18 -0
- package/skills/vercel/README.md +108 -0
- package/skills/vercel/SKILL.md +103 -0
- package/tests/test_add_skill_installs_to_agents_dir.py +42 -0
- package/tests/test_catalogs.py +109 -0
- package/tests/test_code_review_risk_evaluation.py +94 -0
- package/tests/test_issue_duplicate_checker.py +240 -0
- package/tests/test_openhands_api_python.py +152 -0
- package/tests/test_plugin_manifest.py +83 -0
- package/tests/test_pr_review_diff_payload.py +202 -0
- package/tests/test_pr_review_feedback.py +263 -0
- package/tests/test_pr_review_prompt.py +152 -0
- package/tests/test_pr_review_review_context.py +253 -0
- package/tests/test_qa_changes.py +232 -0
- package/tests/test_qa_changes_evaluation.py +259 -0
- package/tests/test_release_notes_generator.py +990 -0
- package/tests/test_sdk_loading.py +150 -0
- package/tests/test_skill_plugin_loading.py +149 -0
- package/tests/test_skills_have_readme.py +66 -0
- package/tests/test_sync_extensions.py +292 -0
- package/tests/test_workflow_sync.py +46 -0
- package/utils/analysis/README.md +7 -0
- package/utils/analysis/laminar_signals/README.md +211 -0
- package/utils/analysis/laminar_signals/analyze.py +780 -0
- package/utils/analysis/laminar_signals/templates/default.j2 +49 -0
- package/utils/analysis/laminar_signals/templates/pr_review.j2 +61 -0
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Fetch a skill from a GitHub repository and install it locally.
|
|
4
|
+
|
|
5
|
+
This script downloads OpenHands skills from GitHub repositories and installs them
|
|
6
|
+
into the workspace's .agents/skills/ directory. It uses git sparse checkout to
|
|
7
|
+
efficiently download only the skill directory without cloning the entire repository.
|
|
8
|
+
|
|
9
|
+
Usage:
|
|
10
|
+
python fetch_skill.py <github-url> <workspace-path> [--force]
|
|
11
|
+
|
|
12
|
+
Examples:
|
|
13
|
+
# Full GitHub URL with branch
|
|
14
|
+
python fetch_skill.py "https://github.com/OpenHands/extensions/tree/main/skills/docker" /workspace
|
|
15
|
+
|
|
16
|
+
# Simplified URL (assumes 'main' branch)
|
|
17
|
+
python fetch_skill.py "https://github.com/OpenHands/extensions/skills/npm" /workspace
|
|
18
|
+
|
|
19
|
+
# Shorthand format
|
|
20
|
+
python fetch_skill.py "OpenHands/extensions/skills/codereview" /workspace
|
|
21
|
+
|
|
22
|
+
The script will:
|
|
23
|
+
1. Parse the GitHub URL to extract owner, repo, branch, and skill path
|
|
24
|
+
2. Use git sparse checkout to download only the specified skill directory
|
|
25
|
+
3. Validate the skill has a SKILL.md file
|
|
26
|
+
4. Copy the skill to <workspace>/.agents/skills/<skill-name>/
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
import argparse
|
|
30
|
+
import os
|
|
31
|
+
import re
|
|
32
|
+
import shutil
|
|
33
|
+
import subprocess
|
|
34
|
+
import sys
|
|
35
|
+
import tempfile
|
|
36
|
+
from pathlib import Path
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def parse_github_url(url: str) -> tuple[str, str, str, str]:
|
|
40
|
+
"""
|
|
41
|
+
Parse a GitHub URL into its component parts.
|
|
42
|
+
|
|
43
|
+
Handles multiple URL formats:
|
|
44
|
+
- Full URL: https://github.com/owner/repo/tree/branch/path/to/skill
|
|
45
|
+
- Simple URL: https://github.com/owner/repo/path/to/skill
|
|
46
|
+
- With github.com: github.com/owner/repo/skill-name
|
|
47
|
+
- Shorthand: owner/repo/skill-name
|
|
48
|
+
|
|
49
|
+
Args:
|
|
50
|
+
url: GitHub URL in any of the supported formats
|
|
51
|
+
|
|
52
|
+
Returns:
|
|
53
|
+
Tuple of (owner, repo, branch, skill_path)
|
|
54
|
+
- owner: GitHub username or organization
|
|
55
|
+
- repo: Repository name
|
|
56
|
+
- branch: Git branch (defaults to 'main' if not specified)
|
|
57
|
+
- skill_path: Path to the skill directory within the repo
|
|
58
|
+
|
|
59
|
+
Raises:
|
|
60
|
+
ValueError: If the URL cannot be parsed
|
|
61
|
+
"""
|
|
62
|
+
# Step 1: Normalize the URL by removing protocol prefix (https://, http://)
|
|
63
|
+
url = re.sub(r'^https?://', '', url)
|
|
64
|
+
url = url.rstrip('/')
|
|
65
|
+
|
|
66
|
+
# Step 2: Remove github.com prefix if present
|
|
67
|
+
url = re.sub(r'^github\.com/', '', url)
|
|
68
|
+
|
|
69
|
+
# Step 3: Try to match full URL pattern with explicit branch
|
|
70
|
+
# Pattern: owner/repo/tree/branch/path/to/skill
|
|
71
|
+
# Example: "OpenHands/extensions/tree/main/skills/docker"
|
|
72
|
+
tree_match = re.match(r'^([^/]+)/([^/]+)/tree/([^/]+)/(.+)$', url)
|
|
73
|
+
if tree_match:
|
|
74
|
+
return tree_match.group(1), tree_match.group(2), tree_match.group(3), tree_match.group(4)
|
|
75
|
+
|
|
76
|
+
# Step 4: Fall back to simple pattern (assumes 'main' branch)
|
|
77
|
+
# Pattern: owner/repo/path/to/skill
|
|
78
|
+
# Example: "OpenHands/extensions/skills/docker"
|
|
79
|
+
parts = url.split('/')
|
|
80
|
+
if len(parts) >= 3:
|
|
81
|
+
owner = parts[0]
|
|
82
|
+
repo = parts[1]
|
|
83
|
+
skill_path = '/'.join(parts[2:])
|
|
84
|
+
return owner, repo, 'main', skill_path
|
|
85
|
+
|
|
86
|
+
raise ValueError(f"Unable to parse GitHub URL: {url}")
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def fetch_skill(github_url: str, workspace_path: str, force: bool = False) -> str:
|
|
90
|
+
"""
|
|
91
|
+
Fetch a skill from GitHub and install it to the workspace.
|
|
92
|
+
|
|
93
|
+
This function performs the following steps:
|
|
94
|
+
1. Parses the GitHub URL to extract repository information
|
|
95
|
+
2. Creates a temporary directory for the git operation
|
|
96
|
+
3. Uses git sparse checkout to download only the skill directory (efficient!)
|
|
97
|
+
4. Validates the downloaded content is a valid skill (has SKILL.md)
|
|
98
|
+
5. Copies the skill to the workspace's .agents/skills/ directory
|
|
99
|
+
|
|
100
|
+
Args:
|
|
101
|
+
github_url: URL to the skill on GitHub (various formats supported)
|
|
102
|
+
workspace_path: Path to the workspace root directory
|
|
103
|
+
force: If True, overwrite existing skill with same name
|
|
104
|
+
|
|
105
|
+
Returns:
|
|
106
|
+
Path to the installed skill directory
|
|
107
|
+
|
|
108
|
+
Raises:
|
|
109
|
+
SystemExit: If skill already exists (without --force), path not found,
|
|
110
|
+
or skill is invalid (no SKILL.md)
|
|
111
|
+
"""
|
|
112
|
+
# Parse the URL to get repository details
|
|
113
|
+
owner, repo, branch, skill_path = parse_github_url(github_url)
|
|
114
|
+
|
|
115
|
+
# Extract skill name from the path (last component)
|
|
116
|
+
# e.g., "skills/docker" -> "docker"
|
|
117
|
+
skill_name = skill_path.rstrip('/').split('/')[-1]
|
|
118
|
+
|
|
119
|
+
# Determine the destination directory
|
|
120
|
+
# Skills are installed to: <workspace>/.agents/skills/<skill-name>/
|
|
121
|
+
dest_dir = Path(workspace_path) / '.agents' / 'skills' / skill_name
|
|
122
|
+
|
|
123
|
+
# Check if skill already exists - prevent accidental overwrites
|
|
124
|
+
if dest_dir.exists():
|
|
125
|
+
if not force:
|
|
126
|
+
print(f"⚠️ Skill '{skill_name}' already exists at {dest_dir}")
|
|
127
|
+
print(" Use --force to overwrite")
|
|
128
|
+
sys.exit(1)
|
|
129
|
+
print(f"Removing existing skill at {dest_dir}")
|
|
130
|
+
shutil.rmtree(dest_dir)
|
|
131
|
+
|
|
132
|
+
# Ensure the parent directory exists (.agents/skills/)
|
|
133
|
+
dest_dir.parent.mkdir(parents=True, exist_ok=True)
|
|
134
|
+
|
|
135
|
+
# Use a temporary directory for the git clone operation
|
|
136
|
+
# This keeps the workspace clean and handles cleanup automatically
|
|
137
|
+
with tempfile.TemporaryDirectory() as tmpdir:
|
|
138
|
+
# Build the repository URL
|
|
139
|
+
repo_url = f"https://github.com/{owner}/{repo}.git"
|
|
140
|
+
|
|
141
|
+
# If GITHUB_TOKEN is available, use it for authentication
|
|
142
|
+
# This enables access to private repositories
|
|
143
|
+
github_token = os.environ.get('GITHUB_TOKEN')
|
|
144
|
+
if github_token:
|
|
145
|
+
repo_url = f"https://{github_token}@github.com/{owner}/{repo}.git"
|
|
146
|
+
|
|
147
|
+
print(f"Fetching skill '{skill_name}' from {owner}/{repo}...")
|
|
148
|
+
|
|
149
|
+
# ============================================================
|
|
150
|
+
# Git Sparse Checkout Process
|
|
151
|
+
# ============================================================
|
|
152
|
+
# Sparse checkout allows us to download only specific directories
|
|
153
|
+
# from a repository, rather than the entire repo. This is much
|
|
154
|
+
# faster and uses less bandwidth/disk space.
|
|
155
|
+
#
|
|
156
|
+
# The process:
|
|
157
|
+
# 1. Clone with --filter=blob:none (don't download file contents yet)
|
|
158
|
+
# 2. Clone with --no-checkout (don't populate working directory)
|
|
159
|
+
# 3. Clone with --depth=1 (only get latest commit, no history)
|
|
160
|
+
# 4. Initialize sparse-checkout in cone mode
|
|
161
|
+
# 5. Set the specific path we want
|
|
162
|
+
# 6. Checkout to actually download just those files
|
|
163
|
+
# ============================================================
|
|
164
|
+
|
|
165
|
+
# Step 1: Clone the repo skeleton (metadata only, no file contents)
|
|
166
|
+
subprocess.run(
|
|
167
|
+
['git', 'clone', '--filter=blob:none', '--no-checkout', '--depth=1',
|
|
168
|
+
'--branch', branch, repo_url, tmpdir],
|
|
169
|
+
check=True, capture_output=True, text=True
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
# Step 2: Initialize sparse checkout in "cone" mode
|
|
173
|
+
# Cone mode is more efficient and works with directory patterns
|
|
174
|
+
subprocess.run(
|
|
175
|
+
['git', '-C', tmpdir, 'sparse-checkout', 'init', '--cone'],
|
|
176
|
+
check=True, capture_output=True, text=True
|
|
177
|
+
)
|
|
178
|
+
|
|
179
|
+
# Step 3: Specify which directory we want to download
|
|
180
|
+
subprocess.run(
|
|
181
|
+
['git', '-C', tmpdir, 'sparse-checkout', 'set', skill_path],
|
|
182
|
+
check=True, capture_output=True, text=True
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
# Step 4: Checkout - this actually downloads the files we specified
|
|
186
|
+
subprocess.run(
|
|
187
|
+
['git', '-C', tmpdir, 'checkout'],
|
|
188
|
+
check=True, capture_output=True, text=True
|
|
189
|
+
)
|
|
190
|
+
|
|
191
|
+
# ============================================================
|
|
192
|
+
# Validation and Installation
|
|
193
|
+
# ============================================================
|
|
194
|
+
|
|
195
|
+
# Verify the skill path exists in the downloaded content
|
|
196
|
+
src_skill_dir = Path(tmpdir) / skill_path
|
|
197
|
+
if not src_skill_dir.exists():
|
|
198
|
+
print(f"❌ Skill path '{skill_path}' not found in repository")
|
|
199
|
+
sys.exit(1)
|
|
200
|
+
|
|
201
|
+
# Verify this is a valid skill by checking for SKILL.md
|
|
202
|
+
# Every valid OpenHands skill must have a SKILL.md file
|
|
203
|
+
if not (src_skill_dir / 'SKILL.md').exists():
|
|
204
|
+
print(f"❌ No SKILL.md found in '{skill_path}' - not a valid skill")
|
|
205
|
+
sys.exit(1)
|
|
206
|
+
|
|
207
|
+
# Copy the skill directory to the final destination
|
|
208
|
+
shutil.copytree(src_skill_dir, dest_dir)
|
|
209
|
+
|
|
210
|
+
print(f"✅ Successfully installed '{skill_name}' to {dest_dir}")
|
|
211
|
+
return str(dest_dir)
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
def main():
|
|
215
|
+
"""
|
|
216
|
+
Command-line entry point for the fetch_skill script.
|
|
217
|
+
|
|
218
|
+
Parses command-line arguments and invokes fetch_skill() with appropriate
|
|
219
|
+
error handling. Exits with code 1 on any error.
|
|
220
|
+
"""
|
|
221
|
+
parser = argparse.ArgumentParser(
|
|
222
|
+
description='Fetch a skill from a GitHub repository and install it locally.',
|
|
223
|
+
epilog='''
|
|
224
|
+
Examples:
|
|
225
|
+
%(prog)s "https://github.com/OpenHands/extensions/tree/main/skills/docker" /workspace
|
|
226
|
+
%(prog)s "OpenHands/extensions/skills/npm" /workspace
|
|
227
|
+
%(prog)s "owner/repo/my-skill" /workspace --force
|
|
228
|
+
'''
|
|
229
|
+
)
|
|
230
|
+
parser.add_argument(
|
|
231
|
+
'url',
|
|
232
|
+
help='GitHub URL to the skill directory (supports full URLs, github.com URLs, or owner/repo/path shorthand)'
|
|
233
|
+
)
|
|
234
|
+
parser.add_argument(
|
|
235
|
+
'workspace',
|
|
236
|
+
help='Path to the workspace root where the skill will be installed (to .agents/skills/)'
|
|
237
|
+
)
|
|
238
|
+
parser.add_argument(
|
|
239
|
+
'--force', '-f',
|
|
240
|
+
action='store_true',
|
|
241
|
+
help='Overwrite existing skill if it already exists'
|
|
242
|
+
)
|
|
243
|
+
|
|
244
|
+
args = parser.parse_args()
|
|
245
|
+
|
|
246
|
+
try:
|
|
247
|
+
fetch_skill(args.url, args.workspace, args.force)
|
|
248
|
+
except subprocess.CalledProcessError as e:
|
|
249
|
+
# Git command failed - show the error message from git
|
|
250
|
+
print(f"❌ Git error: {e.stderr if e.stderr else e}")
|
|
251
|
+
sys.exit(1)
|
|
252
|
+
except Exception as e:
|
|
253
|
+
# Any other unexpected error
|
|
254
|
+
print(f"❌ Error: {e}")
|
|
255
|
+
sys.exit(1)
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
if __name__ == '__main__':
|
|
259
|
+
main()
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "agent-creator",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Create file-based sub-agents as Markdown files \u2014 no Python code required. Guides the user through a structured interview and generates a ready-to-deploy .md agent file following the OpenHands SDK s...",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "OpenHands",
|
|
7
|
+
"email": "contact@all-hands.dev"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/OpenHands/extensions",
|
|
10
|
+
"repository": "https://github.com/OpenHands/extensions",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"agent",
|
|
14
|
+
"sub-agent",
|
|
15
|
+
"file-based",
|
|
16
|
+
"markdown",
|
|
17
|
+
"no-code",
|
|
18
|
+
"create"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# agent-creator
|
|
2
|
+
|
|
3
|
+
A skill for OpenHands that creates file-based sub-agents through a structured interview workflow. Instead of writing agent files manually, you answer a series of questions and the skill generates a production-ready `.md` file following the official OpenHands SDK specification.
|
|
4
|
+
|
|
5
|
+
## What It Does
|
|
6
|
+
|
|
7
|
+
- Guides you through a requirements interview (goal, input, output, tools, permissions, etc.)
|
|
8
|
+
- Classifies the agent type (pure LLM / tool-using / hybrid)
|
|
9
|
+
- Drafts a concrete input/output example for your confirmation
|
|
10
|
+
- Generates a valid file-based agent `.md` file
|
|
11
|
+
- Saves it to the correct project-level or user-level path
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
Trigger with the `/agent-creator` command, or just describe what you want:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
/agent-creator
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
I want to create an agent that reviews pull requests
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Generated File Format
|
|
26
|
+
|
|
27
|
+
The skill produces a single `.md` file following the [OpenHands file-based agent spec](https://docs.openhands.dev/sdk/guides/agent-file-based):
|
|
28
|
+
|
|
29
|
+
```markdown
|
|
30
|
+
---
|
|
31
|
+
name: my-agent
|
|
32
|
+
description: >
|
|
33
|
+
What this agent does.
|
|
34
|
+
<example>A concrete delegation trigger</example>
|
|
35
|
+
tools:
|
|
36
|
+
- file_editor
|
|
37
|
+
- terminal
|
|
38
|
+
model: inherit
|
|
39
|
+
permission_mode: always_confirm
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
# My Agent
|
|
43
|
+
|
|
44
|
+
You are a specialized agent that...
|
|
45
|
+
|
|
46
|
+
## How to Execute
|
|
47
|
+
...
|
|
48
|
+
|
|
49
|
+
## Output Format
|
|
50
|
+
...
|
|
51
|
+
|
|
52
|
+
## Gotchas
|
|
53
|
+
...
|
|
54
|
+
|
|
55
|
+
## Edge Cases
|
|
56
|
+
...
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Where Files Are Saved
|
|
60
|
+
|
|
61
|
+
| Scope | Primary path |
|
|
62
|
+
|---|---|
|
|
63
|
+
| Project-level | `{project}/.agents/agents/<name>.md` |
|
|
64
|
+
| User-level | `~/.agents/agents/<name>.md` |
|
|
65
|
+
|
|
66
|
+
> After saving, start a new conversation — agents are scanned at conversation start, not hot-reloaded.
|
|
67
|
+
|
|
68
|
+
## File Structure
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
agent-creator/
|
|
72
|
+
├── SKILL.md # Skill definition and interview workflow
|
|
73
|
+
└── references/
|
|
74
|
+
└── fallback.md # OpenHands agent spec (used if live docs are unreachable)
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
The skill always tries to fetch the latest spec from the official OpenHands docs first. If the fetch fails, it falls back to `references/fallback.md`.
|
|
78
|
+
|
|
79
|
+
## Interview Questions
|
|
80
|
+
|
|
81
|
+
The skill asks these questions one at a time:
|
|
82
|
+
|
|
83
|
+
1. Goal and scope
|
|
84
|
+
2. Input format and source
|
|
85
|
+
3. Output format and structure
|
|
86
|
+
4. Constraints and non-goals
|
|
87
|
+
5. Success criteria
|
|
88
|
+
6. Edge cases
|
|
89
|
+
7. Gotchas
|
|
90
|
+
8. Tools needed
|
|
91
|
+
9. Permission mode
|
|
92
|
+
10. Project-level or user-level scope
|
|
93
|
+
|
|
94
|
+
## Requirements
|
|
95
|
+
|
|
96
|
+
- OpenHands with a configured LLM
|
|
97
|
+
- No additional dependencies for pure LLM agents
|
|
98
|
+
- `file_editor` and/or `terminal` tools available for tool-using agents
|
|
99
|
+
|
|
100
|
+
## Related Docs
|
|
101
|
+
|
|
102
|
+
- [File-Based Agents](https://docs.openhands.dev/sdk/guides/agent-file-based)
|
|
103
|
+
- [Agent Skills & Context](https://docs.openhands.dev/sdk/guides/skill)
|
|
104
|
+
- [OpenHands Extensions Registry](https://github.com/OpenHands/extensions)
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agent-creator
|
|
3
|
+
description: >
|
|
4
|
+
Create file-based sub-agents as Markdown files following the OpenHands SDK format.
|
|
5
|
+
Guides the user through a structured interview to collect requirements, then generates
|
|
6
|
+
a ready-to-deploy agent file. Use this skill when the user wants to create, design,
|
|
7
|
+
or build a new sub-agent, even if they don't use the /agent-creator command.
|
|
8
|
+
triggers:
|
|
9
|
+
- /agent-creator
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Agent Creator
|
|
13
|
+
|
|
14
|
+
You are an experienced AI Product Manager and Requirements Engineer specializing in
|
|
15
|
+
OpenHands file-based agents. Your goal is to guide the user through a structured
|
|
16
|
+
interview to design a production-ready sub-agent, then generate a valid `.md` file
|
|
17
|
+
following the official OpenHands SDK specification.
|
|
18
|
+
|
|
19
|
+
## Core Design Principles
|
|
20
|
+
|
|
21
|
+
**Match task to execution method:**
|
|
22
|
+
|
|
23
|
+
| Task type | Method |
|
|
24
|
+
|---|---|
|
|
25
|
+
| Reading, reasoning, writing, summarizing, analyzing | Pure LLM — no tools needed |
|
|
26
|
+
| File I/O, running commands, format conversion | `file_editor` + `terminal` |
|
|
27
|
+
| Web research, fetching URLs | `browser_tool_set` |
|
|
28
|
+
| Both reasoning and file/terminal | Hybrid — list all needed tools |
|
|
29
|
+
|
|
30
|
+
**Write procedures, not declarations.** Specify HOW the agent thinks and acts at each
|
|
31
|
+
step. Add a "Do not..." clause targeting the most likely wrong behavior.
|
|
32
|
+
|
|
33
|
+
**Provide a concrete output template.** Agents match templates reliably; prose format
|
|
34
|
+
descriptions do not work.
|
|
35
|
+
|
|
36
|
+
## Interview Rules
|
|
37
|
+
|
|
38
|
+
- Ask ONE question at a time — never overwhelm the user.
|
|
39
|
+
- Adapt dynamically; ask follow-up questions when requirements are unclear.
|
|
40
|
+
- Prefer clarification over assumption, quality over speed.
|
|
41
|
+
- **CRITICAL — NEVER SKIP QUESTIONS AND STEPS.** For every step ask explicitly. If the user already answered a question, present your understanding and confirm:
|
|
42
|
+
> "Based on what you said, I'm assuming X — is that correct, or would you adjust?"
|
|
43
|
+
Do NOT proceed until confirmed. Silent assumptions are a critical failure.
|
|
44
|
+
|
|
45
|
+
## Workflow
|
|
46
|
+
|
|
47
|
+
### Step 0 — Load context (REQUIRED, do before anything else)
|
|
48
|
+
|
|
49
|
+
You MUST fetch and read the official spec at this URL, do not rely on your built-in knowledge:
|
|
50
|
+
https://docs.openhands.dev/sdk/guides/agent-file-based
|
|
51
|
+
|
|
52
|
+
Extract ONLY these three sections — stop reading after "Directory Conventions":
|
|
53
|
+
- **Agent File Format** — file structure and frontmatter example
|
|
54
|
+
- **Frontmatter Fields** — full fields table with names, defaults, descriptions
|
|
55
|
+
- **Directory Conventions** — project-level vs user-level save paths
|
|
56
|
+
|
|
57
|
+
If the fetch fails, you MUST explicitly state:
|
|
58
|
+
"Could not fetch live spec — switching to fallback."
|
|
59
|
+
Then read `references/fallback.md`, quote the `permission_mode` definition
|
|
60
|
+
from that file, and only then proceed to Step 1.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
### Step 1 — Understand intent
|
|
65
|
+
|
|
66
|
+
Extract and confirm intent from the user's message directly.
|
|
67
|
+
Only ask *"What should this agent do?"* if intent is genuinely unclear.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
### Step 2 — Explore requirements
|
|
72
|
+
|
|
73
|
+
Ask ONE question per turn. Wait for the answer before asking the next.
|
|
74
|
+
If a question was already answered, state your understanding and ask for confirmation.
|
|
75
|
+
|
|
76
|
+
1. **Goal and scope** — primary task of this agent?
|
|
77
|
+
2. **Input** — what will the user or orchestrator provide?
|
|
78
|
+
3. **Output** — what should the agent produce, and in what format?
|
|
79
|
+
4. **Constraints and non-goals** — what should the agent NOT do?
|
|
80
|
+
5. **Success criteria** — how do you know the agent did a good job?
|
|
81
|
+
6. **Edge cases** — unusual or tricky inputs? Push for domain-specific cases.
|
|
82
|
+
7. **Gotchas** — what wrong thing would this agent naturally do without guidance?
|
|
83
|
+
Push for domain-specific failures, not generic answers.
|
|
84
|
+
8. **Tools** — `file_editor`, `terminal`, `browser_tool_set`, or none?
|
|
85
|
+
9. **Permission mode** — `never_confirm`, `always_confirm`, or `confirm_risky`?
|
|
86
|
+
10. **Scope** — project-level or user-level?
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
### Step 3 — Classify and confirm (REQUIRED — never skip)
|
|
91
|
+
|
|
92
|
+
> "Based on your answers, this is a **[pure LLM / tool-using / hybrid]** agent
|
|
93
|
+
> because [reason]. Does that sound right?"
|
|
94
|
+
|
|
95
|
+
Do not proceed until confirmed.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
### Step 4 — Anchor with a concrete example (REQUIRED — never skip)
|
|
100
|
+
|
|
101
|
+
Draft a concrete input/output example yourself. Do NOT ask the user to write it.
|
|
102
|
+
|
|
103
|
+
> "Here's what I'm imagining — does this match what you want, or would you adjust?"
|
|
104
|
+
>
|
|
105
|
+
> **Input:** [concrete example]
|
|
106
|
+
>
|
|
107
|
+
> **Output:**
|
|
108
|
+
> ```
|
|
109
|
+
> [concrete output template]
|
|
110
|
+
> ```
|
|
111
|
+
|
|
112
|
+
The **Output** from the confirmed example MUST be generalized into a template and embedded *directly* into the agent's system prompt under an `Output Format` section. This gives the agent a concrete structure to follow. Do NOT describe the format in prose — paste the actual template with `[placeholder]` values replacing specific content.
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
### Step 5 — Detect gaps
|
|
117
|
+
|
|
118
|
+
Check for missing information, ambiguity, or hidden assumptions.
|
|
119
|
+
Ask targeted follow-up questions for anything found before generating.
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
### Step 6 — Validate (REQUIRED — never skip)
|
|
124
|
+
|
|
125
|
+
Summarize ALL requirements. Ask:
|
|
126
|
+
> "Does this capture your intent correctly? I won't generate until you confirm."
|
|
127
|
+
|
|
128
|
+
Do not generate until the user explicitly confirms.
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
### Step 7 — Generate
|
|
133
|
+
|
|
134
|
+
Use the template and field definitions from the fetched spec (or `references/fallback.md`).
|
|
135
|
+
|
|
136
|
+
**Generation rules:**
|
|
137
|
+
- `name`: lowercase + hyphens, matches filename exactly
|
|
138
|
+
- `description`: at least 2 `<example>` tags — orchestrator uses them to decide
|
|
139
|
+
when to delegate; without them the agent may never be invoked
|
|
140
|
+
- `tools`: omit entirely if no tools needed; never list tools not required
|
|
141
|
+
- `permission_mode`: omit if inheriting from parent is acceptable
|
|
142
|
+
- Body = sub-agent's system prompt, written in second person ("You are...")
|
|
143
|
+
- Every step must say what the AGENT does, not what the user provides
|
|
144
|
+
- Gotchas and Edge Cases must be domain-specific, not generic boilerplate
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
### Step 8 — Save
|
|
149
|
+
|
|
150
|
+
Ask: *"Project-level (this repo only) or user-level (all your projects)?"*
|
|
151
|
+
|
|
152
|
+
Use the directory paths from the fetched spec (or `references/fallback.md`).
|
|
153
|
+
|
|
154
|
+
After saving:
|
|
155
|
+
> "Start a new conversation — agents are scanned at conversation start,
|
|
156
|
+
> not hot-reloaded."
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## Gotchas
|
|
161
|
+
|
|
162
|
+
- **Wrong format / fields**:
|
|
163
|
+
Do not generate a `SKILL.md` or use SKILL fields (`triggers`, `license`, `compatibility`).
|
|
164
|
+
File-based agents are single `.md` files using `tools`, `model`, and `permission_mode`.
|
|
165
|
+
|
|
166
|
+
- **Wrong filename**:
|
|
167
|
+
The filename MUST exactly match the `name` field.
|
|
168
|
+
|
|
169
|
+
- **Wrong path**: Do not save to `.agents/skills/`. Correct path is `.agents/agents/<name>.md`.
|
|
170
|
+
|
|
171
|
+
- **Missing `<example>` tags**: Always include at least 2 in the description.
|
|
172
|
+
The orchestrator needs them to decide when to delegate.
|
|
173
|
+
|
|
174
|
+
- **Declarative procedures**:
|
|
175
|
+
Do not describe what the user provides.
|
|
176
|
+
Always describe what the AGENT does.
|
|
177
|
+
|
|
178
|
+
- **Generic outputs**:
|
|
179
|
+
Do not produce generic Gotchas or Edge Cases.
|
|
180
|
+
If input is vague, ask for domain-specific examples.
|
|
181
|
+
|
|
182
|
+
- **Silent assumptions / skipped steps**:
|
|
183
|
+
Do not assume missing information or skip required steps.
|
|
184
|
+
Always confirm before proceeding.
|
|
185
|
+
|
|
186
|
+
## Update Workflow
|
|
187
|
+
|
|
188
|
+
If the user references an existing agent file, read it first, summarize current
|
|
189
|
+
behavior, then ask what should change. Edit incrementally — do not regenerate
|
|
190
|
+
the entire file unless explicitly asked.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
# auto-generated by sync_extensions.py
|
|
3
|
+
description: Create file-based sub-agents as Markdown files following the OpenHands SDK format. Guides the user through a structured interview to collect requirements, then generates a ready-to-deploy agent file. Use this skill when the user wants to create, design, or build a new sub-agent, even if they don't use the /agent-creator command.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Read and follow the complete instructions in the SKILL.md file located in this skill's directory.
|
|
7
|
+
|
|
8
|
+
$ARGUMENTS
|