@openhands/extensions 0.1.0 → 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.
Files changed (347) hide show
  1. package/.agents/skills/custom-codereview-guide.md +25 -0
  2. package/.github/pull_request_template.md +38 -0
  3. package/.github/release.yml +14 -0
  4. package/.github/workflows/check-extensions.yml +72 -0
  5. package/.github/workflows/npm-publish.yml +89 -0
  6. package/.github/workflows/pr.yml +30 -0
  7. package/.github/workflows/release.yml +24 -0
  8. package/.github/workflows/tests.yml +25 -0
  9. package/.github/workflows/vulnerability-scan.yml +87 -0
  10. package/.release-please-manifest.json +3 -0
  11. package/AGENTS.md +132 -0
  12. package/README.md +10 -0
  13. package/analysis_results.md +162 -0
  14. package/marketplaces/large-codebase.json +66 -0
  15. package/marketplaces/openhands-extensions.json +682 -0
  16. package/package.json +4 -10
  17. package/plugins/README.md +30 -0
  18. package/plugins/city-weather/.plugin/plugin.json +13 -0
  19. package/plugins/city-weather/README.md +145 -0
  20. package/plugins/city-weather/commands/now.md +56 -0
  21. package/plugins/cobol-modernization/.plugin/plugin.json +19 -0
  22. package/plugins/cobol-modernization/README.md +201 -0
  23. package/plugins/cobol-modernization/references/troubleshooting.md +18 -0
  24. package/plugins/cobol-modernization/skills/build-setup/SKILL.md +78 -0
  25. package/plugins/cobol-modernization/skills/build-setup/scripts/install-gnucobol.sh +32 -0
  26. package/plugins/cobol-modernization/skills/cobol-modernization-overview/SKILL.md +113 -0
  27. package/plugins/cobol-modernization/skills/mainfraime-removal/SKILL.md +62 -0
  28. package/plugins/cobol-modernization/skills/mainfraime-removal/references/cics-transformation-examples.md +45 -0
  29. package/plugins/cobol-modernization/skills/mainframe-planning/SKILL.md +78 -0
  30. package/plugins/cobol-modernization/skills/to-java-migration/SKILL.md +59 -0
  31. package/plugins/cobol-modernization/skills/to-java-migration/references/cobol-to-java-example.md +58 -0
  32. package/plugins/cobol-modernization/skills/to-java-migration/references/datatype-mappings.md +19 -0
  33. package/plugins/issue-duplicate-checker/.plugin/plugin.json +13 -0
  34. package/plugins/issue-duplicate-checker/README.md +51 -0
  35. package/plugins/issue-duplicate-checker/action.yml +349 -0
  36. package/plugins/issue-duplicate-checker/scripts/auto_close_duplicate_issues.py +569 -0
  37. package/plugins/issue-duplicate-checker/scripts/issue_duplicate_check_openhands.py +681 -0
  38. package/plugins/issue-duplicate-checker/scripts/post_duplicate_notice.js +220 -0
  39. package/plugins/issue-duplicate-checker/scripts/remove_duplicate_candidate_label.js +27 -0
  40. package/plugins/magic-test/.plugin/plugin.json +13 -0
  41. package/plugins/magic-test/skills/magic-word/SKILL.md +33 -0
  42. package/plugins/migration-scoring/.plugin/plugin.json +19 -0
  43. package/plugins/migration-scoring/README.md +244 -0
  44. package/plugins/migration-scoring/skills/migration-mapping/SKILL.md +72 -0
  45. package/plugins/migration-scoring/skills/migration-report/SKILL.md +118 -0
  46. package/plugins/migration-scoring/skills/migration-scoring-overview/SKILL.md +126 -0
  47. package/plugins/migration-scoring/skills/score-quality/SKILL.md +54 -0
  48. package/plugins/migration-scoring/skills/score-quality/references/scoring-criteria.md +30 -0
  49. package/plugins/migration-scoring/skills/score-style/SKILL.md +106 -0
  50. package/plugins/onboarding/.plugin/plugin.json +20 -0
  51. package/plugins/onboarding/README.md +30 -0
  52. package/plugins/onboarding/references/criteria.md +144 -0
  53. package/plugins/onboarding/skills/agent-readiness-report/README.md +23 -0
  54. package/plugins/onboarding/skills/agent-readiness-report/SKILL.md +122 -0
  55. package/plugins/onboarding/skills/agent-readiness-report/scripts/scan_agent_instructions.sh +88 -0
  56. package/plugins/onboarding/skills/agent-readiness-report/scripts/scan_build_env.sh +114 -0
  57. package/plugins/onboarding/skills/agent-readiness-report/scripts/scan_feedback_loops.sh +133 -0
  58. package/plugins/onboarding/skills/agent-readiness-report/scripts/scan_policy.sh +113 -0
  59. package/plugins/onboarding/skills/agent-readiness-report/scripts/scan_workflows.sh +127 -0
  60. package/plugins/onboarding/skills/improve-agent-readiness/README.md +19 -0
  61. package/plugins/onboarding/skills/improve-agent-readiness/SKILL.md +167 -0
  62. package/plugins/onboarding/skills/setup-agents-md/README.md +15 -0
  63. package/plugins/onboarding/skills/setup-agents-md/SKILL.md +150 -0
  64. package/plugins/onboarding/skills/setup-openhands/README.md +20 -0
  65. package/plugins/onboarding/skills/setup-openhands/SKILL.md +56 -0
  66. package/plugins/onboarding/skills/setup-pr-review/README.md +23 -0
  67. package/plugins/onboarding/skills/setup-pr-review/SKILL.md +72 -0
  68. package/plugins/openhands/.plugin/plugin.json +13 -0
  69. package/plugins/openhands/README.md +52 -0
  70. package/plugins/openhands/SKILL.md +61 -0
  71. package/plugins/openhands/commands/create.md +55 -0
  72. package/plugins/openhands/commands/openhands-cloud.md +8 -0
  73. package/plugins/openhands/scripts/run.sh +69 -0
  74. package/plugins/pr-review/.plugin/plugin.json +13 -0
  75. package/plugins/pr-review/README.md +393 -0
  76. package/plugins/pr-review/action.yml +298 -0
  77. package/plugins/pr-review/scripts/agent_script.py +1282 -0
  78. package/plugins/pr-review/scripts/evaluate_review.py +655 -0
  79. package/plugins/pr-review/scripts/prompt.py +260 -0
  80. package/plugins/pr-review/workflows/pr-review-by-openhands.yml +51 -0
  81. package/plugins/pr-review/workflows/pr-review-evaluation.yml +85 -0
  82. package/plugins/qa-changes/.plugin/plugin.json +11 -0
  83. package/plugins/qa-changes/README.md +185 -0
  84. package/plugins/qa-changes/action.yml +181 -0
  85. package/plugins/qa-changes/scripts/agent_script.py +406 -0
  86. package/plugins/qa-changes/scripts/evaluate_qa_changes.py +385 -0
  87. package/plugins/qa-changes/scripts/prompt.py +174 -0
  88. package/plugins/qa-changes/workflows/qa-changes-by-openhands.yml +50 -0
  89. package/plugins/qa-changes/workflows/qa-changes-evaluation.yml +85 -0
  90. package/plugins/release-notes/.plugin/plugin.json +19 -0
  91. package/plugins/release-notes/README.md +283 -0
  92. package/plugins/release-notes/SKILL.md +83 -0
  93. package/plugins/release-notes/action.yml +117 -0
  94. package/plugins/release-notes/commands/release-notes.md +8 -0
  95. package/plugins/release-notes/scripts/agent_script.py +292 -0
  96. package/plugins/release-notes/scripts/generate_release_notes.py +733 -0
  97. package/plugins/release-notes/scripts/prompt.py +90 -0
  98. package/plugins/release-notes/scripts/validate_release_notes.py +328 -0
  99. package/plugins/release-notes/workflows/release-notes.yml +76 -0
  100. package/plugins/vulnerability-remediation/.plugin/plugin.json +19 -0
  101. package/plugins/vulnerability-remediation/README.md +217 -0
  102. package/plugins/vulnerability-remediation/action.yml +187 -0
  103. package/plugins/vulnerability-remediation/scripts/scan_and_remediate.py +561 -0
  104. package/plugins/vulnerability-remediation/workflows/vulnerability-scan.yml +87 -0
  105. package/pyproject.toml +12 -0
  106. package/release-please-config.json +16 -0
  107. package/scripts/sync_extensions.py +494 -0
  108. package/scripts/sync_openhands_sdk_skill.py +264 -0
  109. package/skills/README.md +159 -0
  110. package/skills/add-javadoc/.plugin/plugin.json +18 -0
  111. package/skills/add-javadoc/README.md +40 -0
  112. package/skills/add-javadoc/SKILL.md +35 -0
  113. package/skills/add-javadoc/references/example.md +32 -0
  114. package/skills/add-skill/.plugin/plugin.json +18 -0
  115. package/skills/add-skill/README.md +67 -0
  116. package/skills/add-skill/SKILL.md +47 -0
  117. package/skills/add-skill/scripts/fetch_skill.py +259 -0
  118. package/skills/agent-creator/.plugin/plugin.json +20 -0
  119. package/skills/agent-creator/README.md +104 -0
  120. package/skills/agent-creator/SKILL.md +190 -0
  121. package/skills/agent-creator/commands/agent-creator.md +8 -0
  122. package/skills/agent-creator/references/fallback.md +117 -0
  123. package/skills/agent-memory/.plugin/plugin.json +18 -0
  124. package/skills/agent-memory/README.md +35 -0
  125. package/skills/agent-memory/SKILL.md +30 -0
  126. package/skills/agent-memory/commands/remember.md +8 -0
  127. package/skills/agent-sdk-builder/.plugin/plugin.json +18 -0
  128. package/skills/agent-sdk-builder/README.md +40 -0
  129. package/skills/agent-sdk-builder/SKILL.md +37 -0
  130. package/skills/agent-sdk-builder/commands/agent-builder.md +8 -0
  131. package/skills/azure-devops/.plugin/plugin.json +18 -0
  132. package/skills/azure-devops/README.md +55 -0
  133. package/skills/azure-devops/SKILL.md +50 -0
  134. package/skills/bitbucket/.plugin/plugin.json +17 -0
  135. package/skills/bitbucket/README.md +50 -0
  136. package/skills/bitbucket/SKILL.md +45 -0
  137. package/skills/code-review/.plugin/plugin.json +19 -0
  138. package/skills/code-review/README.md +18 -0
  139. package/skills/code-review/SKILL.md +208 -0
  140. package/skills/code-review/commands/codereview-roasted.md +8 -0
  141. package/skills/code-review/commands/codereview.md +8 -0
  142. package/skills/code-review/references/risk-evaluation.md +41 -0
  143. package/skills/code-review/references/supply-chain-security.md +31 -0
  144. package/skills/code-simplifier/.plugin/plugin.json +21 -0
  145. package/skills/code-simplifier/README.md +30 -0
  146. package/skills/code-simplifier/SKILL.md +91 -0
  147. package/skills/code-simplifier/commands/simplify.md +8 -0
  148. package/skills/code-simplifier/references/code-quality-review.md +86 -0
  149. package/skills/code-simplifier/references/code-reuse-review.md +63 -0
  150. package/skills/code-simplifier/references/efficiency-review.md +81 -0
  151. package/skills/datadog/.plugin/plugin.json +19 -0
  152. package/skills/datadog/README.md +100 -0
  153. package/skills/datadog/SKILL.md +95 -0
  154. package/skills/deno/.plugin/plugin.json +18 -0
  155. package/skills/deno/README.md +5 -0
  156. package/skills/deno/SKILL.md +99 -0
  157. package/skills/deno/references/README.md +6 -0
  158. package/skills/discord/.plugin/plugin.json +18 -0
  159. package/skills/discord/README.md +31 -0
  160. package/skills/discord/SKILL.md +109 -0
  161. package/skills/discord/__init__.py +0 -0
  162. package/skills/discord/references/REFERENCE.md +78 -0
  163. package/skills/discord/scripts/__init__.py +0 -0
  164. package/skills/discord/scripts/_http.py +127 -0
  165. package/skills/discord/scripts/post_webhook.py +106 -0
  166. package/skills/discord/scripts/send_message.py +102 -0
  167. package/skills/docker/.plugin/plugin.json +17 -0
  168. package/skills/docker/README.md +34 -0
  169. package/skills/docker/SKILL.md +29 -0
  170. package/skills/evidence-based-citations/.plugin/plugin.json +20 -0
  171. package/skills/evidence-based-citations/README.md +31 -0
  172. package/skills/evidence-based-citations/SKILL.md +59 -0
  173. package/skills/flarglebargle/.plugin/plugin.json +16 -0
  174. package/skills/flarglebargle/README.md +14 -0
  175. package/skills/flarglebargle/SKILL.md +9 -0
  176. package/skills/frontend-design/.plugin/plugin.json +21 -0
  177. package/skills/frontend-design/LICENSE.txt +177 -0
  178. package/skills/frontend-design/README.md +42 -0
  179. package/skills/frontend-design/SKILL.md +42 -0
  180. package/skills/github/.plugin/plugin.json +19 -0
  181. package/skills/github/README.md +42 -0
  182. package/skills/github/SKILL.md +106 -0
  183. package/skills/github-pr-review/.plugin/plugin.json +18 -0
  184. package/skills/github-pr-review/README.md +145 -0
  185. package/skills/github-pr-review/SKILL.md +148 -0
  186. package/skills/github-pr-review/commands/github-pr-review.md +8 -0
  187. package/skills/github-pr-reviewer/.plugin/plugin.json +20 -0
  188. package/skills/github-pr-reviewer/README.md +34 -0
  189. package/skills/github-pr-reviewer/SKILL.md +89 -0
  190. package/skills/github-pr-reviewer/commands/pr-reviewer:setup.md +8 -0
  191. package/skills/github-repo-monitor/.plugin/plugin.json +22 -0
  192. package/skills/github-repo-monitor/README.md +70 -0
  193. package/skills/github-repo-monitor/SKILL.md +316 -0
  194. package/skills/github-repo-monitor/commands/github-monitor:poll.md +8 -0
  195. package/skills/github-repo-monitor/references/github-api.md +241 -0
  196. package/skills/github-repo-monitor/references/state-schema.md +160 -0
  197. package/skills/github-repo-monitor/scripts/main.py +915 -0
  198. package/skills/github-repo-monitor/tests/test_main.py +400 -0
  199. package/skills/gitlab/.plugin/plugin.json +17 -0
  200. package/skills/gitlab/README.md +37 -0
  201. package/skills/gitlab/SKILL.md +32 -0
  202. package/skills/incident-retrospective/.plugin/plugin.json +21 -0
  203. package/skills/incident-retrospective/README.md +34 -0
  204. package/skills/incident-retrospective/SKILL.md +98 -0
  205. package/skills/incident-retrospective/commands/incident-retro:setup.md +8 -0
  206. package/skills/iterate/.plugin/plugin.json +13 -0
  207. package/skills/iterate/README.md +25 -0
  208. package/skills/iterate/SKILL.md +399 -0
  209. package/skills/iterate/commands/babysit.md +8 -0
  210. package/skills/iterate/commands/iterate.md +8 -0
  211. package/skills/iterate/commands/verify.md +8 -0
  212. package/skills/iterate/references/heuristics.md +58 -0
  213. package/skills/iterate/references/verification.md +96 -0
  214. package/skills/jupyter/.plugin/plugin.json +18 -0
  215. package/skills/jupyter/README.md +55 -0
  216. package/skills/jupyter/SKILL.md +50 -0
  217. package/skills/kubernetes/.plugin/plugin.json +18 -0
  218. package/skills/kubernetes/README.md +53 -0
  219. package/skills/kubernetes/SKILL.md +48 -0
  220. package/skills/learn-from-code-review/.plugin/plugin.json +19 -0
  221. package/skills/learn-from-code-review/README.md +64 -0
  222. package/skills/learn-from-code-review/SKILL.md +186 -0
  223. package/skills/learn-from-code-review/commands/learn-from-reviews.md +8 -0
  224. package/skills/linear/.plugin/plugin.json +19 -0
  225. package/skills/linear/README.md +58 -0
  226. package/skills/linear/SKILL.md +213 -0
  227. package/skills/linear-triage/.plugin/plugin.json +21 -0
  228. package/skills/linear-triage/README.md +34 -0
  229. package/skills/linear-triage/SKILL.md +91 -0
  230. package/skills/linear-triage/commands/linear-triage:setup.md +8 -0
  231. package/skills/notion/.plugin/plugin.json +17 -0
  232. package/skills/notion/README.md +114 -0
  233. package/skills/notion/SKILL.md +109 -0
  234. package/skills/npm/.plugin/plugin.json +17 -0
  235. package/skills/npm/README.md +14 -0
  236. package/skills/npm/SKILL.md +9 -0
  237. package/skills/openhands-api/.plugin/plugin.json +22 -0
  238. package/skills/openhands-api/README.md +48 -0
  239. package/skills/openhands-api/SKILL.md +399 -0
  240. package/skills/openhands-api/references/README.md +33 -0
  241. package/skills/openhands-api/references/TROUBLESHOOTING.md +81 -0
  242. package/skills/openhands-api/references/example_prompt.md +12 -0
  243. package/skills/openhands-api/scripts/openhands_api.py +606 -0
  244. package/skills/openhands-api/scripts/openhands_api.ts +252 -0
  245. package/skills/openhands-automation/.plugin/plugin.json +19 -0
  246. package/skills/openhands-automation/README.md +89 -0
  247. package/skills/openhands-automation/SKILL.md +875 -0
  248. package/skills/openhands-automation/commands/automation:create.md +8 -0
  249. package/skills/openhands-automation/references/ab-testing.md +185 -0
  250. package/skills/openhands-automation/references/custom-automation.md +644 -0
  251. package/skills/openhands-sdk/.plugin/plugin.json +20 -0
  252. package/skills/openhands-sdk/README.md +22 -0
  253. package/skills/openhands-sdk/SKILL.md +229 -0
  254. package/skills/openhands-sdk/commands/sdk.md +8 -0
  255. package/skills/pdflatex/.plugin/plugin.json +18 -0
  256. package/skills/pdflatex/README.md +39 -0
  257. package/skills/pdflatex/SKILL.md +34 -0
  258. package/skills/prd/.plugin/plugin.json +19 -0
  259. package/skills/prd/README.md +28 -0
  260. package/skills/prd/SKILL.md +237 -0
  261. package/skills/prd/commands/prd.md +8 -0
  262. package/skills/qa-changes/README.md +18 -0
  263. package/skills/qa-changes/SKILL.md +229 -0
  264. package/skills/qa-changes/commands/qa-changes.md +8 -0
  265. package/skills/release-notes/README.md +24 -0
  266. package/skills/release-notes/SKILL.md +19 -0
  267. package/skills/release-notes/commands/release-notes.md +8 -0
  268. package/skills/research-brief/.plugin/plugin.json +20 -0
  269. package/skills/research-brief/README.md +34 -0
  270. package/skills/research-brief/SKILL.md +99 -0
  271. package/skills/research-brief/commands/research-brief:setup.md +8 -0
  272. package/skills/security/.plugin/plugin.json +18 -0
  273. package/skills/security/README.md +38 -0
  274. package/skills/security/SKILL.md +33 -0
  275. package/skills/skill-creator/.plugin/plugin.json +17 -0
  276. package/skills/skill-creator/LICENSE.txt +202 -0
  277. package/skills/skill-creator/README.md +182 -0
  278. package/skills/skill-creator/SKILL.md +545 -0
  279. package/skills/skill-creator/references/output-patterns.md +82 -0
  280. package/skills/skill-creator/references/workflows.md +28 -0
  281. package/skills/skill-creator/scripts/init_skill.py +303 -0
  282. package/skills/skill-creator/scripts/quick_validate.py +95 -0
  283. package/skills/slack-channel-monitor/.plugin/plugin.json +21 -0
  284. package/skills/slack-channel-monitor/README.md +91 -0
  285. package/skills/slack-channel-monitor/SKILL.md +276 -0
  286. package/skills/slack-channel-monitor/commands/slack-monitor:poll.md +8 -0
  287. package/skills/slack-channel-monitor/references/slack-api.md +207 -0
  288. package/skills/slack-channel-monitor/references/state-schema.md +180 -0
  289. package/skills/slack-channel-monitor/scripts/main.py +962 -0
  290. package/skills/slack-standup-digest/.plugin/plugin.json +21 -0
  291. package/skills/slack-standup-digest/README.md +34 -0
  292. package/skills/slack-standup-digest/SKILL.md +92 -0
  293. package/skills/slack-standup-digest/commands/standup-digest:setup.md +8 -0
  294. package/skills/spark-version-upgrade/.plugin/plugin.json +20 -0
  295. package/skills/spark-version-upgrade/README.md +54 -0
  296. package/skills/spark-version-upgrade/SKILL.md +233 -0
  297. package/skills/ssh/.plugin/plugin.json +18 -0
  298. package/skills/ssh/README.md +140 -0
  299. package/skills/ssh/SKILL.md +135 -0
  300. package/skills/swift-linux/.plugin/plugin.json +17 -0
  301. package/skills/swift-linux/README.md +86 -0
  302. package/skills/swift-linux/SKILL.md +81 -0
  303. package/skills/theme-factory/.plugin/plugin.json +19 -0
  304. package/skills/theme-factory/LICENSE.txt +202 -0
  305. package/skills/theme-factory/README.md +58 -0
  306. package/skills/theme-factory/SKILL.md +59 -0
  307. package/skills/theme-factory/theme-showcase.pdf +0 -0
  308. package/skills/theme-factory/themes/arctic-frost.md +19 -0
  309. package/skills/theme-factory/themes/botanical-garden.md +19 -0
  310. package/skills/theme-factory/themes/desert-rose.md +19 -0
  311. package/skills/theme-factory/themes/forest-canopy.md +19 -0
  312. package/skills/theme-factory/themes/golden-hour.md +19 -0
  313. package/skills/theme-factory/themes/midnight-galaxy.md +19 -0
  314. package/skills/theme-factory/themes/modern-minimalist.md +19 -0
  315. package/skills/theme-factory/themes/ocean-depths.md +19 -0
  316. package/skills/theme-factory/themes/sunset-boulevard.md +19 -0
  317. package/skills/theme-factory/themes/tech-innovation.md +19 -0
  318. package/skills/uv/.plugin/plugin.json +18 -0
  319. package/skills/uv/README.md +5 -0
  320. package/skills/uv/SKILL.md +95 -0
  321. package/skills/uv/references/README.md +5 -0
  322. package/skills/vercel/.plugin/plugin.json +18 -0
  323. package/skills/vercel/README.md +108 -0
  324. package/skills/vercel/SKILL.md +103 -0
  325. package/tests/test_add_skill_installs_to_agents_dir.py +42 -0
  326. package/tests/test_catalogs.py +109 -0
  327. package/tests/test_code_review_risk_evaluation.py +94 -0
  328. package/tests/test_issue_duplicate_checker.py +240 -0
  329. package/tests/test_openhands_api_python.py +152 -0
  330. package/tests/test_plugin_manifest.py +83 -0
  331. package/tests/test_pr_review_diff_payload.py +202 -0
  332. package/tests/test_pr_review_feedback.py +263 -0
  333. package/tests/test_pr_review_prompt.py +152 -0
  334. package/tests/test_pr_review_review_context.py +253 -0
  335. package/tests/test_qa_changes.py +232 -0
  336. package/tests/test_qa_changes_evaluation.py +259 -0
  337. package/tests/test_release_notes_generator.py +990 -0
  338. package/tests/test_sdk_loading.py +150 -0
  339. package/tests/test_skill_plugin_loading.py +149 -0
  340. package/tests/test_skills_have_readme.py +66 -0
  341. package/tests/test_sync_extensions.py +292 -0
  342. package/tests/test_workflow_sync.py +46 -0
  343. package/utils/analysis/README.md +7 -0
  344. package/utils/analysis/laminar_signals/README.md +211 -0
  345. package/utils/analysis/laminar_signals/analyze.py +780 -0
  346. package/utils/analysis/laminar_signals/templates/default.j2 +49 -0
  347. package/utils/analysis/laminar_signals/templates/pr_review.j2 +61 -0
