@toolu/opencode 6.8.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 (331) hide show
  1. package/generated/GENERATED-NOTES.md +16 -0
  2. package/generated/agents/toolu--architect.md +52 -0
  3. package/generated/agents/toolu--deep-explore.md +65 -0
  4. package/generated/agents/toolu--implementer.md +50 -0
  5. package/generated/agents/toolu--quick-task.md +54 -0
  6. package/generated/agents/toolu--research-agent.md +101 -0
  7. package/generated/commands/toolu--commit.md +8 -0
  8. package/generated/commands/toolu--review-and-commit.md +8 -0
  9. package/generated/opencode.toolu.json +116 -0
  10. package/generated/skills/toolu--brainstorm/SKILL.md +57 -0
  11. package/generated/skills/toolu--brainstorm/references/design-questions.md +36 -0
  12. package/generated/skills/toolu--commit--skill/SKILL.md +11 -0
  13. package/generated/skills/toolu--debug/SKILL.md +54 -0
  14. package/generated/skills/toolu--deep-research/SKILL.md +51 -0
  15. package/generated/skills/toolu--execution/SKILL.md +77 -0
  16. package/generated/skills/toolu--orchestrator/SKILL.md +145 -0
  17. package/generated/skills/toolu--orchestrator/references/delegation-cost.md +104 -0
  18. package/generated/skills/toolu--orchestrator/references/model-routing.md +112 -0
  19. package/generated/skills/toolu--plan/SKILL.md +56 -0
  20. package/generated/skills/toolu--plan/references/ledger.md +18 -0
  21. package/generated/skills/toolu--plan-review/SKILL.md +48 -0
  22. package/generated/skills/toolu--review-and-commit--skill/SKILL.md +10 -0
  23. package/generated/skills/toolu--setup/SKILL.md +24 -0
  24. package/generated/skills/toolu--setup/scripts/setup.sh +206 -0
  25. package/generated/skills/toolu--spec/SKILL.md +67 -0
  26. package/generated/skills/toolu--spec-review/SKILL.md +50 -0
  27. package/generated/skills/toolu--test/SKILL.md +49 -0
  28. package/package.json +51 -0
  29. package/plugins/agent-browser/.claude-plugin/plugin.json +18 -0
  30. package/plugins/agent-browser/.codex-plugin/plugin.json +7 -0
  31. package/plugins/agent-browser/README.md +18 -0
  32. package/plugins/agent-browser/hooks/hooks.json +15 -0
  33. package/plugins/agent-browser/hooks/session-start.sh +42 -0
  34. package/plugins/agent-browser/skills/agent-browser/SKILL.md +77 -0
  35. package/plugins/agent-browser/skills/agent-browser/scripts/agent-browser.sh +80 -0
  36. package/plugins/ast-grep/.claude-plugin/plugin.json +18 -0
  37. package/plugins/ast-grep/.codex-plugin/plugin.json +7 -0
  38. package/plugins/ast-grep/README.md +21 -0
  39. package/plugins/ast-grep/hooks/hooks.json +15 -0
  40. package/plugins/ast-grep/hooks/post-tools.d/byte-savings.sh +67 -0
  41. package/plugins/ast-grep/hooks/pre-tools.d/search-nudge.sh +170 -0
  42. package/plugins/ast-grep/hooks/register.sh +68 -0
  43. package/plugins/ast-grep/scripts/byte-savings-report.sh +28 -0
  44. package/plugins/ast-grep/skills/ast-grep/SKILL.md +127 -0
  45. package/plugins/ast-grep/skills/ast-grep/references/ast-grep-advanced.md +44 -0
  46. package/plugins/ast-grep/skills/ast-grep/scripts/ast-grep.sh +103 -0
  47. package/plugins/context7/.claude-plugin/plugin.json +18 -0
  48. package/plugins/context7/.codex-plugin/plugin.json +7 -0
  49. package/plugins/context7/README.md +19 -0
  50. package/plugins/context7/hooks/hooks.json +15 -0
  51. package/plugins/context7/hooks/session-start.sh +42 -0
  52. package/plugins/context7/skills/context7/SKILL.md +64 -0
  53. package/plugins/context7/skills/context7/scripts/search.sh +151 -0
  54. package/plugins/exa-search/.claude-plugin/plugin.json +18 -0
  55. package/plugins/exa-search/.codex-plugin/plugin.json +7 -0
  56. package/plugins/exa-search/README.md +19 -0
  57. package/plugins/exa-search/hooks/hooks.json +15 -0
  58. package/plugins/exa-search/hooks/session-start.sh +34 -0
  59. package/plugins/exa-search/skills/exa-search/SKILL.md +91 -0
  60. package/plugins/exa-search/skills/exa-search/scripts/search.sh +221 -0
  61. package/plugins/jev/.claude-plugin/plugin.json +19 -0
  62. package/plugins/jev/.codex-plugin/plugin.json +7 -0
  63. package/plugins/jev/README.md +61 -0
  64. package/plugins/jev/hooks/hooks.json +25 -0
  65. package/plugins/jev/hooks/lib/common.sh +49 -0
  66. package/plugins/jev/hooks/session-start.sh +45 -0
  67. package/plugins/jev/hooks/user-prompt-submit.sh +41 -0
  68. package/plugins/jev/skills/jev/SKILL.md +81 -0
  69. package/plugins/jev/skills/jev/evals/README.md +98 -0
  70. package/plugins/jev/skills/jev/references/problem-solving.md +198 -0
  71. package/plugins/jev/skills/jev/scripts/jev.sh +405 -0
  72. package/plugins/jira/.claude-plugin/plugin.json +18 -0
  73. package/plugins/jira/.codex-plugin/plugin.json +7 -0
  74. package/plugins/jira/README.md +42 -0
  75. package/plugins/jira/hooks/hooks.json +15 -0
  76. package/plugins/jira/hooks/session-start.sh +34 -0
  77. package/plugins/jira/skills/jira/SKILL.md +123 -0
  78. package/plugins/jira/skills/jira/scripts/jira.sh +70 -0
  79. package/plugins/jira/skills/jira/scripts/lib/adf.sh +17 -0
  80. package/plugins/jira/skills/jira/scripts/lib/attachment.sh +94 -0
  81. package/plugins/jira/skills/jira/scripts/lib/board.sh +58 -0
  82. package/plugins/jira/skills/jira/scripts/lib/http.sh +184 -0
  83. package/plugins/jira/skills/jira/scripts/lib/issue.sh +159 -0
  84. package/plugins/jira/skills/jira/scripts/lib/paginate.sh +45 -0
  85. package/plugins/jira/skills/jira/scripts/lib/plan-parse.sh +70 -0
  86. package/plugins/jira/skills/jira/scripts/lib/plan-run.sh +115 -0
  87. package/plugins/jira/skills/jira/scripts/lib/plan-store.sh +168 -0
  88. package/plugins/jira/skills/jira/scripts/lib/plan.sh +108 -0
  89. package/plugins/jira/skills/jira/scripts/lib/project.sh +42 -0
  90. package/plugins/jira/skills/jira/scripts/lib/raw.sh +15 -0
  91. package/plugins/jira/skills/jira/scripts/lib/search.sh +41 -0
  92. package/plugins/jira/skills/jira/scripts/lib/sprint.sh +88 -0
  93. package/plugins/jira/skills/jira/scripts/lib/user.sh +45 -0
  94. package/plugins/jira/skills/jira/scripts/lib/worklog.sh +56 -0
  95. package/plugins/pr-babysit/.claude-plugin/plugin.json +25 -0
  96. package/plugins/pr-babysit/.codex-plugin/plugin.json +7 -0
  97. package/plugins/pr-babysit/README.md +38 -0
  98. package/plugins/pr-babysit/commands/babysit.md +13 -0
  99. package/plugins/pr-babysit/hooks/check-toolu.sh +20 -0
  100. package/plugins/pr-babysit/hooks/hooks.json +15 -0
  101. package/plugins/pr-babysit/scripts/babysit-tick.sh +133 -0
  102. package/plugins/pr-babysit/scripts/collect-pr.sh +224 -0
  103. package/plugins/pr-babysit/scripts/lib/common.sh +146 -0
  104. package/plugins/pr-babysit/scripts/lib/gh.sh +150 -0
  105. package/plugins/pr-babysit/scripts/lib/lock.sh +84 -0
  106. package/plugins/pr-babysit/scripts/lib/normalize.sh +98 -0
  107. package/plugins/pr-babysit/scripts/lib/state.sh +37 -0
  108. package/plugins/pr-babysit/scripts/parse-verdict.sh +171 -0
  109. package/plugins/pr-babysit/scripts/record.sh +69 -0
  110. package/plugins/pr-babysit/scripts/reduce-state.sh +245 -0
  111. package/plugins/pr-babysit/scripts/reply-thread.sh +90 -0
  112. package/plugins/pr-babysit/scripts/resolve-thread.sh +71 -0
  113. package/plugins/pr-babysit/skills/babysit/SKILL.md +31 -0
  114. package/plugins/pr-babysit/skills/babysit/references/helper.md +209 -0
  115. package/plugins/pr-babysit/workflows/babysit.md +722 -0
  116. package/plugins/python-quality/.claude-plugin/plugin.json +24 -0
  117. package/plugins/python-quality/.codex-plugin/plugin.json +6 -0
  118. package/plugins/python-quality/README.md +23 -0
  119. package/plugins/python-quality/hooks/check-toolu.sh +20 -0
  120. package/plugins/python-quality/hooks/concerns/00-preamble.sh +85 -0
  121. package/plugins/python-quality/hooks/concerns/10-size-file.sh +6 -0
  122. package/plugins/python-quality/hooks/concerns/20-tests.sh +37 -0
  123. package/plugins/python-quality/hooks/concerns/30-suppression.sh +33 -0
  124. package/plugins/python-quality/hooks/concerns/50-size-fn.sh +49 -0
  125. package/plugins/python-quality/hooks/concerns/70-no-mocks.sh +76 -0
  126. package/plugins/python-quality/hooks/concerns/90-docs.sh +52 -0
  127. package/plugins/python-quality/hooks/concerns/99-finalize.sh +36 -0
  128. package/plugins/python-quality/hooks/hooks.json +19 -0
  129. package/plugins/python-quality/hooks/register.sh +65 -0
  130. package/plugins/rust-quality/.claude-plugin/plugin.json +24 -0
  131. package/plugins/rust-quality/.codex-plugin/plugin.json +6 -0
  132. package/plugins/rust-quality/README.md +24 -0
  133. package/plugins/rust-quality/hooks/check-toolu.sh +20 -0
  134. package/plugins/rust-quality/hooks/concerns/00-preamble.sh +93 -0
  135. package/plugins/rust-quality/hooks/concerns/10-size-file.sh +10 -0
  136. package/plugins/rust-quality/hooks/concerns/20-tests.sh +84 -0
  137. package/plugins/rust-quality/hooks/concerns/30-suppression.sh +26 -0
  138. package/plugins/rust-quality/hooks/concerns/40-unsafe.sh +39 -0
  139. package/plugins/rust-quality/hooks/concerns/50-size-fn.sh +38 -0
  140. package/plugins/rust-quality/hooks/concerns/55-size-impl.sh +28 -0
  141. package/plugins/rust-quality/hooks/concerns/60-error-handling.sh +149 -0
  142. package/plugins/rust-quality/hooks/concerns/70-no-mocks.sh +139 -0
  143. package/plugins/rust-quality/hooks/concerns/90-docs.sh +32 -0
  144. package/plugins/rust-quality/hooks/concerns/99-finalize.sh +36 -0
  145. package/plugins/rust-quality/hooks/hooks.json +19 -0
  146. package/plugins/rust-quality/hooks/register.sh +65 -0
  147. package/plugins/statusline/.claude-plugin/plugin.json +19 -0
  148. package/plugins/statusline/.codex-plugin/plugin.json +7 -0
  149. package/plugins/statusline/README.md +108 -0
  150. package/plugins/statusline/commands/setup.md +30 -0
  151. package/plugins/statusline/hooks/hooks.json +15 -0
  152. package/plugins/statusline/hooks/session-start.sh +45 -0
  153. package/plugins/statusline/scripts/collect-status.sh +147 -0
  154. package/plugins/statusline/scripts/setup.sh +93 -0
  155. package/plugins/statusline/scripts/status.sh +55 -0
  156. package/plugins/statusline/skills/status/SKILL.md +13 -0
  157. package/plugins/statusline/statusline.sh +177 -0
  158. package/plugins/toolu/.claude-plugin/plugin.json +19 -0
  159. package/plugins/toolu/.codex-plugin/plugin.json +7 -0
  160. package/plugins/toolu/README.md +35 -0
  161. package/plugins/toolu/agents/.gitkeep +0 -0
  162. package/plugins/toolu/agents/architect.md +52 -0
  163. package/plugins/toolu/agents/deep-explore.md +65 -0
  164. package/plugins/toolu/agents/implementer.md +50 -0
  165. package/plugins/toolu/agents/quick-task.md +54 -0
  166. package/plugins/toolu/agents/research-agent.md +107 -0
  167. package/plugins/toolu/assets/agents/architect.toml +9 -0
  168. package/plugins/toolu/assets/agents/deep-explore.toml +9 -0
  169. package/plugins/toolu/assets/agents/implementer.toml +9 -0
  170. package/plugins/toolu/assets/agents/quick-task.toml +9 -0
  171. package/plugins/toolu/assets/agents/research-agent.toml +9 -0
  172. package/plugins/toolu/commands/.gitkeep +0 -0
  173. package/plugins/toolu/commands/commit.md +5 -0
  174. package/plugins/toolu/commands/review-and-commit.md +5 -0
  175. package/plugins/toolu/hooks/docs/gates.md +157 -0
  176. package/plugins/toolu/hooks/docs/model-routing.md +14 -0
  177. package/plugins/toolu/hooks/docs/post-compaction.md +3 -0
  178. package/plugins/toolu/hooks/docs/push-review.md +123 -0
  179. package/plugins/toolu/hooks/docs/session-start-python.md +3 -0
  180. package/plugins/toolu/hooks/docs/session-start-rust.md +4 -0
  181. package/plugins/toolu/hooks/docs/session-start-ts.md +3 -0
  182. package/plugins/toolu/hooks/docs/session-start.md +16 -0
  183. package/plugins/toolu/hooks/hooks.json +76 -0
  184. package/plugins/toolu/hooks/lib/config.sh +355 -0
  185. package/plugins/toolu/hooks/lib/detect.sh +929 -0
  186. package/plugins/toolu/hooks/lib/diff-sha.sh +32 -0
  187. package/plugins/toolu/hooks/lib/dispatch.sh +365 -0
  188. package/plugins/toolu/hooks/lib/docs-sync-config.sh +81 -0
  189. package/plugins/toolu/hooks/lib/edit-records.sh +157 -0
  190. package/plugins/toolu/hooks/lib/gate-file.sh +201 -0
  191. package/plugins/toolu/hooks/lib/gate-mode.sh +244 -0
  192. package/plugins/toolu/hooks/lib/host.sh +205 -0
  193. package/plugins/toolu/hooks/lib/permissions.sh +125 -0
  194. package/plugins/toolu/hooks/lib/plan-ledger-parse.sh +219 -0
  195. package/plugins/toolu/hooks/lib/plan-ledger-preflight.sh +137 -0
  196. package/plugins/toolu/hooks/lib/plan-ledger.sh +749 -0
  197. package/plugins/toolu/hooks/lib/push-waiver.sh +116 -0
  198. package/plugins/toolu/hooks/lib/quality-config.sh +184 -0
  199. package/plugins/toolu/hooks/lib/registry.sh +72 -0
  200. package/plugins/toolu/hooks/lib/state-sweeper.sh +194 -0
  201. package/plugins/toolu/hooks/lib/telemetry.sh +94 -0
  202. package/plugins/toolu/hooks/lib/verdict.sh +477 -0
  203. package/plugins/toolu/hooks/post-tools/mod.sh +42 -0
  204. package/plugins/toolu/hooks/post-tools/modules/gate-status.sh +140 -0
  205. package/plugins/toolu/hooks/post-tools/modules/push-waiver.sh +97 -0
  206. package/plugins/toolu/hooks/pre-compact.sh +18 -0
  207. package/plugins/toolu/hooks/pre-tools/agent-tier.sh +111 -0
  208. package/plugins/toolu/hooks/pre-tools/mod.sh +37 -0
  209. package/plugins/toolu/hooks/pre-tools/modules/bash-commands.sh +187 -0
  210. package/plugins/toolu/hooks/pre-tools/modules/code-edit-rules.sh +78 -0
  211. package/plugins/toolu/hooks/pre-tools/modules/commit-gate.sh +70 -0
  212. package/plugins/toolu/hooks/pre-tools/modules/docs-sync.sh +137 -0
  213. package/plugins/toolu/hooks/pre-tools/modules/mcp-blocker.sh +151 -0
  214. package/plugins/toolu/hooks/pre-tools/modules/plan-ledger.sh +201 -0
  215. package/plugins/toolu/hooks/pre-tools/modules/protected-files.sh +177 -0
  216. package/plugins/toolu/hooks/pre-tools/modules/push-review.sh +273 -0
  217. package/plugins/toolu/hooks/pre-tools/modules/quality-gate.sh +87 -0
  218. package/plugins/toolu/hooks/session-start.sh +379 -0
  219. package/plugins/toolu/hooks/user-prompt-submit.sh +197 -0
  220. package/plugins/toolu/scripts/context-budget.sh +111 -0
  221. package/plugins/toolu/scripts/debug-log.sh +98 -0
  222. package/plugins/toolu/scripts/debug-stack.sh +108 -0
  223. package/plugins/toolu/scripts/debug-testfail.sh +97 -0
  224. package/plugins/toolu/settings/.gitkeep +0 -0
  225. package/plugins/toolu/settings/README.md +127 -0
  226. package/plugins/toolu/settings/bash-allowlist.txt +12 -0
  227. package/plugins/toolu/settings/bash-denylist.txt +25 -0
  228. package/plugins/toolu/settings/code-edit-rules.json +67 -0
  229. package/plugins/toolu/settings/commit-prefixes.txt +12 -0
  230. package/plugins/toolu/settings/mcp-blocklist.txt +8 -0
  231. package/plugins/toolu/settings/permissions.fragment.json +36 -0
  232. package/plugins/toolu/settings/protected-files.txt +30 -0
  233. package/plugins/toolu/settings/rust-unsafe-exemptions.txt +5 -0
  234. package/plugins/toolu/settings/toolu.config.example.json +130 -0
  235. package/plugins/toolu/skills/.gitkeep +0 -0
  236. package/plugins/toolu/skills/brainstorm/SKILL.md +57 -0
  237. package/plugins/toolu/skills/brainstorm/references/design-questions.md +36 -0
  238. package/plugins/toolu/skills/commit/SKILL.md +11 -0
  239. package/plugins/toolu/skills/debug/SKILL.md +54 -0
  240. package/plugins/toolu/skills/debug/evals/README.md +17 -0
  241. package/plugins/toolu/skills/debug/evals/cases.json +24 -0
  242. package/plugins/toolu/skills/debug/evals/results.json +34 -0
  243. package/plugins/toolu/skills/deep-research/SKILL.md +51 -0
  244. package/plugins/toolu/skills/execution/SKILL.md +77 -0
  245. package/plugins/toolu/skills/orchestrator/SKILL.md +145 -0
  246. package/plugins/toolu/skills/orchestrator/references/delegation-cost.md +104 -0
  247. package/plugins/toolu/skills/orchestrator/references/model-routing.md +112 -0
  248. package/plugins/toolu/skills/plan/SKILL.md +56 -0
  249. package/plugins/toolu/skills/plan/references/ledger.md +18 -0
  250. package/plugins/toolu/skills/plan-review/SKILL.md +48 -0
  251. package/plugins/toolu/skills/review-and-commit/SKILL.md +10 -0
  252. package/plugins/toolu/skills/setup/SKILL.md +24 -0
  253. package/plugins/toolu/skills/setup/scripts/setup.sh +206 -0
  254. package/plugins/toolu/skills/spec/SKILL.md +67 -0
  255. package/plugins/toolu/skills/spec-review/SKILL.md +50 -0
  256. package/plugins/toolu/skills/test/SKILL.md +49 -0
  257. package/plugins/toolu/workflows/commit.md +21 -0
  258. package/plugins/toolu/workflows/host-mapping.md +22 -0
  259. package/plugins/toolu/workflows/review-and-commit.md +54 -0
  260. package/plugins/toolu/workflows/semantic-judgments.md +35 -0
  261. package/plugins/toolu-review/.claude-plugin/plugin.json +18 -0
  262. package/plugins/toolu-review/.codex-plugin/plugin.json +7 -0
  263. package/plugins/toolu-review/README.md +17 -0
  264. package/plugins/toolu-review/hooks/hooks.json +15 -0
  265. package/plugins/toolu-review/hooks/session-start.sh +34 -0
  266. package/plugins/toolu-review/skills/review/SKILL.md +90 -0
  267. package/plugins/toolu-review/skills/review/scripts/write-state.sh +189 -0
  268. package/plugins/ts-quality/.claude-plugin/plugin.json +24 -0
  269. package/plugins/ts-quality/.codex-plugin/plugin.json +6 -0
  270. package/plugins/ts-quality/README.md +24 -0
  271. package/plugins/ts-quality/hooks/check-toolu.sh +20 -0
  272. package/plugins/ts-quality/hooks/concerns/00-preamble.sh +123 -0
  273. package/plugins/ts-quality/hooks/concerns/10-imports.sh +33 -0
  274. package/plugins/ts-quality/hooks/concerns/15-type-as.sh +9 -0
  275. package/plugins/ts-quality/hooks/concerns/20-tests.sh +26 -0
  276. package/plugins/ts-quality/hooks/concerns/25-size-file.sh +40 -0
  277. package/plugins/ts-quality/hooks/concerns/30-size-fn.sh +53 -0
  278. package/plugins/ts-quality/hooks/concerns/35-react-hooks.sh +7 -0
  279. package/plugins/ts-quality/hooks/concerns/40-factory.sh +5 -0
  280. package/plugins/ts-quality/hooks/concerns/45-typeguard.sh +6 -0
  281. package/plugins/ts-quality/hooks/concerns/50-type-dup.sh +16 -0
  282. package/plugins/ts-quality/hooks/concerns/55-naming.sh +11 -0
  283. package/plugins/ts-quality/hooks/concerns/60-console.sh +6 -0
  284. package/plugins/ts-quality/hooks/concerns/65-suppression.sh +12 -0
  285. package/plugins/ts-quality/hooks/concerns/70-ui-confirm.sh +8 -0
  286. package/plugins/ts-quality/hooks/concerns/72-ui-radix.sh +12 -0
  287. package/plugins/ts-quality/hooks/concerns/74-react-props.sh +6 -0
  288. package/plugins/ts-quality/hooks/concerns/76-toast.sh +10 -0
  289. package/plugins/ts-quality/hooks/concerns/78-error-ast.sh +242 -0
  290. package/plugins/ts-quality/hooks/concerns/80-throw-literal.sh +23 -0
  291. package/plugins/ts-quality/hooks/concerns/85-no-mocks.sh +109 -0
  292. package/plugins/ts-quality/hooks/concerns/90-duplication.sh +30 -0
  293. package/plugins/ts-quality/hooks/concerns/92-docs.sh +36 -0
  294. package/plugins/ts-quality/hooks/concerns/94-handler.sh +15 -0
  295. package/plugins/ts-quality/hooks/concerns/99-finalize.sh +46 -0
  296. package/plugins/ts-quality/hooks/hooks.json +19 -0
  297. package/plugins/ts-quality/hooks/register.sh +65 -0
  298. package/src/adapter/__tests__/evaluate.test.ts +82 -0
  299. package/src/adapter/__tests__/permission-map.test.ts +91 -0
  300. package/src/adapter/evaluate.ts +54 -0
  301. package/src/adapter/permission-map.ts +177 -0
  302. package/src/bootstrap/__tests__/bootstrap.test.ts +148 -0
  303. package/src/bootstrap/entrypoint.ts +18 -0
  304. package/src/bootstrap/index.ts +5 -0
  305. package/src/bootstrap/readiness.ts +59 -0
  306. package/src/bootstrap/result.ts +21 -0
  307. package/src/bootstrap/runtime.ts +99 -0
  308. package/src/bootstrap/test-helpers.ts +25 -0
  309. package/src/host/__tests__/host.test.ts +37 -0
  310. package/src/host/detect.ts +46 -0
  311. package/src/host/index.ts +10 -0
  312. package/src/host/roots.ts +59 -0
  313. package/src/host/types.ts +14 -0
  314. package/src/inventory/__tests__/inventory.test.ts +69 -0
  315. package/src/inventory/index.ts +9 -0
  316. package/src/inventory/manifest.ts +46 -0
  317. package/src/inventory/scan.ts +66 -0
  318. package/src/inventory/selection.ts +92 -0
  319. package/src/inventory/types.ts +22 -0
  320. package/src/lifecycle/__tests__/lifecycle.test.ts +7 -0
  321. package/src/lifecycle/index.ts +2 -0
  322. package/src/lifecycle/table.ts +42 -0
  323. package/src/plugin/__tests__/plugin-stub.test.ts +6 -0
  324. package/src/plugin/plugin-stub.ts +7 -0
  325. package/src/plugin/toolu.ts +142 -0
  326. package/src/preflight/__tests__/preflight.test.ts +20 -0
  327. package/src/preflight/check.ts +75 -0
  328. package/src/preflight/index.ts +2 -0
  329. package/src/select/__tests__/select.test.ts +52 -0
  330. package/src/select/index.ts +2 -0
  331. package/src/select/resolve.ts +87 -0
