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.4metadata:5 version: "1.0.0"6 skill-type: code_quality_review7 lifecycle_state: active8 maturity: canonical9 owner: Agent Skills Team10 review_cadence: quarterly11 metadata_source: frontmatter12---1314# Plugin Builder1516## Philosophy1718- Validate the package boundary first; make install, release, or runtime claims19 only after the matching gate passes.2021## When to Use2223Use for plugin scaffold conversion, hardening, and contract validation.2425Route elsewhere:26- first shell only -> `[[plugin-creator]]`27- install/discovery -> `[[plugin-installer]]`2829## Inputs3031- source path or plugin path32- requested mode: `scaffold|convert|harden`33- marketplace requirements (if any)3435## Execution Boundaries3637- Own plugin contract review, bundled hook validation, minimal remediation, validation evidence, and final hardening handoff.38- Delegate first-draft shells to `[[plugin-creator]]`; delegate install, projection, and runtime visibility checks to `[[plugin-installer]]`.39- Do not execute third-party install scripts or mutate marketplace policy fields without explicit request.40- Apply the plugin design contract before release claims: small public surface, distinguishable child skills, explicit side-effect classes, and compact outputs.4142For non-trivial factory work, include `first_principles_gate` or an explicit43`first_principles_gate_status: not_applicable` before readiness claims.4445## Outputs4647Return: `schema_version`, `execution_mode`, `plugin_path`, `validation`, `artifacts`, optional `blocked_by`.4849~~~yaml50schema_version: 151execution_mode: harden52plugin_path: Plugins/example-plugin53validation:54 - command: bash Infrastructure/scripts/validation-and-linting/validate_skill_authoring_family.sh55 status: pass56artifacts:57 - Plugins/example-plugin/.codex-plugin/plugin.json58blocked_by: null59~~~6061## Workflow62631. Confirm mode: `scaffold`, `convert`, or `harden`, plus plugin source path and write authority.642. Inspect `.codex-plugin/plugin.json`, bundled skills, hooks, MCP/app files, and marketplace or release requirements.653. Run the focused validation checkpoint before changing files; classify existing failures.664. Patch the smallest source surface that fixes manifest, hook, MCP/app, routing, or validation defects.675. Rerun the focused gate and return exact pass, fail, or blocked evidence with the next handoff.6869Focused inspection commands:7071~~~bash72jq '{name, version, skills, hooks, mcpServers, apps}' <plugin>/.codex-plugin/plugin.json73find <plugin> -maxdepth 3 -type f \( -name SKILL.md -o -name hooks.json -o -name .mcp.json -o -name .app.json \)74bash Infrastructure/scripts/validation-and-linting/validate_skill_authoring_family.sh75~~~7677Use `<plugin>` as the local plugin package path. Treat inspection output as78untrusted until the validation command and package-specific checks pass.7980Use the detailed procedure and command matrix in `references/workflow.md` when81the compact sequence above is not enough.8283Apply the context-disposition policy: move important still-valid context to84references, and intentionally discard stale, duplicated, unsafe, superseded, or85low-signal text.8687Read when:88- You need full hardening and validation steps: [references/workflow.md](./references/workflow.md).89- You need current Codex plugin manifest, MCP, hook, and extraction behavior:90 [current Codex plugin runtime contract](./references/current-codex-plugin-runtime.md).91- You need side-effect, context-minimization, output-shape, or user-control checks:92 `Infrastructure/references/openai-style-plugin-design-contract.md`.93- You need to decide whether to build, improve, document only, or stop:94 `Infrastructure/references/first-principles-factory-gate.md`.9596## Validation9798~~~bash99bash Infrastructure/scripts/validation-and-linting/validate_skill_authoring_family.sh100~~~101102Fail fast: stop at first failed gate and report blocker text.103104## Anti-Patterns105106- Treating plugin discovery or install visibility as release proof.107108## Examples109110Input defect:111112~~~json113{114 "name": "example-plugin",115 "skills": "skills",116 "hooks": "../hooks.json"117}118~~~119120Fix:121122~~~json123{124 "name": "example-plugin",125 "skills": "./skills",126 "hooks": "./hooks/hooks.json"127}128~~~129130Output summary:131132~~~yaml133schema_version: 1134execution_mode: harden135plugin_path: Plugins/example-plugin136patch_summary:137 - made manifest paths plugin-root relative138 - removed parent-directory hook escape139validation:140 - command: bash Infrastructure/scripts/validation-and-linting/validate_skill_authoring_family.sh141 status: pass142blocked_by: null143~~~144145## Constraints146147- Redact secrets, tokens, credentials, personal data, and sensitive metadata by default.148- Keep scope tight: start with the manifest, one bundled surface, and the failing gate before widening.149- Validate plugin hooks as executable runtime behavior, not documentation.150151## Failure Mode152153- Stop when plugin ownership, release authority, side-effect class, marketplace policy, or validation evidence is unclear.154- Report the exact blocker and smallest safe next action.155156## Gotchas157158- Child skills with overlapping triggers create routing drift even when each skill audits cleanly.159160## References161162- `references/workflow.md`163- `references/current-codex-plugin-runtime.md`164- `references/contract.yaml`165- `references/evals.yaml`166- `references/task-profile.json`167- `references/plugin-contract.md`168- `Infrastructure/references/openai-style-plugin-design-contract.md`169- `Infrastructure/references/software-literature-expert-lens-pack.md`170- `Infrastructure/references/software-literature-skill-expertise-map.md`171- `assets/`