Skip to content

Commit d5e5b8f

Browse files
authored
Merge pull request #2 from polymorfa/feat/marketplace-installs
Add Claude and Codex marketplaces and docs skills endpoint builder
2 parents 09df11f + e0ed733 commit d5e5b8f

10 files changed

Lines changed: 429 additions & 6 deletions

File tree

‎.agents/plugins/marketplace.json‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "polymorfa",
3+
"interface": {"displayName": "Polymorfa"},
4+
"plugins": [
5+
{
6+
"name": "polymorfa",
7+
"source": {"source": "local", "path": "./"},
8+
"policy": {"installation": "AVAILABLE", "authentication": "ON_INSTALL"},
9+
"category": "Developer Tools"
10+
}
11+
]
12+
}

‎.claude-plugin/marketplace.json‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "polymorfa",
3+
"owner": {
4+
"name": "Polymorfa"
5+
},
6+
"plugins": [
7+
{
8+
"name": "polymorfa",
9+
"source": "./",
10+
"description": "Set up Polymorfa integrations using maintained documentation."
11+
}
12+
],
13+
"description": "Skills and documentation tools for Polymorfa integrations."
14+
}

‎.github/workflows/validate.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ jobs:
66
steps:
77
- uses: actions/checkout@v4
88
- run: python3 scripts/validate.py
9+
- run: python3 -m unittest discover -s tests -v

‎.gitignore‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/dist/
2+
__pycache__/

‎README.md‎

Lines changed: 98 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,107 @@ Skills and plugin manifests for coding agents integrating Polymorfa. MIT license
44

55
## Install
66

7-
- Claude Code: clone this repository and run `claude --plugin-dir /absolute/path/to/agent-kit`.
8-
- Gemini CLI: run `gemini extensions install https://github.com/polymorfa/agent-kit`.
9-
- Agent Plugins clients: load the repository root containing `plugin.json` through the client's plugin installer.
10-
- Other skill clients: install the folders under `skills/` through the client's skill installer. Preserve unrelated skills and configuration.
7+
### Claude Code
118

