Skip to content

Commit 98347ea

Browse files
committed
ci: add plugin bundle validation and update contribution guidelines
- Add validate-plugin-pr.py script that checks new/modified plugins for: - Valid plugin.json with required fields (name, version, description, repository, license) - composerIcon in interface section pointing to existing file - Icon file format/size validation (SVG preferred, max 50KB) - README entry exists for the plugin - Semver version format, slug-safe plugin name - Add validate-plugin-pr.yml workflow triggered on plugin path changes - Update CONTRIBUTING.md with full plugin bundle spec and icon requirements - Update plugin-submission.yml issue template to require icon path
1 parent a89a390 commit 98347ea

4 files changed

Lines changed: 430 additions & 18 deletions

File tree

.github/ISSUE_TEMPLATE/plugin-submission.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ body:
2727
placeholder: "Briefly describe the plugin's functionality..."
2828
validations:
2929
required: true
30+
- type: input
31+
id: icon
32+
attributes:
33+
label: Icon File Path
34+
description: Path to your plugin icon relative to the repo root (e.g. assets/icon.svg). See CONTRIBUTING.md for icon requirements.
35+
placeholder: "assets/icon.svg"
36+
validations:
37+
required: true
3038
- type: input
3139
id: author
3240
attributes:
@@ -41,8 +49,8 @@ body:
4149
label: Category
4250
description: Which section should this plugin be listed under?
4351
options:
44-
- Community Plugins
45-
- Plugin Development (tools/frameworks)
52+
- Development & Workflow
53+
- Tools & Integrations
4654
validations:
4755
required: true
4856
- type: checkboxes
@@ -51,7 +59,9 @@ body:
5159
label: Checklist
5260
description: Please confirm the following
5361
options:
54-
- label: Plugin has a valid `.codex-plugin/plugin.json` manifest
62+
- label: Plugin has a valid `.codex-plugin/plugin.json` manifest with `composerIcon` set
63+
required: true
64+
- label: Plugin includes an icon (SVG preferred, 512x512px recommended)
5565
required: true
5666
- label: Plugin is functional and well-documented
5767
required: true
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Validate Plugin PR
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "plugins/**"
7+
- ".agents/plugins/marketplace.json"
8+
- "plugins.json"
9+
10+
permissions:
11+
contents: read
12+
id-token: none
13+
14+
jobs:
15+
validate:
16+
name: Validate plugin bundles
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
- uses: actions/setup-python@v5
23+
with:
24+
python-version: "3.12"
25+
- name: Validate changed plugin bundles
26+
run: python3 scripts/validate-plugin-pr.py --base-ref origin/${{ github.base_ref }}

CONTRIBUTING.md

Lines changed: 93 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,105 @@ Thanks for helping grow the Codex plugin ecosystem!
66

77
1. **Fork** this repository
88
2. **Add your entry** to the appropriate section in `README.md`
9-
3. **Follow the format** — use the existing table structure
10-
4. **Submit a PR** with a clear description
9+
3. **Add your plugin bundle** under `plugins/<owner>/<repo>/`
10+
4. **Follow the format** described below
11+
5. **Submit a PR** with a clear description
1112

