@srobroek/pi-find-tools 0.0.0-stage → 0.5.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/package.json CHANGED
@@ -1,6 +1,37 @@
1
1
  {
2
2
  "name": "@srobroek/pi-find-tools",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.5.0",
4
+ "description": "Discover and vet plugins, skills and MCP servers across local inventory, catalogs and public registries, without installing anything.",
5
+ "keywords": [
6
+ "pi-package"
7
+ ],
8
+ "license": "Apache-2.0",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/srobroek/harness-plugins.git",
12
+ "directory": "plugins/find-tools/pi"
13
+ },
14
+ "files": [
15
+ "CHANGELOG.md",
16
+ "LICENSE",
17
+ "README.md",
18
+ "extensions",
19
+ "skills"
20
+ ],
21
+ "publishConfig": {
22
+ "access": "public",
23
+ "provenance": true
24
+ },
25
+ "peerDependencies": {
26
+ "@earendil-works/pi-coding-agent": "*",
27
+ "typebox": "*"
28
+ },
29
+ "pi": {
30
+ "extensions": [
31
+ "./extensions/find-tools.js"
32
+ ],
33
+ "skills": [
34
+ "./skills"
35
+ ]
36
+ }
37
+ }
@@ -0,0 +1,82 @@
1
+ ---
2
+ name: find-tools
3
+ description: Use when asked to find a tool, or whether to adopt, reject or build a plugin, skill or MCP server for a capability.
4
+ ---
5
+
6
+ # Find Tools
7
+
8
+ Discovery and vetting for reusable agent capabilities. Check what is already
9
+ installed before searching public sources. Discovery never installs anything:
10
+ installing is a separate step the user approves.
11
+
12
+ ## References
13
+
14
+ - `references/discovery-sources.md`: the eight sources `find_tools_scan`
15
+ queries, what each status means, and what is deliberately left out.
16
+ - `references/adoption-policy.md`: the decision vocabulary, install scopes and
17
+ the vetting rubric.
18
+
19
+ ## Workflow
20
+
21
+ 1. **Clarify the capability**: task, artifact type (plugin, skill, MCP server),
22
+ constraints (license, local or hosted, secrets, network access, writes).
23
+ 2. **Scan**: call `find_tools_scan` with a short query of a few specific words
24
+ (`browser automation`, `postgres schema`), not a sentence. Read every
25
+ source's status and the gap list. `empty` means the source answered with
26
+ nothing; `skipped` and `failed` mean it was not searched. Say which sources
27
+ you could not search instead of calling the search complete.
28
+ 3. **Check local coverage**: if a `plugin:` or `skill:` entry under `local`
29
+ already covers the need, recommend `Use existing` and stop. Local MCP
30
+ inventory is status counts only; ask the user which servers they have
31
+ rather than reading their configuration.
32
+ 4. **Vet serious candidates** with the rubric in `references/adoption-policy.md`.
33
+ Open the source: repository, license, last release or commit, maintainer,
34
+ the actual `SKILL.md`, plugin entry point or MCP tool list, and what it
35
+ needs (binaries, API keys, network, file writes). A registry or list entry
36
+ is a lead, not verification. `awesome_opencode` entries are unvetted.
37
+ 5. **Decide** per candidate with the vocabulary below and present the table.
38
+ 6. **Ask before installing.** Present the install hint, the scope and what it
39
+ runs, then wait for the user's answer. See *Installing* below.
40
+
41
+ ## Rules
42
+
43
+ - `find_tools_scan` and this workflow never install, add or run a discovered
44
+ package. Install hints in the scan are text for the user.
45
+ - Do not run the skills CLI (`npx skills find`, `npx skills add`) or the
46
+ Smithery CLI during discovery; both download and run package code. The
47
+ `skills_cli` gap stays a gap.
48
+ - Never pipe a downloaded script into a shell (`curl … | sh`). Read the script
49
+ first and give the user the reviewed command.
50
+ - Do not request or print MCP server configuration, headers or environment to
51
+ fill the local gap.
52
+ - A `failed` or `skipped` source is not evidence that nothing exists.
53
+
54
+ ## Installing
55
+
56
+ Only after the user picks a candidate:
57
+
58
+ - **Project scope is the default.** Plugins go in the project's
59
+ `opencode.json` `plugins` list, MCP servers through `opencode mcp add <name> …`
60
+ without `--global`, skills under the project's `.opencode/skills/<name>/`.
61
+ - **User-wide needs its own confirmation.** `opencode plugin add …` (writes the
62
+ global config), `opencode mcp add --global …` and `~/.config/opencode/skills/`
63
+ change every project. Ask separately and name the file that changes.
64
+ - **Package code needs its own confirmation.** A hint marked
65
+ *runs package code* (`npx -y`, `bunx`, `uvx`, `docker run`) downloads and
66
+ executes third-party code on every start. Name the package and version, and
67
+ ask separately even if the user already agreed to the install.
68
+ - With the plugin's install guard on (the default), skills CLI, Smithery CLI
69
+ and pipe-to-shell commands prompt again at the permission layer. That prompt
70
+ does not replace asking first.
71
+
72
+ ## Output
73
+
74
+ Lead with one decision: `Use existing`, `Adopt`, `Trial`, `Reject` or `Build`.
75
+ Then list the sources searched and the gaps, the candidate table, verification
76
+ notes, overlap with what is installed, the proposed install (scope and what it
77
+ runs) and caveats.
78
+
79
+ One row per serious candidate:
80
+
81
+ | name | type | source URL | license | last activity | overlap with installed | install (scope) | verdict |
82
+ | --- | --- | --- | --- | --- | --- | --- | --- |
@@ -0,0 +1,67 @@
1
+ # Adoption Policy
2
+
3
+ Adapted from the omp-plugins find-tools adoption policy for OpenCode V2.
4
+
5
+ ## Decisions
6
+
7
+ - `Use existing`: already installed or configured. The scan's `local` source
8
+ lists installed plugins (`plugin:`) and skills (`skill:`); MCP servers show as
9
+ counts, so confirm with the user. A plugin that a catalog only lists is
10
+ `Adopt`, not `Use existing`.
11
+ - `Adopt`: install at project scope (see *Scopes*). Install user-wide only when
12
+ the user asks for it.
13
+ - `Trial`: useful but risky or unclear. Try it in a throwaway project or
14
+ worktree without changing this project's source or the user's global config,
15
+ and only after approval.
16
+ - `Reject`: unsafe, stale, unlicensed, duplicate, incompatible, or too weak.
17
+ - `Build`: nothing that exists fits well enough.
18
+
19
+ ## Scopes
20
+
21
+ | Artifact | Project scope (default) | User-wide (ask separately) |
22
+ | --- | --- | --- |
23
+ | OpenCode plugin | add the spec to `plugins` in the project's `opencode.json` | `opencode plugin add <spec>` (global config) |
24
+ | MCP server | `opencode mcp add <name> --url …` or `-- <command>` | the same with `--global` |
25
+ | Skill | copy the skill directory to `.opencode/skills/<name>/`, or add a catalog URL to `skills` | `~/.config/opencode/skills/<name>/` |
26
+
27
+ A plugin from this repository installs with the spec
28
+ `github:srobroek/opencode-plugins::path:plugins/<name>`.
29
+
30
+ A V1 plugin (`@opencode-ai/plugin`) does not run on OpenCode V2. Check the
31
+ entry point imports `@opencode/plugin` before adopting a plugin.
32
+
33
+ A command that runs package code (`npx -y`, `bunx`, `uvx`, `docker run`, an
34
+ install script) needs its own confirmation that names the package and version.
35
+
36
+ ## Catalog adoption
37
+
38
+ When a tool should be reusable across projects:
39
+
40
+ 1. Prefer the upstream package or repository over copying its files.
41
+ 2. Do not vendor third-party skill trees into this repository when the
42
+ upstream publishes a catalog or package.
43
+ 3. A Claude Code marketplace entry is a pointer to source. OpenCode does not
44
+ install from it; adapt the skill or find the plugin's OpenCode package.
45
+
46
+ ## Vetting rubric
47
+
48
+ Score each serious candidate on:
49
+
50
+ - **Popularity**: downloads, stars, Smithery use count, dependents.
51
+ - **Maintenance**: recent commits or releases, an identifiable maintainer,
52
+ issue response.
53
+ - **Code quality**: readable source, tests or CI, schemas, typed config, error
54
+ handling.
55
+ - **Security**: license, required secrets and their scope, destructive tools or
56
+ write access, telemetry, network calls, how it installs (a published package
57
+ or a script piped into a shell).
58
+ - **Fit**: overlap with installed plugins and skills, local versus hosted,
59
+ simplicity, OpenCode V2 compatibility.
60
+
61
+ Reject:
62
+
63
+ - prompt-only wrappers around tools OpenCode already exposes cleanly;
64
+ - broad secret requirements without a strong reason;
65
+ - hidden or piped install scripts;
66
+ - missing licenses;
67
+ - duplicates of a better-maintained installed plugin or skill.
@@ -0,0 +1,39 @@
1
+ # Discovery Sources
2
+
3
+ `find_tools_scan` queries these sources in parallel, each with a 10-second
4
+ deadline. One failing source never fails the scan.
5
+
6
+ | Source | What it searches | Notes |
7
+ | --- | --- | --- |
8
+ | `local` | Installed plugins and skills (`ctx.plugin.list`, `ctx.skill.list`), MCP servers (`ctx.mcp.list`) | MCP appears as status counts only: no names, commands, URLs or environment |
9
+ | `catalog` | This repository's `.claude-plugin/marketplace.json` and the `skillCatalogs` from the plugin options | Lists only plugins whose skills work outside OpenCode |
10
+ | `mcp_registry` | Official MCP Registry, `/v0.1/servers?search=…&version=latest` | Matches a name substring, so the scan searches the query's most specific words and ranks the union |
11
+ | `npm` | Keywords `opencode-plugin`, `mcp-server`, `agent-skill`, `claude-skill` | Query trimmed to npm's 64-character search text; deduplicated, ranked, capped at 20 |
12
+ | `github` | `gh api`: code search for `.claude-plugin/marketplace.json` and `SKILL.md`, repositories with topic `opencode-plugin` | Skipped without `gh`; GitHub ANDs every word, so the scan sends the three most specific |
13
+ | `awesome_opencode` | The awesome-opencode README | Community list: every hit is marked unvetted |
14
+ | `smithery` | Smithery registry | Skipped unless `SMITHERY_API_KEY` is set |
15
+ | `skills_cli` | Nothing | Always a gap: the skills CLI runs package code, so discovery never calls it |
16
+
17
+ ## Statuses
18
+
19
+ - `ok`: answered with hits.
20
+ - `empty`: answered with nothing. That is a result, not a gap.
21
+ - `partial`: some sub-requests failed; the hits that did arrive are kept.
22
+ - `skipped`: not searched (missing tool or key, or not requested).
23
+ - `failed`: searched and could not answer (HTTP error, invalid response, timeout).
24
+
25
+ `skipped`, `partial` and `failed` sources are listed under `gaps`.
26
+
27
+ ## Install hints
28
+
29
+ A hit may carry an install hint: the project-scope command or config change,
30
+ and for plugins also the user-wide command. Hints marked *runs package code*
31
+ start a package runner (`npx -y`, `uvx`, `docker run`). The scan never runs a
32
+ hint.
33
+
34
+ ## Deliberately excluded
35
+
36
+ - Glama, PulseMCP, MCP.Directory, SkillsGate: HTML aggregators that overlap the
37
+ MCP Registry and Smithery.
38
+ - Other awesome lists: prose, scrape-only, high recall and low precision.
39
+ awesome-opencode is the exception because it is OpenCode-specific.