@@ -0,0 +1,264 @@
1
+ #!/usr/bin/env python3
2
+ """Auto-generate skills/openhands-sdk/SKILL.md from live data sources.
3
+
4
+ Data sources:
5
+ 1. https://docs.openhands.dev/llms.txt - SDK doc index
6
+ 2. GitHub API for OpenHands/software-agent-sdk - examples + hello world
7
+
8
+ Usage:
9
+ python scripts/sync_openhands_sdk_skill.py # regenerate SKILL.md
10
+ python scripts/sync_openhands_sdk_skill.py --check # CI mode: fail if stale
11
+ """
12
+
13
+ from __future__ import annotations
14
+
15
+ import argparse
16
+ import difflib
17
+ import json
18
+ import os
19
+ import re
20
+ import sys
21
+ import textwrap
22
+ import urllib.error
23
+ import urllib.request
24
+ from pathlib import Path
25
+
26
+ SKILL_PATH = Path(__file__).resolve().parent.parent / "skills" / "openhands-sdk" / "SKILL.md"
27
+ LLMS_TXT_URL = "https://docs.openhands.dev/llms.txt"
28
+ GH_API = "https://api.github.com/repos/OpenHands/software-agent-sdk/contents/examples"
29
+ GH_RAW = "https://raw.githubusercontent.com/OpenHands/software-agent-sdk/main"
30
+ GH_BROWSE = "https://github.com/OpenHands/software-agent-sdk/blob/main/examples"
31
+ GH_TREE = "https://github.com/OpenHands/software-agent-sdk/tree/main/examples"
32
+ HELLO_WORLD = f"{GH_RAW}/examples/01_standalone_sdk/01_hello_world.py"
33
+
34
+ FRONTMATTER = """\
35
+ ---
36
+ name: openhands-sdk
37
+ description: >-
38
+ Reference skill for the OpenHands Software Agent SDK - the Python framework
39
+ for building AI agents that write software. Use when you need to build agents
40
+ with the SDK, create custom tools, configure LLMs, manage conversations,
41
+ delegate to sub-agents, or deploy agents locally or remotely.
42
+ triggers:
43
+ - openhands-sdk
44
+ - openhands sdk
45
+ - software-agent-sdk
46
+ - agent-sdk
47
+ - /sdk
48
+ ---"""
49
+
50
+ # Maps llms.txt arch-page title -> class name shown in the table.
51
+ ARCH_CLASS_MAP = {
52
+ "Agent": "Agent",
53
+ "LLM": "LLM",
54
+ "Conversation": "Conversation",
55
+ "Events": "Event",
56
+ "Skill": "Skill",
57
+ "Condenser": "Condenser",
58
+ "Security": "SecurityAnalyzer",
59
+ "Tool System & MCP": "Tool / ToolDefinition",
60
+ "Workspace": "Workspace",
61
+ }
62
+
63
+ _ENTRY_RE = re.compile(r"^- \[(?P<title>[^\]]+)\]\((?P<url>[^)]+)\):\s*(?P<desc>.+)$")
64
+
65
+
66
+ # -- network --
67
+
68
+ def _fetch(url: str, accept: str = "text/plain") -> str:
69
+ headers = {"Accept": accept, "User-Agent": "sync-sdk-skill/1.0"}
70
+ token = os.environ.get("GITHUB_TOKEN")
71
+ if token and "api.github.com" in url:
72
+ headers["Authorization"] = f"token {token}"
73
+ req = urllib.request.Request(url, headers=headers)
74
+ with urllib.request.urlopen(req, timeout=30) as resp:
75
+ return resp.read().decode()
76
+
77
+
78
+ def _fetch_json(url: str) -> list | dict:
79
+ return json.loads(_fetch(url, accept="application/vnd.github.v3+json"))
80
+
81
+
82
+ def _fetch_or(url: str, fallback, **kw):
83
+ try:
84
+ return _fetch(url, **kw) if "accept" not in kw else _fetch(url, **kw)
85
+ except Exception as e:
86
+ print(f"WARNING: {e} — using fallback", file=sys.stderr)
87
+ return fallback
88
+
89
+
90
+ # -- llms.txt parsing --
91
+
92
+ def parse_sdk_entries(llms_txt: str) -> list[dict]:
93
+ """Extract entries from the 'OpenHands Software Agent SDK' section."""
94
+ entries, in_section = [], False
95
+ for line in llms_txt.splitlines():
96
+ stripped = line.strip()
97
+ if stripped == "## OpenHands Software Agent SDK":
98
+ in_section = True
99
+ continue
100
+ if in_section and line.startswith("## "):
101
+ break
102
+ if in_section and (m := _ENTRY_RE.match(stripped)):
103
+ entries.append(m.groupdict())
104
+ return entries
105
+
106
+
107
+ # -- content builders --
108
+
109
+ def build_classes_table(entries: list[dict]) -> str:
110
+ lines = ["| Class | Purpose |", "|---|---|"]
111
+ for e in entries:
112
+ if "/arch/" not in e["url"]:
113
+ continue
114
+ class_name = ARCH_CLASS_MAP.get(e["title"])
115
+ if not class_name:
116
+ continue
117
+ desc = re.sub(r"^High-level architecture of (the )?", "", e["desc"])
118
+ desc = desc[0].upper() + desc[1:]
119
+ lines.append(f"| [`{class_name}`]({e['url']}) | {desc} |")
120
+ return "\n".join(lines)
121
+
122
+
123
+ def build_api_refs(entries: list[dict]) -> str:
124
+ return ", ".join(
125
+ f"[`{e['title']}`]({e['url']})"
126
+ for e in entries if "/api-reference/" in e["url"]
127
+ )
128
+
129
+
130
+ def build_guides(entries: list[dict]) -> str:
131
+ return "\n".join(
132
+ f"- [{e['title']}]({e['url']}): {e['desc']}"
133
+ for e in entries
134
+ if "/api-reference/" not in e["url"] and "/arch/" not in e["url"]
135
+ )
136
+
137
+
138
+ def build_examples(categories: dict[str, list[dict]]) -> str:
139
+ lines = [f"Source: [`examples/`]({GH_TREE})", ""]
140
+ for dir_name, items in categories.items():
141
+ lines.append(f"### [`{dir_name}/`]({GH_TREE}/{dir_name})")
142
+ lines.append("")
143
+ for item in sorted(items, key=lambda x: x["name"]):
144
+ name = item["name"]
145
+ if name.startswith(".") or name == "__pycache__":
146
+ continue
147
+ prefix = GH_TREE if item.get("type") == "dir" else GH_BROWSE
148
+ lines.append(f"- [`{name}`]({prefix}/{dir_name}/{name})")
149
+ lines.append("")
150
+ return "\n".join(lines)
151
+
152
+
153
+ def fetch_examples() -> dict[str, list[dict]]:
154
+ top = _fetch_json(GH_API)
155
+ categories: dict[str, list[dict]] = {}
156
+ for item in sorted(top, key=lambda x: x["name"]):
157
+ if item["type"] != "dir":
158
+ continue
159
+ try:
160
+ categories[item["name"]] = _fetch_json(f"{GH_API}/{item['name']}")
161
+ except Exception as e:
162
+ print(f"WARNING: examples/{item['name']}: {e}", file=sys.stderr)
163
+ return categories
164
+
165
+
166
+ # -- generate --
167
+
168
+ HELLO_WORLD_FALLBACK = textwrap.dedent("""\
169
+ import os
170
+ from openhands.sdk import LLM, Agent, Conversation, Tool
171
+ from openhands.tools.terminal import TerminalTool
172
+ from openhands.tools.file_editor import FileEditorTool
173
+
174
+ llm = LLM(model="anthropic/claude-sonnet-4-5-20250929", api_key=os.getenv("LLM_API_KEY"))
175
+ agent = Agent(llm=llm, tools=[Tool(name=TerminalTool.name), Tool(name=FileEditorTool.name)])
176
+ conversation = Conversation(agent=agent, workspace=os.getcwd())
177
+ conversation.send_message("Hello!")
178
+ conversation.run()""")
179
+
180
+
181
+ def generate() -> str:
182
+ print("Fetching llms.txt ...", file=sys.stderr)
183
+ llms_txt = _fetch(LLMS_TXT_URL)
184
+ entries = parse_sdk_entries(llms_txt)
185
+
186
+ print("Fetching examples ...", file=sys.stderr)
187
+ try:
188
+ examples = fetch_examples()
189
+ except Exception:
190
+ examples = {}
191
+
192
+ print("Fetching hello world ...", file=sys.stderr)
193
+ hello = _fetch_or(HELLO_WORLD, HELLO_WORLD_FALLBACK).strip()
194
+
195
+ return f"""{FRONTMATTER}
196
+
197
+ # OpenHands Software Agent SDK
198
+
199
+ All SDK documentation lives at <https://docs.openhands.dev/sdk>.
200
+
201
+ For the full topic index, fetch <https://docs.openhands.dev/llms.txt> and read
202
+ the "OpenHands Software Agent SDK" section.
203
+
204
+ ## Quick reference
205
+
206
+ Install: `pip install openhands-sdk openhands-tools`
207
+
208
+ ```python
209
+ {hello}
210
+ ```
211
+
212
+ ## Core classes (`openhands.sdk`)
213
+
214
+ {build_classes_table(entries)}
215
+
216
+ ## API reference
217
+
218
+ {build_api_refs(entries)}
219
+
220
+ ## Guides
221
+
222
+ {build_guides(entries)}
223
+
224
+ ## Examples
225
+
226
+ {build_examples(examples)}
227
+ """
228
+
229
+
230
+ # -- main --
231
+
232
+ def main() -> int:
233
+ parser = argparse.ArgumentParser(description=__doc__)
234
+ parser.add_argument("--check", action="store_true", help="CI mode: fail if stale")
235
+ args = parser.parse_args()
236
+
237
+ generated = generate()
238
+
239
+ if args.check:
240
+ current = SKILL_PATH.read_text() if SKILL_PATH.exists() else ""
241
+ if current == generated:
242
+ print("SDK skill is up to date. ✓", file=sys.stderr)
243
+ return 0
244
+ diff = difflib.unified_diff(
245
+ current.splitlines(keepends=True),
246
+ generated.splitlines(keepends=True),
247
+ fromfile="current SKILL.md",
248
+ tofile="generated SKILL.md",
249
+ )
250
+ sys.stdout.writelines(diff)
251
+ print(
252
+ "\nERROR: SDK skill is out of date. "
253
+ "Run: python scripts/sync_openhands_sdk_skill.py",
254
+ file=sys.stderr,
255
+ )
256
+ return 1
257
+
258
+ SKILL_PATH.write_text(generated)
259
+ print(f"Wrote {SKILL_PATH}", file=sys.stderr)
260
+ return 0
261
+
262
+
263
+ if __name__ == "__main__":
264
+ sys.exit(main())
@@ -0,0 +1,159 @@
1
+ # OpenHands Skills
2
+
3
+ Skills are specialized prompts that enhance OpenHands with domain-specific knowledge and task-specific workflows. They help developers by providing expert guidance, automating common tasks, and ensuring consistent practices across projects. Each skill is designed to excel in a specific area, from Git operations to code review processes.
4
+
5
+ ## Terminology Note
6
+
7
+ **Version 0 (V0)**: The term "skills" continues to be used for V0 conversations. V0 is the current stable version of OpenHands.
8
+
9
+ **Version 1 (V1)**: The term "skills" is used for V1 conversations. V1 UI and app server have not yet been released, but the codebase has been updated to use "skills" terminology in preparation for the V1 release.
10
+
11
+ This directory (`OpenHands/extensions/`) contains shareable skills that will be used in V1 conversations. For V0 conversations, the system continues to use skills from the same underlying files.
12
+
13
+ ## Sources of Skills
14
+
15
+ OpenHands loads skills (V1) or skills (V0) from two sources:
16
+
17
+ ### 1. Shareable Skills (Public)
18
+
19
+ This directory (`OpenHands/extensions/`) contains shareable skills (V1) or skills (V0) that are:
20
+
21
+ - Available to all OpenHands users
22
+ - Maintained in the OpenHands repository
23
+ - Perfect for reusable knowledge and common workflows
24
+ - Used as "skills" in V1 conversations and "skills" in V0 conversations
25
+
26
+ Directory structure:
27
+
28
+ ```
29
+ OpenHands/extensions/
30
+ ├── # Keyword-triggered expertise
31
+ │ ├── git.md # Git operations
32
+ │ ├── testing.md # Testing practices
33
+ │ └── docker.md # Docker guidelines
34
+ └── # These skills are always loaded
35
+ ├── pr_review.md # PR review process
36
+ ├── bug_fix.md # Bug fixing workflow
37
+ └── feature.md # Feature implementation
38
+ ```
39
+
40
+ ### 2. Repository Instructions (Private)
41
+
42
+ Each repository can have its own instructions. On V1, use `.agents/skills/`. For backward compatibility, `.openhands/skills/` and `.openhands/microagents/` are still supported. These instructions are:
43
+
44
+ - Private to that repository
45
+ - Automatically loaded when working with that repository
46
+ - Perfect for repository-specific guidelines and team practices
47
+
48
+ Example repository structure:
49
+
50
+ ```
51
+ your-repository/
52
+ ├── .agents/
53
+ │ └── skills/ # V1: Preferred location for repository-specific skills
54
+ │ └── repo.md # Repository-specific instructions
55
+ │ └── ... # Private skills that are only available inside this repo
56
+ └── .openhands/ # Legacy locations (still supported)
57
+ ├── skills/ # Legacy V1 path
58
+ │ └── repo.md
59
+ └── microagents/ # Legacy V0 path
60
+ └── repo.md
61
+ ```
62
+
63
+ ## Loading Order
64
+
65
+ When OpenHands works with a repository, it:
66
+
67
+ 1. Loads repository-specific instructions from `.agents/skills/` (V1) if present
68
+ 2. Also checks `.openhands/skills/` and `.openhands/microagents/` for backward compatibility
69
+ 3. Loads relevant knowledge agents based on keywords in conversations
70
+
71
+ ## Types of Skills
72
+
73
+ Most skills use markdown files with YAML frontmatter. For repository agents (repo.md), the frontmatter is optional - if not provided, the file will be loaded with default settings as a repository agent.
74
+
75
+ ### 1. Knowledge Agents
76
+
77
+ Knowledge agents provide specialized expertise that's triggered by keywords in conversations. They help with:
78
+
79
+ - Language best practices
80
+ - Framework guidelines
81
+ - Common patterns
82
+ - Tool usage
83
+
84
+ Key characteristics:
85
+
86
+ - **Trigger-based**: Activated by specific keywords in conversations
87
+ - **Context-aware**: Provide relevant advice based on file types and content
88
+ - **Reusable**: Knowledge can be applied across multiple projects
89
+ - **Versioned**: Support multiple versions of tools/frameworks
90
+
91
+ You can see an example of a knowledge-based agent in [OpenHands's github skill](https://github.com/OpenHands/OpenHands/tree/main/skills/github.md).
92
+
93
+ ### 2. Repository Agents
94
+
95
+ Repository agents provide repository-specific knowledge and guidelines. They are:
96
+
97
+ - Loaded from `.openhands/microagents/repo.md` (V0) or `.agents/skills/` directory (V1)
98
+ - Specific to individual repositories
99
+ - Automatically activated for their repository
100
+ - Perfect for team practices and project conventions
101
+
102
+ Key features:
103
+
104
+ - **Project-specific**: Contains guidelines unique to the repository
105
+ - **Team-focused**: Enforces team conventions and practices
106
+ - **Always active**: Automatically loaded for the repository
107
+ - **Locally maintained**: Updated with the project
108
+
109
+ You can see an example of a repo agent in [the agent for the OpenHands repo itself](https://github.com/OpenHands/OpenHands/blob/main/.agents/skills/repo.md).
110
+
111
+ ## Contributing
112
+
113
+ ### When to Contribute
114
+
115
+ 1. **Knowledge Agents** - When you have:
116
+
117
+ - Language/framework best practices
118
+ - Tool usage patterns
119
+ - Common problem solutions
120
+ - General development guidelines
121
+
122
+ 2. **Repository Agents** - When you need:
123
+ - Project-specific guidelines
124
+ - Team conventions and practices
125
+ - Custom workflow documentation
126
+ - Repository-specific setup instructions
127
+
128
+ ### Best Practices
129
+
130
+ 1. **For Knowledge Agents**:
131
+
132
+ - Choose distinctive triggers
133
+ - Focus on one area of expertise
134
+ - Include practical examples
135
+ - Use file patterns when relevant
136
+ - Keep knowledge general and reusable
137
+
138
+ 2. **For Repository Agents**:
139
+ - Document clear setup instructions
140
+ - Include repository structure details
141
+ - Specify testing and build procedures
142
+ - List environment requirements
143
+ - Document CI workflows and checks
144
+ - Include information about code quality standards
145
+ - Maintain up-to-date team practices
146
+ - Consider using OpenHands to generate a comprehensive repo.md (see [Creating a Repository Agent](#creating-a-repository-agent))
147
+ - YAML frontmatter is optional - files without frontmatter will be loaded with default settings
148
+
149
+ ### Submission Process
150
+
151
+ 1. Create your agent file in the appropriate directory:
152
+ - `skills/` for expertise (public, shareable)
153
+ - Note: Repository-specific agents should remain in their respective repositories' `.agents/skills/` (V1) or `.openhands/microagents/` (V0) directory
154
+ 2. Test thoroughly
155
+ 3. Submit a pull request to OpenHands
156
+
157
+ ## License
158
+
159
+ All skills are subject to the same license as OpenHands. See the root LICENSE file for details.
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "add-javadoc",
3
+ "version": "1.0.0",
4
+ "description": "Add comprehensive JavaDoc documentation to Java classes and methods. Use when documenting Java code, adding API documentation, or improving code documentation.",
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
+ "javadoc",
14
+ "java",
15
+ "documentation",
16
+ "api-docs"
17
+ ]
18
+ }
@@ -0,0 +1,40 @@
1
+ # add-javadoc
2
+
3
+ Add comprehensive JavaDoc documentation to Java classes and methods. Use when documenting Java code, adding API documentation, or improving code documentation.
4
+
5
+ ## Triggers
6
+
7
+ This skill is activated by the following keywords:
8
+
9
+ - `javadoc`
10
+ - `java documentation`
11
+ - `document java`
12
+
13
+ ## Details
14
+
15
+ This skill guides the agent to add standard JavaDoc comments to all public classes and methods in Java source files.
16
+
17
+ ### Class-Level Documentation
18
+
19
+ For each public class, the agent will:
20
+ - Add a class-level JavaDoc block describing the purpose and responsibility of the class
21
+ - Include an `@author` tag if appropriate
22
+
23
+ ### Method-Level Documentation
24
+
25
+ For each public method, the agent will:
26
+ - Add a method-level JavaDoc block describing what the method does
27
+ - Include `@param` tags for all parameters with clear descriptions
28
+ - Include a `@return` tag describing the return value
29
+ - Include `@throws` tags for any checked exceptions
30
+
31
+ ### Style Guidelines
32
+
33
+ - First sentence should be a concise summary
34
+ - Use HTML tags sparingly (prefer plain text)
35
+ - Document preconditions and postconditions when relevant
36
+ - Include code examples with `{@code ...}` for complex methods
37
+
38
+ ## Example
39
+
40
+ See [references/example.md](references/example.md) for a before/after example showing undocumented Java code transformed with proper JavaDoc comments.
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: add-javadoc
3
+ description: Add comprehensive JavaDoc documentation to Java classes and methods. Use when documenting Java code, adding API documentation, or improving code documentation.
4
+ license: MIT
5
+ compatibility: Requires Java source files
6
+ triggers:
7
+ - javadoc
8
+ - java documentation
9
+ - document java
10
+ ---
11
+
12
+ Add comprehensive JavaDoc documentation to all public classes and methods.
13
+
14
+ ## Class-Level Documentation
15
+
16
+ For each public class:
17
+ - Add class-level JavaDoc describing the purpose and responsibility of the class
18
+ - Include `@author` tag if appropriate
19
+
20
+ ## Method-Level Documentation
21
+
22
+ For each public method:
23
+ - Add method-level JavaDoc describing what the method does
24
+ - Include `@param` tags for all parameters with clear descriptions
25
+ - Include `@return` tag describing the return value
26
+ - Include `@throws` tags for any checked exceptions
27
+
28
+ ## Style Guidelines
29
+
30
+ - First sentence should be a concise summary
31
+ - Use HTML tags sparingly (prefer plain text)
32
+ - Document preconditions and postconditions when relevant
33
+ - Include code examples with `{@code ...}` for complex methods
34
+
35
+ See [references/example.md](references/example.md) for before/after examples.
@@ -0,0 +1,32 @@
1
+ # JavaDoc Example
2
+
3
+ ## Before
4
+
5
+ ```java
6
+ public class UserService {
7
+ public User findById(String id) {
8
+ return repository.find(id);
9
+ }
10
+ }
11
+ ```
12
+
13
+ ## After
14
+
15
+ ```java
16
+ /**
17
+ * Service for managing user operations.
18
+ *
19
+ * @author Generated by Large Codebase SDK
20
+ */
21
+ public class UserService {
22
+ /**
23
+ * Finds a user by their unique identifier.
24
+ *
25
+ * @param id The unique identifier of the user
26
+ * @return The User object if found, null otherwise
27
+ */
28
+ public User findById(String id) {
29
+ return repository.find(id);
30
+ }
31
+ }
32
+ ```
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "add-skill",
3
+ "version": "1.0.0",
4
+ "description": "Add (import) an OpenHands skill from a GitHub repository into the current workspace.",
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
+ "skill",
14
+ "import",
15
+ "github",
16
+ "sparse-checkout"
17
+ ]
18
+ }
@@ -0,0 +1,67 @@
1
+ # add-skill
2
+
3
+ Add (import) an OpenHands skill from a GitHub repository into the current workspace.
4
+
5
+ This skill is useful when a user says things like:
6
+
7
+ - “Add the `codereview` skill from https://github.com/OpenHands/extensions/”
8
+ - “/add-skill https://github.com/OpenHands/extensions/tree/main/skills/codereview”
9
+
10
+ It fetches only the requested skill directory (via git sparse checkout) and installs it into the workspace so OpenHands can use it.
11
+
12
+ ## What it does
13
+
14
+ - Parses a GitHub URL (multiple formats supported)
15
+ - Downloads only the requested skill folder (no full repo clone)
16
+ - Validates the downloaded folder contains a `SKILL.md`
17
+ - Installs the skill into:
18
+
19
+ ```text
20
+ <workspace>/.agents/skills/<skill-name>/
21
+ ```
22
+
23
+ ## Included files
24
+
25
+ - `SKILL.md` – skill metadata + usage guidance for the agent
26
+ - `scripts/fetch_skill.py` – implementation used to fetch/install a skill
27
+
28
+ ## Usage
29
+
30
+ From the `add-skill` skill directory:
31
+
32
+ ```bash
33
+ python3 scripts/fetch_skill.py "<github-skill-url>" "<workspace-path>" [--force]
34
+ ```
35
+
36
+ ### Examples
37
+
38
+ ```bash
39
+ # Full URL with explicit branch
40
+ python3 scripts/fetch_skill.py \
41
+ "https://github.com/OpenHands/extensions/tree/main/skills/docker" \
42
+ "/workspace"
43
+
44
+ # Shorthand form (defaults to main)
45
+ python3 scripts/fetch_skill.py \
46
+ "OpenHands/extensions/skills/codereview" \
47
+ "/workspace"
48
+
49
+ # Overwrite if the skill already exists
50
+ python3 scripts/fetch_skill.py \
51
+ "OpenHands/extensions/tree/main/skills/codereview" \
52
+ "/workspace" \
53
+ --force
54
+ ```
55
+
56
+ ## Supported URL formats
57
+
58
+ - `https://github.com/<owner>/<repo>/tree/<branch>/<path/to/skill>`
59
+ - `https://github.com/<owner>/<repo>/<path/to/skill>` (defaults to `main`)
60
+ - `github.com/<owner>/<repo>/<path/to/skill>`
61
+ - `<owner>/<repo>/<path/to/skill>`
62
+
63
+ ## Notes / caveats
64
+
65
+ - If `GITHUB_TOKEN` is set, it will be used for authentication (needed for private repos).
66
+ - If the destination already exists, the script will fail unless `--force` is provided.
67
+ - The script installs under `.agents/skills/`.
@@ -0,0 +1,47 @@
1
+ ---
2
+ name: add-skill
3
+ description: Add an external skill from a GitHub repository to the current workspace. Use when users want to import, install, or add a skill from a GitHub URL (e.g., `/add-skill https://github.com/OpenHands/extensions/tree/main/skills/codereview` or "add the codereview skill from https://github.com/OpenHands/extensions/"). Handles fetching the skill files and placing them in .agents/skills/.
4
+ ---
5
+
6
+ # Add Skill
7
+
8
+ Import skills from GitHub repositories into the current workspace.
9
+
10
+ ## Workflow
11
+
12
+ When a user requests to add a skill from a GitHub URL:
13
+
14
+ 1. **Parse the URL** to extract repository owner, name, and skill path
15
+ 2. **Fetch the skill** using the bundled script:
16
+ ```bash
17
+ python3 <this-skill-path>/scripts/fetch_skill.py "<github-url>" "<workspace-path>"
18
+ ```
19
+ 3. **Verify** that SKILL.md exists in the destination
20
+ 4. **Inform the user** the skill is now available
21
+
22
+ ## URL Formats Supported
23
+
24
+ - `https://github.com/owner/repo/tree/main/path/to/skill`
25
+ - `https://github.com/owner/repo/skill-name`
26
+ - `github.com/owner/repo/skill-name`
27
+ - `owner/repo/skill-name` (shorthand)
28
+
29
+ ## Example
30
+
31
+ User: `/add-skill https://github.com/OpenHands/extensions/tree/main/skills/codereview`
32
+
33
+ ```bash
34
+ # Run the fetch script
35
+ python3 scripts/fetch_skill.py "https://github.com/OpenHands/extensions/tree/main/skills/codereview" "/path/to/workspace"
36
+
37
+ # Verify installation
38
+ ls /path/to/workspace/.agents/skills/codereview/SKILL.md
39
+ ```
40
+
41
+ Response: "✅ Added `codereview` to your workspace. The skill is now available."
42
+
43
+ ## Notes
44
+
45
+ - Creates `.agents/skills/` directory if it doesn't exist
46
+ - Uses `GITHUB_TOKEN` for authentication (required for private repos)
47
+ - Warns before overwriting existing skills with the same name