12-
## Requirements
13+
## Plugin Bundle Requirements
14+
15+
Every plugin submission must include a bundle under `plugins/<owner>/<repo>/` with the following structure:
16+
17+
```
18+
plugins/<owner>/<repo>/
19+
.codex-plugin/
20+
plugin.json # Required - plugin manifest
21+
assets/
22+
icon.svg # Required - plugin icon (SVG preferred, PNG acceptable)
23+
... # Other plugin files (skills, commands, etc.)
24+
```
25+
26+
### plugin.json
27+
28+
Must be valid JSON at `.codex-plugin/plugin.json` with at minimum:
29+
30+
```json
31+
{
32+
"name": "my-plugin",
33+
"version": "1.0.0",
34+
"description": "What this plugin does",
35+
"repository": "https://github.com/<owner>/<repo>",
36+
"license": "MIT",
37+
"interface": {
38+
"displayName": "My Plugin",
39+
"shortDescription": "Brief one-liner",
40+
"composerIcon": "./assets/icon.svg"
41+
}
42+
}
43+
```
44+
45+
**Required fields:**
46+
- `name` - machine-readable plugin identifier
47+
- `version` - semver version string
48+
- `description` - what the plugin does
49+
- `repository` - GitHub repository URL
50+
- `license` - SPDX license identifier
51+
- `interface.composerIcon` - path to the icon file (relative to plugin root)
52+
53+
### Icon
54+
55+
- **Format:** SVG preferred. PNG also accepted.
56+
- **Size:** 512x512px recommended. Must read clearly at small sizes (32x32).
57+
- **Location:** `assets/icon.svg` (or `assets/icon.png`)
58+
- **Style:** Simple, distinctive. Avoid text-heavy designs.
59+
- **File size:** Keep under 50KB. Optimize SVGs (no embedded raster images).
60+
61+
## README Entry Format
62+
63+
Add your plugin as a single line in the appropriate category section:
64+
65+
```markdown
66+
- [Plugin Name](https://github.com/<owner>/<repo>) - One-line description of what it does.
67+
```
68+
69+
Rules:
70+
- One plugin per line
71+
- Alphabetical order within each category
72+
- Description must be a single sentence
73+
- Link must point to the GitHub repository root
74+
75+
## Additional Requirements
1376

1477
- Plugin must have a **public GitHub repository**
15-
- Must include a valid `.codex-plugin/plugin.json` manifest
16-
- Must be **functional** — no placeholders or stub repos
78+
- Must be **functional** with a valid `.codex-plugin/plugin.json` manifest
79+
- Must include an **icon** as described above
1780
- Include a **description** that explains what the plugin does
18-
- Link to the **author** (GitHub username or organization)
81+
- **One plugin per PR** (unless adding multiple related plugins)
1982

2083
## Categories
2184

22-
- **Official Plugins** — Only OpenAI-curated plugins go here
23-
- **Community Plugins** — All third-party plugins
24-
- **Plugin Development** — Tools, templates, and frameworks for building plugins
25-
- **Guides & Articles** — Tutorials, blog posts, and documentation
85+
- **Development & Workflow** - Tools for coding, planning, and development workflows
86+
- **Tools & Integrations** - External service integrations and utilities
87+
88+
## PR Checklist
89+
90+
Before submitting, verify:
91+
92+
- [ ] README.md entry is alphabetically sorted within its category
93+
- [ ] Plugin bundle exists under `plugins/<owner>/<repo>/`
94+
- [ ] `.codex-plugin/plugin.json` exists and is valid JSON
95+
- [ ] `composerIcon` field is set in `plugin.json` interface section
96+
- [ ] Icon file exists at the path referenced by `composerIcon`
97+
- [ ] All links in the README entry are valid
98+
- [ ] No placeholder or TODO values in plugin.json
99+
100+
## CI Checks
101+
102+
All PRs are automatically validated. The CI will check:
26103

27-
## PR Guidelines
104+
1. **Alphabetical order** - README entries must be sorted within each section
105+
2. **Plugin manifest** - `plugin.json` must exist and contain required fields
106+
3. **Icon presence** - `composerIcon` must point to an existing file
107+
4. **Marketplace sync** - `plugins.json` and `marketplace.json` stay in sync with README
108+
5. **Markdown links** - All URLs in README must be reachable
28109

29-
- One plugin per PR (unless adding multiple related plugins)
30-
- Keep descriptions concise (one line)
31-
- Alphabetize within categories
32-
- Test that all links work before submitting
110+
If CI fails, check the logs for specific errors and fix before re-pushing.

0 commit comments

Comments
 (0)