@@ -0,0 +1,103 @@
1
+ #!/usr/bin/env bash
2
+ # ast-grep CLI wrapper — structural/AST code search
3
+ # Bakes in --color never to prevent ANSI waste.
4
+ # Auto-detects --lang from file extension if the caller did not pass --lang.
5
+ set -euo pipefail
6
+
7
+ # Graceful no-op if neither binary is installed.
8
+ if ! command -v sg >/dev/null 2>&1 && ! command -v ast-grep >/dev/null 2>&1; then
9
+ exit 0
10
+ fi
11
+
12
+ # Prefer `sg` (shorter), fall back to `ast-grep`.
13
+ if command -v sg >/dev/null 2>&1; then
14
+ AG=sg
15
+ else
16
+ AG=ast-grep
17
+ fi
18
+
19
+ subcmd="${1:-}"
20
+ shift 2>/dev/null || true
21
+
22
+ usage() {
23
+ cat <<'USAGE'
24
+ Usage: ast-grep.sh <subcommand> [args...]
25
+
26
+ Subcommands:
27
+ search <pattern> [--lang <L>] [flags] Pattern search (--color never)
28
+ files <pattern> [--lang <L>] [flags] File paths only (--files-with-matches)
29
+ scan <yaml> [flags] Rule-based scan (--report-style short --max-results 50)
30
+ debug <pattern> [--lang <L>] Debug pattern AST (--debug-query=pattern)
31
+
32
+ --lang is required for search/files/debug, but is auto-inferred from the
33
+ first path argument's extension if not supplied.
34
+
35
+ Pass-through flags: --globs <pat>, -A/-B/-C <N>, --max-results N
36
+ USAGE
37
+ exit 1
38
+ }
39
+
40
+ # Infer --lang <L> from the first path-like argument if --lang/-l not provided.
41
+ infer_lang_args() {
42
+ local has_lang=0 first_path=""
43
+ local arg
44
+ for arg in "$@"; do
45
+ case "$arg" in
46
+ --lang|-l|--lang=*|-l=*) has_lang=1 ;;
47
+ esac
48
+ # First arg that exists on disk
49
+ if [ -z "$first_path" ] && [ -e "$arg" ]; then
50
+ first_path="$arg"
51
+ fi
52
+ done
53
+ if [ "$has_lang" -eq 0 ] && [ -n "$first_path" ] && [ -f "$first_path" ]; then
54
+ case "${first_path##*.}" in
55
+ ts) echo "--lang typescript" ;;
56
+ tsx) echo "--lang tsx" ;;
57
+ js|mjs|cjs) echo "--lang javascript" ;;
58
+ jsx) echo "--lang jsx" ;;
59
+ rs) echo "--lang rust" ;;
60
+ py) echo "--lang python" ;;
61
+ go) echo "--lang go" ;;
62
+ rb) echo "--lang ruby" ;;
63
+ java) echo "--lang java" ;;
64
+ *) : ;;
65
+ esac
66
+ fi
67
+ }
68
+
69
+ case "$subcmd" in
70
+ search)
71
+ pattern="${1:?search requires a pattern}"
72
+ shift
73
+ lang_args=$(infer_lang_args "$@")
74
+ # shellcheck disable=SC2086 # $lang_args is intentional word-split
75
+ exec "$AG" run --pattern "$pattern" --color never $lang_args "$@"
76
+ ;;
77
+ files)
78
+ pattern="${1:?files requires a pattern}"
79
+ shift
80
+ lang_args=$(infer_lang_args "$@")
81
+ # shellcheck disable=SC2086 # $lang_args is intentional word-split
82
+ exec "$AG" run --pattern "$pattern" --files-with-matches --color never $lang_args "$@"
83
+ ;;
84
+ scan)
85
+ rules="${1:?scan requires inline YAML or rule file path}"
86
+ shift
87
+ if [[ -f "$rules" ]]; then
88
+ exec "$AG" scan --rule "$rules" --report-style short --max-results 50 --color never "$@"
89
+ else
90
+ exec "$AG" scan --inline-rules "$rules" --report-style short --max-results 50 --color never "$@"
91
+ fi
92
+ ;;
93
+ debug)
94
+ pattern="${1:?debug requires a pattern}"
95
+ shift
96
+ lang_args=$(infer_lang_args "$@")
97
+ # shellcheck disable=SC2086 # $lang_args is intentional word-split
98
+ exec "$AG" run --pattern "$pattern" --debug-query=pattern --color never $lang_args "$@"
99
+ ;;
100
+ *)
101
+ usage
102
+ ;;
103
+ esac
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "context7",
3
+ "version": "6.8.0",
4
+ "description": "Library documentation & code-example lookup via Context7 (skill + REST wrapper). Standalone, no dependencies.",
5
+ "author": {
6
+ "name": "Falconiere Barbosa",
7
+ "email": "hello@falconiere.io"
8
+ },
9
+ "homepage": "https://github.com/falconiere/toolu",
10
+ "repository": "https://github.com/falconiere/toolu.git",
11
+ "license": "MIT",
12
+ "keywords": [
13
+ "claude-code",
14
+ "context7",
15
+ "documentation",
16
+ "skills"
17
+ ]
18
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "context7",
3
+ "version": "6.8.0",
4
+ "description": "Library documentation & code-example lookup via Context7 (skill + REST wrapper). Standalone, no dependencies.",
5
+ "skills": "./skills/",
6
+ "hooks": "./hooks/hooks.json"
7
+ }
@@ -0,0 +1,19 @@
1
+ # context7
2
+
3
+ Library documentation & code-example lookup via Context7 — a skill plus a REST wrapper.
4
+
5
+ ## Install
6
+
7
+ ```
8
+ /plugin install context7@toolu
9
+ ```
10
+
11
+ Standalone, no dependencies.
12
+
13
+ ## What it provides
14
+
15
+ - **`context7` skill** — finds up-to-date documentation and code examples for any programming library or framework: `search` to resolve a library ID, then fetch its docs. Triggers when you need current docs, API references, or usage examples.
16
+
17
+ ## The Context7 API
18
+
19
+ The skill drives `scripts/search.sh`, a bash wrapper over the Context7 REST API. **No API key required** (rate-limited). For higher limits, export `CONTEXT7_API_KEY=ctx7sk...` in the environment — the script reads it from the environment only, never from a `.env` file.
@@ -0,0 +1,15 @@
1
+ {
2
+ "hooks": {
3
+ "SessionStart": [
4
+ {
5
+ "matcher": "startup|resume|clear|compact",
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "${CLAUDE_PLUGIN_ROOT}/hooks/session-start.sh"
10
+ }
11
+ ]
12
+ }
13
+ ]
14
+ }
15
+ }
@@ -0,0 +1,42 @@
1
+ #!/usr/bin/env bash
2
+ # SessionStart hook — publish the context7 search wrapper at a STABLE,
3
+ # env-independent path.
4
+ #
5
+ # ${CLAUDE_PLUGIN_ROOT} is exported to hook subprocesses only — NOT to the
6
+ # Bash tool's subshell — so SKILL.md's
7
+ # "${CLAUDE_PLUGIN_ROOT}/skills/context7/scripts/search.sh …"
8
+ # expands to "/skills/.../search.sh: No such file" when an agent pastes it.
9
+ # Mirror the statusline plugin: symlink the wrapper to
10
+ # ${CLAUDE_CONFIG_DIR:-$HOME/.claude}/context7/search.sh
11
+ # which the Bash subshell CAN expand. Refreshed every session so plugin
12
+ # updates land with no settings change. Silent on success; every step is
13
+ # non-fatal (a failed symlink means the published copy is stale, not that
14
+ # the session breaks).
15
+
16
+ # Consume stdin so Claude Code's hook IPC never stalls.
17
+ cat > /dev/null 2>&1 || true
18
+
19
+ # Resolve the plugin dir from this hook's location: hooks/.. = plugin root.
20
+ plugin_dir="$(cd "$(dirname "$0")/.." 2>/dev/null && pwd)"
21
+ src="${plugin_dir:+$plugin_dir/skills/context7/scripts/search.sh}"
22
+ [ -n "$src" ] && [ -f "$src" ] || exit 0
23
+
24
+ if [ -n "${TOOLU_CONFIG_DIR:-}" ]; then
25
+ config_root="$TOOLU_CONFIG_DIR"
26
+ elif [ "${TOOLU_HOST_OVERRIDE:-}" = codex ] || { [ -z "${TOOLU_HOST_OVERRIDE:-}" ] && [ -n "${PLUGIN_ROOT:-}" ]; }; then
27
+ config_root="${CODEX_HOME:-$HOME/.codex}"
28
+ else
29
+ config_root="${CLAUDE_CONFIG_DIR:-$HOME/.claude}"
30
+ fi
31
+ reg_root="$config_root/context7"
32
+ mkdir -p "$reg_root" 2>/dev/null || { echo "context7: cannot create $reg_root — wrapper not published" >&2; exit 0; }
33
+
34
+ # Own the path only when it is already our symlink or absent — never clobber
35
+ # a real file a user may have placed at $reg_root/search.sh. (-L catches a
36
+ # broken/relinked symlink that -e would report as missing.)
37
+ dst="$reg_root/search.sh"
38
+ if [ -L "$dst" ] || [ ! -e "$dst" ]; then
39
+ ln -sf "$src" "$dst" 2>/dev/null || true
40
+ fi
41
+
42
+ exit 0
@@ -0,0 +1,64 @@
1
+ ---
2
+ name: context7
3
+ description: "ALWAYS ACTIVE — Library documentation protocol. You MUST use the context7 CLI to look up current docs, API references, and usage examples for any third-party library BEFORE answering from memory or searching the web; web search is a fallback only. Triggers on any library/framework API, usage, docs, or version question."
4
+ ---
5
+ # Context7 — Library Documentation Lookup
6
+ Use this skill to find up-to-date documentation and code examples for any programming library or framework.
7
+ ## CLI Tool
8
+
9
+ Invoke at the **stable published path** (a symlink the plugin's SessionStart hook refreshes every session):
10
+
11
+ ```bash
12
+ # Codex
13
+ "${TOOLU_CONFIG_DIR:-${CODEX_HOME:-$HOME/.codex}}/context7/search.sh" <command> [options]
14
+ # Claude Code
15
+ "${TOOLU_CONFIG_DIR:-${CLAUDE_CONFIG_DIR:-$HOME/.claude}}/context7/search.sh" <command> [options]
16
+ ```
17
+
18
+ Choose the line for the active host. Ordinary shell calls do not inherit
19
+ plugin lifecycle variables, so never collapse these into one ambiguous
20
+ fallback. Use the published path; plugin-root variables are lifecycle-only.
21
+
22
+ Repo-checkout fallback (for tests/dev when the plugin is not installed): `plugins/context7/skills/context7/scripts/search.sh`.
23
+ ```
24
+ search.sh <command> [options]
25
+ Commands:
26
+ search Find libraries by name (resolve library ID)
27
+ docs Query documentation for a library
28
+ ```
29
+ ### Workflow
30
+ ```
31
+ 1. search.sh search <library> → find the library ID
32
+ 2. search.sh docs <id> <query> → query its docs
33
+ ```
34
+ ### search (default)
35
+ ```bash
36
+ search.sh search <library> [query]
37
+ search.sh <library> # bare arg works too
38
+ Options:
39
+ -l, --library Library name (required)
40
+ -q, --query Context for relevance ranking
41
+ ```
42
+ Response includes `id`, `title`, `totalSnippets`, `benchmarkScore` for each match.
43
+ ### docs
44
+ ```bash
45
+ search.sh docs <library_id> <query>
46
+ Options:
47
+ -l, --library-id Context7 library ID, e.g. /vercel/next.js (required)
48
+ -q, --query Your question (required)
49
+ -t, --type json|txt (default: json; txt is plain-text, LLM-prompt-ready)
50
+ --fast Skip LLM reranking — top vector hits, lower latency, lower relevance
51
+ ```
52
+ JSON response contains `codeSnippets` and `infoSnippets`. Use `-t txt` for plain-text output with code blocks.
53
+ Library IDs accept version pinning: `/vercel/next.js/v15.1.8` or `/vercel/next.js@v15.1.8`.
54
+ ## When to Use
55
+ - User asks about a library's API or usage patterns
56
+ - Need current docs (beyond training cutoff)
57
+ - Looking for code examples with a specific library
58
+ - Checking library version compatibility
59
+ ## Tips
60
+ - Be specific in queries: "How to set up JWT auth in Express.js" not "auth"
61
+ - Use `-t txt` for readable output you can paste directly
62
+ - Pipe JSON through jq: `| jq '.codeSnippets[:3] | .[] | {codeTitle, codeLanguage}'`
63
+ - Library IDs use `/org/repo` format — run `search` first to find them
64
+ - No API key required (rate-limited). Export `CONTEXT7_API_KEY=ctx7sk...` in the environment for higher limits — the script reads it from the environment only, never from a `.env` file
@@ -0,0 +1,151 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ # Context7 CLI — search libraries and query documentation
5
+ # Usage: ./search.sh <command> [options]
6
+ #
7
+ # Reads CONTEXT7_API_KEY from the environment (never from .env).
8
+
9
+ command -v jq >/dev/null 2>&1 || { echo "context7: jq required" >&2; exit 1; }
10
+ command -v curl >/dev/null 2>&1 || { echo "context7: curl required" >&2; exit 1; }
11
+
12
+ C7_API_KEY="${CONTEXT7_API_KEY:-}"
13
+ C7_URL="https://context7.com/api/v2"
14
+
15
+ urlencode() {
16
+ python3 -c "import sys, urllib.parse; print(urllib.parse.quote(sys.argv[1], safe=''))" "$1"
17
+ }
18
+
19
+ c7_get() {
20
+ local endpoint="$1"
21
+ shift
22
+ local url="$C7_URL/$endpoint"
23
+
24
+ # Build query string from remaining args (key=value pairs)
25
+ local sep="?"
26
+ for kv in "$@"; do
27
+ local key="${kv%%=*}"
28
+ local val="${kv#*=}"
29
+ url="${url}${sep}${key}=$(urlencode "$val")"
30
+ sep="&"
31
+ done
32
+
33
+ local headers=(-H "Accept: application/json")
34
+ if [[ "${C7_API_KEY:-}" == ctx7sk* ]]; then
35
+ headers+=(-H "Authorization: Bearer $C7_API_KEY")
36
+ fi
37
+
38
+ curl -sS --fail-with-body "${headers[@]}" "$url"
39
+ }
40
+
41
+ # ── search ──────────────────────────────────────────────────
42
+ cmd_search() {
43
+ local library="" query=""
44
+
45
+ while [[ $# -gt 0 ]]; do
46
+ case "$1" in
47
+ -l|--library) library="$2"; shift 2;;
48
+ -q|--query) query="$2"; shift 2;;
49
+ *)
50
+ # first bare arg = library, second = query
51
+ if [[ -z "$library" ]]; then library="$1"; shift
52
+ elif [[ -z "$query" ]]; then query="$1"; shift
53
+ else echo "Unknown option: $1" >&2; exit 1; fi
54
+ ;;
55
+ esac
56
+ done
57
+
58
+ if [[ -z "$library" ]]; then
59
+ echo "Usage: search.sh search <library> [query]" >&2
60
+ echo " Searches for libraries matching the name" >&2
61
+ echo "" >&2
62
+ echo " -l, --library Library name (required)" >&2
63
+ echo " -q, --query Context for ranking results" >&2
64
+ echo "" >&2
65
+ echo "Examples:" >&2
66
+ echo " search.sh search react" >&2
67
+ echo " search.sh search tokio \"async runtime for Rust\"" >&2
68
+ exit 1
69
+ fi
70
+
71
+ # Default query to library name if not provided
72
+ query="${query:-$library}"
73
+
74
+ c7_get "libs/search" "libraryName=$library" "query=$query" | jq '.'
75
+ }
76
+
77
+ # ── docs ────────────────────────────────────────────────────
78
+ cmd_docs() {
79
+ local library_id="" query="" output_type="json" fast=""
80
+
81
+ while [[ $# -gt 0 ]]; do
82
+ case "$1" in
83
+ -l|--library-id) library_id="$2"; shift 2;;
84
+ -q|--query) query="$2"; shift 2;;
85
+ -t|--type) output_type="$2"; shift 2;;
86
+ --fast) fast="true"; shift;;
87
+ *)
88
+ # first bare arg = library_id, second = query
89
+ if [[ -z "$library_id" ]]; then library_id="$1"; shift
90
+ elif [[ -z "$query" ]]; then query="$1"; shift
91
+ else echo "Unknown option: $1" >&2; exit 1; fi
92
+ ;;
93
+ esac
94
+ done
95
+
96
+ if [[ -z "$library_id" || -z "$query" ]]; then
97
+ echo "Usage: search.sh docs <library_id> <query>" >&2
98
+ echo " Retrieves documentation context for a library" >&2
99
+ echo "" >&2
100
+ echo " -l, --library-id Context7 library ID, e.g. /vercel/next.js (required)" >&2
101
+ echo " -q, --query Your question (required)" >&2
102
+ echo " -t, --type Output format: json|txt (default: json; txt is LLM-prompt-ready)" >&2
103
+ echo " --fast Skip LLM reranking, return top vector-search hits (lower latency)" >&2
104
+ echo "" >&2
105
+ echo "Examples:" >&2
106
+ echo " search.sh docs /vercel/next.js \"app router file conventions\"" >&2
107
+ echo " search.sh docs /tokio-rs/tokio \"spawn async tasks\" -t txt" >&2
108
+ echo "" >&2
109
+ echo "Tip: Run 'search.sh search <name>' first to find the library ID." >&2
110
+ exit 1
111
+ fi
112
+
113
+ local params=("libraryId=$library_id" "query=$query" "type=$output_type")
114
+ if [[ -n "$fast" ]]; then
115
+ params+=("fast=true")
116
+ fi
117
+
118
+ c7_get "context" "${params[@]}" | \
119
+ if [[ "$output_type" == "json" ]]; then jq '.'; else cat; fi
120
+ }
121
+
122
+ # ── main ────────────────────────────────────────────────────
123
+ usage() {
124
+ echo "Context7 CLI — Library Documentation Lookup" >&2
125
+ echo "" >&2
126
+ echo "Usage: search.sh <command> [options]" >&2
127
+ echo "" >&2
128
+ echo "Environment:" >&2
129
+ echo " CONTEXT7_API_KEY Optional. If set and starts with 'ctx7sk', sent as Bearer token." >&2
130
+ echo "" >&2
131
+ echo "Commands:" >&2
132
+ echo " search Find libraries by name (resolve library ID)" >&2
133
+ echo " docs Query documentation for a library" >&2
134
+ echo "" >&2
135
+ echo "Workflow:" >&2
136
+ echo " 1. search.sh search <library> # find the library ID" >&2
137
+ echo " 2. search.sh docs <id> <query> # query its docs" >&2
138
+ echo "" >&2
139
+ echo "Run 'search.sh <command>' with no args for command-specific help." >&2
140
+ exit 1
141
+ }
142
+
143
+ case "${1:-}" in
144
+ -h|--help|"") usage;;
145
+ search) shift; cmd_search "$@";;
146
+ docs) shift; cmd_docs "$@";;
147
+ *)
148
+ # bare args — default to search
149
+ cmd_search "$@"
150
+ ;;
151
+ esac
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "exa-search",
3
+ "version": "6.8.0",
4
+ "description": "Web, code, and URL search plus deep research via Exa (skill + REST wrapper). Standalone, no dependencies.",
5
+ "author": {
6
+ "name": "Falconiere Barbosa",
7
+ "email": "hello@falconiere.io"
8
+ },
9
+ "homepage": "https://github.com/falconiere/toolu",
10
+ "repository": "https://github.com/falconiere/toolu.git",
11
+ "license": "MIT",
12
+ "keywords": [
13
+ "claude-code",
14
+ "exa",
15
+ "web-search",
16
+ "skills"
17
+ ]
18
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "exa-search",
3
+ "version": "6.8.0",
4
+ "description": "Web, code, and URL search plus deep research via Exa (skill + REST wrapper). Standalone, no dependencies.",
5
+ "skills": "./skills/",
6
+ "hooks": "./hooks/hooks.json"
7
+ }
@@ -0,0 +1,19 @@
1
+ # exa-search
2
+
3
+ Web, code, and URL search plus deep research via Exa — a skill plus a REST wrapper.
4
+
5
+ ## Install
6
+
7
+ ```
8
+ /plugin install exa-search@toolu
9
+ ```
10
+
11
+ Standalone, no dependencies.
12
+
13
+ ## What it provides
14
+
15
+ - **`exa-search` skill** — web search, code-example search, URL crawling, and deep research from the session. Search types range from `instant` / `fast` for low-latency lookups to `deep` / `deep-reasoning` for synthesized research; `crawl` extracts content from one or more URLs.
16
+
17
+ ## The Exa API
18
+
19
+ The skill drives `scripts/search.sh`, a bash wrapper over the Exa REST API. Set your Exa API key in the environment for the wrapper to authenticate.
@@ -0,0 +1,15 @@
1
+ {
2
+ "hooks": {
3
+ "SessionStart": [
4
+ {
5
+ "matcher": "startup|resume|clear|compact",
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "${CLAUDE_PLUGIN_ROOT}/hooks/session-start.sh"
10
+ }
11
+ ]
12
+ }
13
+ ]
14
+ }
15
+ }
@@ -0,0 +1,34 @@
1
+ #!/usr/bin/env bash
2
+ # SessionStart hook — publish the exa-search wrapper at a STABLE,
3
+ # env-independent path. See context7's session-start.sh for the same fix
4
+ # rationale: ${CLAUDE_PLUGIN_ROOT} is exported to hook subprocesses only —
5
+ # NOT to the agent's Bash tool subshell — so a SKILL.md path of
6
+ # "${CLAUDE_PLUGIN_ROOT}/skills/exa-search/scripts/search.sh" expands to
7
+ # "/skills/.../search.sh: No such file" when an agent pastes it. Mirror the
8
+ # statusline plugin: symlink the wrapper to
9
+ # ${CLAUDE_CONFIG_DIR:-$HOME/.claude}/exa-search/search.sh
10
+ # Refreshed every session; silent on success; every step non-fatal.
11
+
12
+ # Consume stdin so Claude Code's hook IPC never stalls.
13
+ cat > /dev/null 2>&1 || true
14
+
15
+ plugin_dir="$(cd "$(dirname "$0")/.." 2>/dev/null && pwd)"
16
+ src="${plugin_dir:+$plugin_dir/skills/exa-search/scripts/search.sh}"
17
+ [ -n "$src" ] && [ -f "$src" ] || exit 0
18
+
19
+ if [ -n "${TOOLU_CONFIG_DIR:-}" ]; then
20
+ config_root="$TOOLU_CONFIG_DIR"
21
+ elif [ "${TOOLU_HOST_OVERRIDE:-}" = codex ] || { [ -z "${TOOLU_HOST_OVERRIDE:-}" ] && [ -n "${PLUGIN_ROOT:-}" ]; }; then
22
+ config_root="${CODEX_HOME:-$HOME/.codex}"
23
+ else
24
+ config_root="${CLAUDE_CONFIG_DIR:-$HOME/.claude}"
25
+ fi
26
+ reg_root="$config_root/exa-search"
27
+ mkdir -p "$reg_root" 2>/dev/null || { echo "exa-search: cannot create $reg_root — wrapper not published" >&2; exit 0; }
28
+
29
+ dst="$reg_root/search.sh"
30
+ if [ -L "$dst" ] || [ ! -e "$dst" ]; then
31
+ ln -sf "$src" "$dst" 2>/dev/null || true
32
+ fi
33
+
34
+ exit 0
@@ -0,0 +1,91 @@
1
+ ---
2
+ name: exa-search
3
+ description: ALWAYS ACTIVE — Web search/crawl protocol. You MUST use the exa-search CLI (search / crawl / similar) instead of host-native web tools for web searches, code-example hunts, URL crawling, and topic research whenever EXA_API_KEY is set; native tools are a fallback only. Triggers when searching for external information, looking up docs/APIs, researching technologies, investigating topics, or crawling URLs.
4
+ ---
5
+
6
+ # Exa Search
7
+
8
+ Use this skill when you need to search the web, find code examples, crawl a URL, investigate a topic, or conduct deep research.
9
+
10
+ **Trigger phrases:** search for, look up, find examples, investigate about, research about, dive into, crawl URL, what is, how does X work
11
+
12
+ ## CLI Tool
13
+
14
+ Invoke at the **stable published path** (a symlink the plugin's SessionStart hook refreshes every session):
15
+
16
+ ```bash
17
+ # Codex
18
+ "${TOOLU_CONFIG_DIR:-${CODEX_HOME:-$HOME/.codex}}/exa-search/search.sh" <command> [options]
19
+ # Claude Code
20
+ "${TOOLU_CONFIG_DIR:-${CLAUDE_CONFIG_DIR:-$HOME/.claude}}/exa-search/search.sh" <command> [options]
21
+ ```
22
+
23
+ Choose the line for the active host. Ordinary shell calls do not inherit
24
+ plugin lifecycle variables, so never collapse these into one ambiguous
25
+ fallback. Use the published path; plugin-root variables are lifecycle-only.
26
+
27
+ Repo-checkout fallback (for tests/dev when the plugin is not installed): `plugins/exa-search/skills/exa-search/scripts/search.sh`.
28
+
29
+ ```
30
+ search.sh <command> [options]
31
+
32
+ Commands:
33
+ search Search the web (default if no command given)
34
+ crawl Extract content from URLs via /contents endpoint
35
+ similar Find pages similar to a URL via /findSimilar endpoint
36
+ ```
37
+
38
+ ### search (default)
39
+
40
+ ```bash
41
+ search.sh search -q "query" [options]
42
+ search.sh "query" # bare query works too
43
+
44
+ Options:
45
+ -q, --query Search query (required)
46
+ -n, --num-results Number of results (default: 10, max: 100)
47
+ -t, --type instant|fast|auto|deep-lite|deep|deep-reasoning (default: auto)
48
+ -c, --category company|research paper|news|personal site|financial report|people
49
+ --include-domains Comma-separated domains to include
50
+ --exclude-domains Comma-separated domains to exclude
51
+ --start-date Start published date (YYYY-MM-DD)
52
+ --end-date End published date (YYYY-MM-DD)
53
+ --include-text Text that must appear (single phrase, max 5 words)
54
+ --exclude-text Text to exclude (single phrase, max 5 words)
55
+ --highlights N Max highlight chars (default: 4000)
56
+ --with-text Include full text in results
57
+ --lean Strip image/favicon/subpages/entities — AI-prompt-ready output
58
+ ```
59
+
60
+ ### crawl
61
+
62
+ ```bash
63
+ search.sh crawl <url> [url...] [-m max_chars]
64
+
65
+ Options:
66
+ -m, --max-chars Max characters per page (default: 3000)
67
+ ```
68
+
69
+ ### similar
70
+
71
+ ```bash
72
+ search.sh similar <url> [-n num_results] [--highlights N]
73
+ ```
74
+
75
+ ## Key Constraints
76
+
77
+ | Constraint | Detail |
78
+ |---|---|
79
+ | `--include-text` / `--exclude-text` | **Single phrase ONLY.** Multiple values cause 400 errors. |
80
+ | `company`/`people` categories | Reject `--start-date`, `--end-date`, `--exclude-domains`. Use other categories when those filters matter. |
81
+ | `people` category | `--include-domains` only accepts supported profile domains (LinkedIn et al). |
82
+ | `deep-*` types | Adds synthesis latency (~seconds). Use `instant` or `fast` for low-latency lookups. |
83
+
84
+ ## Query Best Practices
85
+
86
+ 1. **Include language context** in code searches: "Go generics" not just "generics"
87
+ 2. **Use exact identifiers** when available: function names, class names, error messages
88
+ 3. **Vary query phrasings** for broader coverage: generate 2-3 variations
89
+ 4. **Use `--with-text`** when you need full page content, not just highlights
90
+ 5. **Pipe through jq** to extract specific fields: `| jq '.results[] | {title, url}'`
91
+ 6. **Use `--lean`** when feeding results back to an LLM — strips image/favicon/subpages/entities to keep token count low