12-
Cursor packaging lives in `.cursor-plugin/`. Marketplace publication and native client acceptance are separate from manifest validation.
9+
After the marketplace change reaches `main`:
10+
11+
```sh
12+
claude plugin marketplace add polymorfa/agent-kit
13+
claude plugin install polymorfa@polymorfa
14+
```
15+
16+
For a local checkout, replace `polymorfa/agent-kit` with its absolute path. To load without installing, run `claude --plugin-dir /absolute/path/to/agent-kit`.
17+
18+
### Codex CLI
19+
20+
Codex supports Git marketplaces. With a CLI version that includes `codex plugin`:
21+
22+
```sh
23+
codex plugin marketplace add polymorfa/agent-kit
24+
codex plugin add polymorfa@polymorfa
25+
```
26+
27+
Start a new session to use the skills and MCP tools. The catalog is `.agents/plugins/marketplace.json`; the existing root `plugin.json`, `mcp.json`, and `skills/` provide the portable plugin. A separate `.codex-plugin/plugin.json` is unnecessary. This uses Polymorfa's repository marketplace, with no OpenAI-curated listing implied. The IDE extension does not support plugins; use the skills-only route below there.
28+
29+
These commands require the catalog on `main`. Local verification used Codex CLI 0.163.0. See OpenAI's [plugin packaging and marketplace guide](https://developers.openai.com/plugins/build/plugins) and [supported plugin surfaces](https://learn.chatgpt.com/docs/plugins).
30+
31+
### Gemini CLI
32+
33+
```sh
34+
gemini extensions install https://github.com/polymorfa/agent-kit
35+
```
36+
37+
The extension uses `gemini-extension.json` and `GEMINI.md`. Native Gemini acceptance has not been run here.
38+
39+
### Cursor
40+
41+
Cursor packaging lives in `.cursor-plugin/`. For a published plugin, open Customize, find the plugin, and select Install with project or user scope, as described in [Cursor's plugin guide](https://cursor.com/docs/plugins). Marketplace publication is a separate step; this repository does not establish a published Cursor listing. Until a listing is available, install the skills into your project:
42+
43+
```sh
44+
npx skills add https://github.com/polymorfa/agent-kit --agent cursor
45+
```
46+
47+
This installs skills only. It does not configure the bundled documentation MCP. Native Cursor plugin acceptance has not been run here.
48+
49+
### Skills only
50+
51+
From the target project directory:
52+
53+
```sh
54+
npx skills add https://github.com/polymorfa/agent-kit
55+
```
56+
57+
Choose the target agent and skills when prompted. Project installation is the default; `--global` changes user configuration. Preserve unrelated skills and configuration. Other skill clients can copy the folders under `skills/` through their skill installer.
58+
59+
Once the docs site serves the generated endpoint, this command will also work:
60+
61+
```sh
62+
npx skills add https://docs.polymorfa.com
63+
```
64+
65+
The domain command requires docs deployment. Generating files in this repository does not publish them.
1366

1467
Read [agent setup](https://docs.polymorfa.com/agent-setup/prompt.md) to add the CLI or authenticated API MCP. Existing API credentials remain the supported authentication method; do not configure an unimplemented OAuth login.
1568

69+
## Build the docs skills endpoint
70+
71+
```sh
72+
python3 scripts/build_skills_index.py
73+
```
74+
75+
The builder writes `dist/well-known-skills/index.json` and `<skill-name>/<file>` for every file in each `skills/<skill-name>/` folder, including nested references. The index format matches [Stripe's live skills index](https://docs.stripe.com/.well-known/skills/index.json):
76+
77+
```json
78+
{
79+
"skills": [
80+
{
81+
"name": "polymorfa",
82+
"description": "Set up Polymorfa tooling or build a WhatsApp integration with its API, SDK, CLI, or MCP tools.",
83+
"files": ["SKILL.md"]
84+
}
85+
]
86+
}
87+
```
88+
89+
The real index includes both bundled skills. Files are fetched relative to `/.well-known/skills/<name>/`, for example `/.well-known/skills/polymorfa/SKILL.md`.
90+
91+
Generated output is ignored by Git. The docs build should use a pinned agent-kit revision, run the builder, and copy the contents of `dist/well-known-skills/` to the site's `public/.well-known/skills/` directory (or equivalent static root). Serve the index as JSON and the skill files as their original bytes without authentication or HTML fallbacks. This keeps `skills/` as the source and avoids stale committed copies. Docs integration and deployment are outside this repository change.
92+
93+
The builder supports this repository's plain, single-line `name` and `description` frontmatter. It rejects unsupported metadata and symlinks rather than publishing an ambiguous index.
94+
1695
## Validate
1796

18-
Run `python3 scripts/validate.py`, then check plugin loading and documentation search in your agent.
97+
```sh
98+
python3 scripts/validate.py
99+
claude plugin validate .
100+
```
101+
102+
The Python validator checks the plugin manifests, both marketplaces, and the rebuilt endpoint's metadata, complete file inventory, and byte equality. For an isolated Claude check, set `CLAUDE_CONFIG_DIR` to a throwaway absolute directory. For Codex use an isolated `CODEX_HOME`.
103+
104+
To test the HTTP endpoint locally, copy the generated directory to a test server root at `.well-known/skills/`, serve that root, and run this from a throwaway project directory:
105+
106+
```sh
107+
npx skills add http://localhost:18743 --agent codex --skill '*' --yes --copy
108+
```
109+
110+
Omit `--global` so the install stays in that project. Verify the installed skill files against their sources. Plugin installation, MCP discovery, authenticated API access, and deployed availability are separate checks.
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Marketplace install implementation
2+
3+
Date: 2026-10-19. Collaborator: purpshell. Agent: Codex, gpt-6.1-sol, through T3 Code. The thread identifier was not supplied to this session. This is a sanitized checkpoint of visible task instructions and tool results, not a complete transcript. No hidden reasoning, credentials, or customer data is included.
4+
5+
## Scope and source revision
6+
7+
The owner requested Claude and Codex repository marketplace installs, a Stripe-compatible docs skills endpoint builder, validator coverage, README instructions, and a PR against main. No merge, publication, workflow enablement, or automated review request is authorized. The fresh clone started from main at `09df11ff9ae6acecc76bea77e3d8fc9ebf5f0269`. No contribution guide or AGENTS.md exists in this repository. Work stayed in `~/.polymorfa-agent-work/agent-kit-marketplace/` on `feat/marketplace-installs`.
8+
9+
The OpenAI Docs skill was loaded for official source research. The originating monorepo's writing and checkout preservation rules were supplied by the user. No implementation delegation or automated reviewer was used. Roadmap records were not supplied or reconciled; this checkpoint does not claim Linear or Notion synchronization.
10+
11+
## Schema evidence
12+
13+
- [Anthropic marketplace guide](https://code.claude.com/docs/en/plugin-marketplaces): `.claude-plugin/marketplace.json` requires a name, owner, and plugin entries with name and source. Relative sources resolve from the marketplace root. The entry here uses `./`.
14+
- [OpenAI packaging guide](https://developers.openai.com/plugins/build/plugins): `.agents/plugins/marketplace.json` declares the catalog; `source.path` resolves from its repository root. Root `plugin.json`, `mcp.json`, and `skills/` are supported portable components. No Codex overlay is needed. The guide documents `codex plugin marketplace add owner/repo` and Git ref selection.
15+
- [OpenAI plugin surfaces](https://learn.chatgpt.com/docs/plugins): Codex CLI supports marketplace plugins and requires a new session after installation. The IDE extension does not support plugins.
16+
- Installed `codex-cli 0.163.0`: `codex --help` lists `plugin`; `codex plugin marketplace add --help` accepts local paths, owner/repo with optional ref, HTTPS and SSH Git URLs; `codex plugin add --help` accepts `PLUGIN@MARKETPLACE`.
17+
- [Stripe's live index](https://docs.stripe.com/.well-known/skills/index.json) was fetched. Its shape is `{"skills":[{"name":"...","description":"...","files":["SKILL.md","references/..."]}]}`. Fetching [a listed skill](https://docs.stripe.com/.well-known/skills/stripe-best-practices/SKILL.md) returned Markdown frontmatter, confirming the relative file layout. Stripe content was not copied into this repository.
18+
- [Cursor plugin guide](https://cursor.com/docs/plugins): native marketplace install uses Customize and an Install action. Marketplace listing requires separate publication. This PR does not submit a listing.
19+
20+
## Verification
21+
22+
All installation writes used task-specific directories outside the user's real agent configuration. The local source is the fresh clone, including this patch.
23+
24+
- `python3 scripts/validate.py`: passed. Rebuilds and validates the skills endpoint alongside existing plugin/MCP checks and the two catalogs.
25+
- Claude Code `2.1.303`, with `CLAUDE_CONFIG_DIR` set to the absolute task `claude-config` directory:
26+
- `claude plugin validate .`: passed without warnings.
27+
- `claude plugin validate .claude-plugin/plugin.json`: passed.
28+
- `claude plugin marketplace add <absolute-checkout>`: added `polymorfa`.
29+
- `claude plugin install polymorfa@polymorfa`: installed version 0.1.0.
30+
- `claude plugin details polymorfa`: reported two skills (`polymorfa`, `polymorfa-webhooks`) and one MCP server (`polymorfa-docs`). This is component inventory, not a live MCP search.
31+
- Codex CLI `0.163.0`, with `CODEX_HOME` set to the absolute task `codex-config` directory:
32+
- `codex plugin marketplace add <absolute-checkout> --json`: added `polymorfa`.
33+
- `codex plugin add polymorfa@polymorfa --json`: installed 0.1.0 into the isolated plugin cache.
34+
- `codex plugin list --json`: reported the plugin installed and enabled.
35+
- `skills` npm CLI `1.7.2`: `npx --yes skills --help` confirms project install is the default, `--agent` selects the target, `--copy` avoids symlinks, and `--yes` skips prompts. No `--global` option was used.
36+
- Copied `dist/well-known-skills/` to a task server root at `.well-known/skills/`.
37+
- `python3 -m http.server 18743 --bind 127.0.0.1 --directory <task-site-root>` served it.
38+
- From a throwaway task project, `npx --yes skills add http://localhost:18743 --agent codex --skill '*' --yes --copy` found and installed both skills under that project's `.agents/skills/`.
39+
- Both installed SKILL.md files matched repository source bytes.
40+
- Separate builder fixtures under the task directory: nested `references/guide.md` was included and copied; rebuilding removed a stale output file; validation rejected corrupted bytes; building rejected a source symlink.
41+
- `git diff --check`: passed.
42+
43+
## Availability and handoff
44+
45+
Generated `dist/well-known-skills/` is ignored. The docs build must run the script at a pinned agent-kit revision and copy the generated contents to `public/.well-known/skills/` or an equivalent static root. No docs deployment was performed. The domain install command remains gated on that deployment. Default-branch repository marketplace installs remain gated on merging this PR.
46+
47+
Gemini and Cursor executables were absent. Their native installs were not tested. The existing extension/plugin files and all skill contents remain unchanged. API, SDK, CLI product behavior, Admin, authentication, billing, and customer data are unaffected by these packaging changes. No workflow files were changed or re-enabled.
48+
49+
A useful optional engineering article would compare manifest validation with real isolated installs, using the Claude component inventory and HTTP skill-byte checks as evidence. It would keep unmerged and undeployed availability explicit.
50+
51+
## Remote install checkpoint
52+
53+
At pushed implementation revision `0bd7c800185c5c63d241dab3d001d5fb3fe1e369`, both Git-backed installs also passed in separate task configurations:
54+
55+
```sh
56+
CLAUDE_CONFIG_DIR=<task>/claude-git-config claude plugin marketplace add 'https://github.com/polymorfa/agent-kit.git#feat/marketplace-installs'
57+
CLAUDE_CONFIG_DIR=<task>/claude-git-config claude plugin install polymorfa@polymorfa
58+
CLAUDE_CONFIG_DIR=<task>/claude-git-config claude plugin details polymorfa
59+
CODEX_HOME=<task>/codex-git-config codex plugin marketplace add polymorfa/agent-kit --ref feat/marketplace-installs --json
60+
CODEX_HOME=<task>/codex-git-config codex plugin add polymorfa@polymorfa --json
61+
```
62+
63+
Claude cloned the selected branch and reported two skills and the documentation MCP server. Codex fetched the branch, installed version 0.1.0, and its cache contained the root portable manifest, MCP configuration, and both skill files. Remote and local branch heads matched that SHA.
64+
65+
The skills-only Git path also passed from a second throwaway project: `npx --yes skills add https://github.com/polymorfa/agent-kit --agent cursor --skill '*' --yes --copy` installed both skills. This checks the skills installer with Cursor selected, not the native Cursor runtime.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Marketplace review fixes
2+
3+
Date: 2026-10-21. Collaborator: purpshell. Agent: Codex, gpt-6.1-sol, through T3 Code. This checkpoint records visible instructions and results. A thread identifier and complete transcript were not supplied. It contains no hidden reasoning, credentials or customer data.
4+
5+
The owner authorized fixing unsolicited findings on agent-kit PR #2, committing and pushing normally, and checking hosted CI. Merge and review requests are prohibited. Work used a fresh clone under `~/.polymorfa-agent-work/agentkit2-findings/agent-kit`, on `feat/marketplace-installs`, starting at `eec5dd450a4ba125d7eeb776bebae3b46cb55da6`. No AGENTS.md exists in this repository or its local parent directories. README, both scripts, CI and all three inline review comments were read. The supplied writing policy was applied. No reviewer instructions were executed and no review was requested.
6+
7+
## Verified findings
8+
9+
- Codex comment 4317574028: fixed. The parser accepted descriptions containing YAML comments or mapping delimiters. It now rejects reserved initial characters, surrounding whitespace, whitespace followed by `#`, and `:` followed by whitespace or the end of the value. Ordinary URLs, URL fragments and embedded punctuation remain supported.
10+
- Codex comment 4317574037: fixed. Malformed ignored JSON prevented validation from reaching its rebuild. The builder now runs before scanning JSON. A subprocess regression checks recovery from malformed index and stale generated JSON, then checks that a malformed source manifest still fails.
11+
- CodeRabbit comment 4317588739: fixed. Equal, ancestor and descendant output paths could destroy source files. Resolved path containment is checked in both directions before deleting or creating output. Tests cover all overlap directions, a nonexistent descendant and a symlinked ancestor.
12+
13+
## Verification
14+
15+
- `gh api repos/polymorfa/agent-kit/pulls/2/comments` read all three findings as untrusted data.
16+
- `git fetch origin` and `git rev-list --left-right --count HEAD...origin/main` returned `2 0`. Main remains `09df11ff9ae6acecc76bea77e3d8fc9ebf5f0269`, already an ancestor. No merge is needed.
17+
- `python3 -m unittest discover -s tests -v` first reproduced all three defects against the original scripts. After fixes all six tests pass. Fixtures use task directories under `~/.polymorfa-agent-work/` and clean up only their own files.
18+
- `python3 scripts/build_skills_index.py` and `python3 scripts/validate.py` pass.
19+
- CI retains its validator step and adds the six regression tests. No checks were weakened.
20+
- `git diff --check` passes.
21+
- Built the original script from `git show eec5dd45:scripts/build_skills_index.py` into a separate task directory and compared every output file with the rebuilt endpoint. No content changed in `index.json`, `polymorfa/SKILL.md` or `polymorfa-webhooks/SKILL.md`.
22+
23+
## Scope and availability
24+
25+
Content changes are limited to `.github/workflows/validate.yml`, `scripts/build_skills_index.py`, `scripts/validate.py`, `tests/test_skills_index.py` and this checkpoint. Skill source files, generated output bytes, manifests and installer instructions remain unchanged. The docs site can continue using its pinned skill bytes; adopting these builder safeguards requires updating its pinned revision separately.
26+
27+
No library, runner, Temporal, API, Admin/MCP, logging, Inspector, Console, SDK, product CLI, Help Center, marketing, billing, flag or release-contract behavior changed. No native installation retest is claimed for this Python-only follow-up. No docs deployment, roadmap synchronization, merge or publication was performed. Hosted CI results belong to the final pushed revision and are reported separately at handoff.

0 commit comments

Comments
 (0)