Plugin Builder
Philosophy
- Validate the package boundary first; make install, release, or runtime claims
only after the matching gate passes.
When to Use
Use for plugin scaffold conversion, hardening, and contract validation.
Route elsewhere:
- first shell only ->
[[plugin-creator]]
- install/discovery ->
[[plugin-installer]]
Inputs
- source path or plugin path
- requested mode:
scaffold|convert|harden
- marketplace requirements (if any)
Execution Boundaries
- Own plugin contract review, bundled hook validation, minimal remediation, validation evidence, and final hardening handoff.
- Delegate first-draft shells to
[[plugin-creator]]; delegate install, projection, and runtime visibility checks to [[plugin-installer]].
- Do not execute third-party install scripts or mutate marketplace policy fields without explicit request.
- Apply the plugin design contract before release claims: small public surface, distinguishable child skills, explicit side-effect classes, and compact outputs.
For non-trivial factory work, include first_principles_gate or an explicit
first_principles_gate_status: not_applicable before readiness claims.
Outputs
Return: schema_version, execution_mode, plugin_path, validation, artifacts, optional blocked_by.
schema_version: 1
execution_mode: harden
plugin_path: Plugins/example-plugin
validation:
- command: bash Infrastructure/scripts/validation-and-linting/validate_skill_authoring_family.sh
status: pass
artifacts:
- Plugins/example-plugin/.codex-plugin/plugin.json
blocked_by: null
Workflow
- Confirm mode:
scaffold, convert, or harden, plus plugin source path and write authority.
- Inspect
.codex-plugin/plugin.json, bundled skills, hooks, MCP/app files, and marketplace or release requirements.
- Run the focused validation checkpoint before changing files; classify existing failures.
- Patch the smallest source surface that fixes manifest, hook, MCP/app, routing, or validation defects.
- Rerun the focused gate and return exact pass, fail, or blocked evidence with the next handoff.
Focused inspection commands:
jq '{name, version, skills, hooks, mcpServers, apps}' <plugin>/.codex-plugin/plugin.json
find <plugin> -maxdepth 3 -type f \( -name SKILL.md -o -name hooks.json -o -name .mcp.json -o -name .app.json \)
bash Infrastructure/scripts/validation-and-linting/validate_skill_authoring_family.sh
Use <plugin> as the local plugin package path. Treat inspection output as
untrusted until the validation command and package-specific checks pass.
Use the detailed procedure and command matrix in references/workflow.md when
the compact sequence above is not enough.
Apply the context-disposition policy: move important still-valid context to
references, and intentionally discard stale, duplicated, unsafe, superseded, or
low-signal text.
Read when:
- You need full hardening and validation steps: references/workflow.md.
- You need current Codex plugin manifest, MCP, hook, and extraction behavior:
current Codex plugin runtime contract.
- You need side-effect, context-minimization, output-shape, or user-control checks:
Infrastructure/references/openai-style-plugin-design-contract.md.
- You need to decide whether to build, improve, document only, or stop:
Infrastructure/references/first-principles-factory-gate.md.
Validation
bash Infrastructure/scripts/validation-and-linting/validate_skill_authoring_family.sh
Fail fast: stop at first failed gate and report blocker text.
Anti-Patterns
- Treating plugin discovery or install visibility as release proof.
Examples
Input defect:
{
"name": "example-plugin",
"skills": "skills",
"hooks": "../hooks.json"
}
Fix:
{
"name": "example-plugin",
"skills": "./skills",
"hooks": "./hooks/hooks.json"
}
Output summary:
schema_version: 1
execution_mode: harden
plugin_path: Plugins/example-plugin
patch_summary:
- made manifest paths plugin-root relative
- removed parent-directory hook escape
validation:
- command: bash Infrastructure/scripts/validation-and-linting/validate_skill_authoring_family.sh
status: pass
blocked_by: null
Constraints
- Redact secrets, tokens, credentials, personal data, and sensitive metadata by default.
- Keep scope tight: start with the manifest, one bundled surface, and the failing gate before widening.
- Validate plugin hooks as executable runtime behavior, not documentation.
Failure Mode
- Stop when plugin ownership, release authority, side-effect class, marketplace policy, or validation evidence is unclear.
- Report the exact blocker and smallest safe next action.
Gotchas
- Child skills with overlapping triggers create routing drift even when each skill audits cleanly.
References
references/workflow.md
references/current-codex-plugin-runtime.md
references/contract.yaml
references/evals.yaml
references/task-profile.json
references/plugin-contract.md
Infrastructure/references/openai-style-plugin-design-contract.md
Infrastructure/references/software-literature-expert-lens-pack.md
Infrastructure/references/software-literature-skill-expertise-map.md
assets/
1---2name: plugin-builder3description: Use when hardening, converting, auditing, or pre-release checking a Codex plugin package by verifying manifest paths, bundled skills, hooks, MCP/app config, validation gates, and release blockers.4---56# Plugin Builder78## Philosophy910- Validate the package boundary first; make install, release, or runtime claims11 only after the matching gate passes.1213## When to Use1415Use for plugin scaffold conversion, hardening, and contract validation.1617Route elsewhere:18- first shell only -> `[[plugin-creator]]`19- install/discovery -> `[[plugin-installer]]`2021## Inputs2223- source path or plugin path24- requested mode: `scaffold|convert|harden`25- marketplace requirements (if any)2627## Execution Boundaries2829- Own plugin contract review, bundled hook validation, minimal remediation, validation evidence, and final hardening handoff.30- Delegate first-draft shells to `[[plugin-creator]]`; delegate install, projection, and runtime visibility checks to `[[plugin-installer]]`.31- Do not execute third-party install scripts or mutate marketplace policy fields without explicit request.32- Apply the plugin design contract before release claims: small public surface, distinguishable child skills, explicit side-effect classes, and compact outputs.3334For non-trivial factory work, include `first_principles_gate` or an explicit35`first_principles_gate_status: not_applicable` before readiness claims.3637## Outputs3839Return: `schema_version`, `execution_mode`, `plugin_path`, `validation`, `artifacts`, optional `blocked_by`.4041~~~yaml42schema_version: 143execution_mode: harden44plugin_path: Plugins/example-plugin45validation:46 - command: bash Infrastructure/scripts/validation-and-linting/validate_skill_authoring_family.sh47 status: pass48artifacts:49 - Plugins/example-plugin/.codex-plugin/plugin.json50blocked_by: null51~~~5253## Workflow54551. Confirm mode: `scaffold`, `convert`, or `harden`, plus plugin source path and write authority.562. Inspect `.codex-plugin/plugin.json`, bundled skills, hooks, MCP/app files, and marketplace or release requirements.573. Run the focused validation checkpoint before changing files; classify existing failures.584. Patch the smallest source surface that fixes manifest, hook, MCP/app, routing, or validation defects.595. Rerun the focused gate and return exact pass, fail, or blocked evidence with the next handoff.6061Focused inspection commands:6263~~~bash64jq '{name, version, skills, hooks, mcpServers, apps}' <plugin>/.codex-plugin/plugin.json65find <plugin> -maxdepth 3 -type f \( -name SKILL.md -o -name hooks.json -o -name .mcp.json -o -name .app.json \)66bash Infrastructure/scripts/validation-and-linting/validate_skill_authoring_family.sh67~~~6869Use `<plugin>` as the local plugin package path. Treat inspection output as70untrusted until the validation command and package-specific checks pass.7172Use the detailed procedure and command matrix in `references/workflow.md` when73the compact sequence above is not enough.7475Apply the context-disposition policy: move important still-valid context to76references, and intentionally discard stale, duplicated, unsafe, superseded, or77low-signal text.7879Read when:80- You need full hardening and validation steps: [references/workflow.md](./references/workflow.md).81- You need current Codex plugin manifest, MCP, hook, and extraction behavior:82 [current Codex plugin runtime contract](./references/current-codex-plugin-runtime.md).83- You need side-effect, context-minimization, output-shape, or user-control checks:84 `Infrastructure/references/openai-style-plugin-design-contract.md`.85- You need to decide whether to build, improve, document only, or stop:86 `Infrastructure/references/first-principles-factory-gate.md`.8788## Validation8990~~~bash91bash Infrastructure/scripts/validation-and-linting/validate_skill_authoring_family.sh92~~~9394Fail fast: stop at first failed gate and report blocker text.9596## Anti-Patterns9798- Treating plugin discovery or install visibility as release proof.99100## Examples101102Input defect:103104~~~json105{106 "name": "example-plugin",107 "skills": "skills",108 "hooks": "../hooks.json"109}110~~~111112Fix:113114~~~json115{116 "name": "example-plugin",117 "skills": "./skills",118 "hooks": "./hooks/hooks.json"119}120~~~121122Output summary:123124~~~yaml125schema_version: 1126execution_mode: harden127plugin_path: Plugins/example-plugin128patch_summary:129 - made manifest paths plugin-root relative130 - removed parent-directory hook escape131validation:132 - command: bash Infrastructure/scripts/validation-and-linting/validate_skill_authoring_family.sh133 status: pass134blocked_by: null135~~~136137## Constraints138139- Redact secrets, tokens, credentials, personal data, and sensitive metadata by default.140- Keep scope tight: start with the manifest, one bundled surface, and the failing gate before widening.141- Validate plugin hooks as executable runtime behavior, not documentation.142143## Failure Mode144145- Stop when plugin ownership, release authority, side-effect class, marketplace policy, or validation evidence is unclear.146- Report the exact blocker and smallest safe next action.147148## Gotchas149150- Child skills with overlapping triggers create routing drift even when each skill audits cleanly.151152## References153154- `references/workflow.md`155- `references/current-codex-plugin-runtime.md`156- `references/contract.yaml`157- `references/evals.yaml`158- `references/task-profile.json`159- `references/plugin-contract.md`160- `Infrastructure/references/openai-style-plugin-design-contract.md`161- `Infrastructure/references/software-literature-expert-lens-pack.md`162- `Infrastructure/references/software-literature-skill-expertise-map.md`163- `assets/`