gh-pr-metadata
GH PR Metadata
Overview
Normalize the current branch's GitHub PR metadata to this repo's expectations. Keep the title in conventional-commit style, keep the body aligned to .github/pull_request_template.md, and validate before handoff.
Ground the PR metadata in the live branch state, not stale branch names or old commit subjects. Always inspect the current branch diff versus its base before rewriting the PR title/body.
Read references/repo-pr-format.md when you need the exact section order, checklist items, or a title example.
Workflow
- Resolve the current branch PR.
gh pr view --json number,title,body,url,headRefName,baseRefName
- Inspect the current branch state against the PR base branch.
At minimum, check:
git diff --name-status origin/<base>...HEAD
git diff --stat origin/<base>...HEAD
git log --oneline --decorate --no-merges origin/<base>..HEAD
Use these to answer:
- what files actually differ from the base right now
- which changes are functional versus cleanup/tooling/docs
- whether the existing PR title/body still matches the current branch after rebases, reverts, or scope narrowing
- Validate the current title and body.
python3 .codex/skills/gh-pr-metadata/scripts/validate_pr_metadata.py
- If the PR body needs a clean template scaffold, print one:
python3 .codex/skills/gh-pr-metadata/scripts/validate_pr_metadata.py --print-template
- Rewrite the PR title in conventional-commit style.
Rules:
- Prefer
type(scope): summary - Keep the title short and direct
- Use repo-typical types such as
fix,feat,docs,refactor,chore,test,ci,build,perf,revert - Keep the scope tight to the affected package or subsystem when useful
- Do not add prefixes like
[codex] - Make sure the title describes the current branch diff, not the original branch intent if the branch was later narrowed or partially reverted
- Rewrite the PR body to preserve the repo template structure:
## Description## Related Issue## Types of changes## Checklist
- Update the PR with
gh.
Prefer writing the body to a temporary file first, then:
gh pr edit --title "<new-title>" --body-file /tmp/pr-body.md
- Re-run validation and report whether the PR metadata is now compliant.
python3 .codex/skills/gh-pr-metadata/scripts/validate_pr_metadata.py
Body Guidance
- Keep
Descriptionprose-first and specific to the branch. - Reflect the branch as it exists now, especially after rebases, cleanups, or partial reverts.
- Summarize the real file-level themes from the live diff instead of copying commit messages mechanically.
- Put issue references in
Related Issue; if there is no issue, say so plainly instead of deleting the section. - In
Types of changes, check only the boxes that actually apply. - In
Checklist, preserve all repo checklist items and mark only the items that are true. - Do not remove required sections just because the PR is small.
- Keep the body concise; do not turn it into a changelog dump.
Title Guidance
Good examples:
fix(node): normalize remote chunk parsingchore(manifest): drop extra compat cleanupdocs(agents): prefer normalized webpack path requires
Bad examples:
update prfix stuff[codex] cleanup
Validation
Use the helper script to detect:
- non-conventional PR titles
- missing or reordered template sections
- missing repo checklist items
The script validates either the current PR from gh or explicit --title / --body-file input.
More from module-federation/core
mf
All-in-one Module Federation skill. Use when the user asks anything about MF — concepts, configuration, runtime API, shared dependencies, type errors, runtime error code troubleshooting, slow builds, Bridge integration, or adding MF to an existing project.
411mf-integrate
Integrate Module Federation into an existing project — add provider (exposes modules) or consumer (loads remote modules) configuration. Use when the user wants to add Module Federation to an existing Rsbuild / Rspack / Webpack / Modern.js / Next.js / Vite project, set up a remote, create a host app, or quickly consume the demo provider to see MF working. Default role is consumer.
107mf-docs
Answer questions about Module Federation (MF) — configuration, runtime API, build plugins (Webpack/Rspack/Rsbuild/Vite), framework integration (React/Vue/Next.js/Modern.js/Angular), shared dependencies, exposes, remotes, debugging, troubleshooting, and micro-frontend architecture. Use this skill when the user asks anything about module federation, remote modules, shared deps, mf-manifest, federation runtime, or micro-frontends with MF.
100mf-context
Collects the current project's Module Federation context (MFContext) and outputs a structured summary. Serves as the data foundation for all MF diagnostic Skills; can also be called standalone to quickly understand the project's MF configuration.
66mf-shared-deps
Check Module Federation shared dependency configuration: detect shared/externals conflicts, antd/arco transformImport blocking shared deps, and multiple versions of the same shared package in build artifacts. Use when shared dependencies fail to be shared, or host and remote load duplicate instances of a library.
61mf-perf
Check Module Federation local development performance configuration: detect whether recommended performance optimization options are enabled to alleviate slow HMR and slow build speed.
60