Contribute framework improvements back to the upstream Manifest repo via PR. Use when the user says "contribute back", "open a PR upstream", "send this fix upstream", or wants to share a framework improvement.
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Um comando direto ignora o prompt de revisão. Verifique a origem antes de executá-lo.
Instruções da origem · Visualização somente leitura
name
manifest-contribute
description
Contribute framework improvements back to the upstream Manifest repo via PR. Use when the user says "contribute back", "open a PR upstream", "send this fix upstream", or wants to share a framework improvement.
Manifest Contribute
Contribute improvements from your application back to the upstream Manifest repository.
When to use: The user says "contribute back", "open a PR upstream", "send this fix upstream", or similar.
Philosophy
The reverse of manifest-update. Update pulls from upstream into your app. Contribute pushes from your app back to upstream. Only framework-level changes are contributed — app-specific code stays local.
The manifest branch is your local read-only copy of the upstream framework. Contributions branch off manifest, cherry-pick framework commits from main, and open a PR against manifest-upstream.
What's Contributable
Framework improvements (manifest/ files)
Skill refinements (.pi/skills/)
Extension improvements or new extensions (extensions/)
Present the list to the user. Ask which commits to contribute. Never auto-select everything.
3. Check for Mixed Commits
Some commits may touch both framework and app-specific files. Identify them:
# For each candidate commit, check what files it touches
git show --stat <hash> --name-only
If a commit touches both framework and app files, warn the user: "This commit includes app-specific changes. I'll cherry-pick it and then strip the app-specific parts."
4. Sync Manifest Branch
Make sure manifest is up to date before branching:
Always use GIT_EDITOR=true to avoid blocking on an interactive editor.
7. Verify the Contribution
Run standard checks on the contribution branch:
bun test
bunx tsc --noEmit
Both must pass. Fix any issues before proceeding.
8. Push and Open PR
Determine whether you can push directly to the upstream repo or need to fork.
Check push access:
# Extract owner/repo from the manifest-upstream remote URL
UPSTREAM_URL=$(git remote get-url manifest-upstream)
UPSTREAM_REPO=$(echo"$UPSTREAM_URL" | sed -E 's#.+github\.com[:/]([^/]+/[^/.]+)(\.git)?$#\1#')
# Check if the authenticated user has push access
gh api "repos/$UPSTREAM_REPO" --jq '.permissions.push' 2>/dev/null
If you have push access (result is true) — push directly:
If you do NOT have push access (result is false or the check fails) — fork first:
# Fork the upstream repo (idempotent — no-ops if fork already exists)
gh repo fork "$UPSTREAM_REPO" --clone=false# Get the authenticated user's GitHub username
GH_USER=$(gh api user --jq '.login')
# Add the fork as a remote (skip if already exists)
git remote get-url my-fork 2>/dev/null || git remote add my-fork "https://github.com/$GH_USER/$(basename $UPSTREAM_REPO).git"# Push to the fork
git push my-fork contribute/<descriptive-name>
Then open the PR from the fork against the upstream repo:
Note the --head "$GH_USER:contribute/..." syntax — GitHub needs the fork owner prefix when the PR comes from a fork.
PR guidelines (apply to both flows):
--base main targets the UPSTREAM repo's main branch (the framework). This is NOT your local main branch (your app). On GitHub, main = the framework. Locally, main = your app and manifest = the framework mirror.
The PR title should follow conventional commit format. The body should:
Explain what was improved and why
List the files changed and their purpose
Note any migration steps if the change affects existing users
Follow the manifest-commit skill conventions for knowledge-transfer writing
9. Return to Your Branch
git checkout main # or your feature branch
The contribution branch stays around until the PR is merged or closed. Don't delete it prematurely.
Rules
Only contribute framework-level changes. App code stays local.
Never auto-select commits. The agent identifies candidates, the user decides.
Always strip app-specific changes from mixed commits before contributing.
Always verify before pushing.bun test, bunx tsc --noEmit.
Always use GIT_EDITOR=true when git commands might open an editor.
Write a clear PR description. The upstream maintainer needs to understand the improvement without context about your specific app.
Never modify the manifest branch directly. Contribution branches are created from it, but it remains a read-only mirror.
Return to your working branch when done — don't leave the repo on the contribution branch.