$npx -y skills add tobihagemann/turbo --skill contribute-turboSubmit turbo skill improvements back to the upstream repo. Adapts to repo mode: fork mode creates a PR, source mode pushes directly. Use when the user asks to \"contribute to turbo\", \"submit turbo changes\", \"PR my skill changes\", \"contribute back\", or \"upstream my changes
| 1 | # Contribute Turbo |
| 2 | |
| 3 | Submit staged turbo skill improvements from `~/.turbo/repo/` back to the upstream repo. The workflow adapts based on `repoMode` in `~/.turbo/config.json`. |
| 4 | |
| 5 | ## Step 1: Verify Contributor Status |
| 6 | |
| 7 | Read `~/.turbo/config.json` and check `repoMode`: |
| 8 | |
| 9 | - `"fork"` or `"source"` — proceed |
| 10 | - `"clone"` — tell the user that contributions require a fork. Offer to help convert their clone to a fork (add their fork as origin, rename current origin to upstream). Stop. |
| 11 | - Missing config or repo — tell the user to run the Turbo setup first. Stop. |
| 12 | |
| 13 | Verify the repo exists and has the expected remotes: |
| 14 | |
| 15 | ```bash |
| 16 | git -C ~/.turbo/repo remote -v |
| 17 | ``` |
| 18 | |
| 19 | ## Step 2: Mirror Installed Skill Changes |
| 20 | |
| 21 | Port session corrections from `~/.claude/skills/<name>/` (where edits land first) into `~/.turbo/repo/claude/skills/<name>/` (the basis for the contribution), leaving any persistent local customizations in the installed copy untouched. |
| 22 | |
| 23 | Detect drifted skills: |
| 24 | |
| 25 | ```bash |
| 26 | for skill in ~/.claude/skills/*/; do |
| 27 | name=$(basename "$skill") |
| 28 | repo_dir=~/.turbo/repo/claude/skills/"$name" |
| 29 | [ -d "$repo_dir" ] || continue |
| 30 | diff -rq "$skill" "$repo_dir" >/dev/null 2>&1 && continue |
| 31 | echo "$name" |
| 32 | done |
| 33 | ``` |
| 34 | |
| 35 | For each drifted skill, first check whether the repo copy already has unstaged changes for it (`git -C ~/.turbo/repo status --porcelain claude/skills/<name>/`). If it does, use `AskUserQuestion` to ask the user how to proceed before mirroring — those changes will conflate with mirrored corrections in Step 3 if not resolved. |
| 36 | |
| 37 | Then read both versions of every changed file and classify each hunk: |
| 38 | |
| 39 | - **Correction** — a session edit meant to improve the skill upstream. For modified files, apply each correction hunk with the Edit tool. For new files in the installed copy, create the matching file in the repo copy with the Write tool. For files deleted from the installed copy, remove the repo copy with `rm`. |
| 40 | - **Customization** — a persistent local addition that does not belong upstream (extra workflow steps, personal paths, machine-specific notes, internal references). Leave it in the installed copy; do not propagate. |
| 41 | - **Ambiguous** — use `AskUserQuestion` to confirm classification before applying. |
| 42 | |
| 43 | ## Step 3: Check Cross-Edition Sync |
| 44 | |
| 45 | Before staging, check whether the Claude paths drifted in Step 2 have parallel files in the Codex edition that should be updated alongside them: |
| 46 | |
| 47 | - `claude/skills/<name>/` ↔ `codex/skills/<name>/` |
| 48 | - `claude/SKILL-CONVENTIONS.md` ↔ `codex/SKILL-CONVENTIONS.md` |
| 49 | - `claude/ADDITIONS.md` ↔ `codex/ADDITIONS.md` |
| 50 | - `claude/SETUP.md` ↔ `codex/SETUP.md` |
| 51 | - `claude/UPDATE.md` ↔ `codex/UPDATE.md` |
| 52 | - `claude/MIGRATION.md` ↔ `codex/MIGRATION.md` |
| 53 | |
| 54 | For each Claude path with pending changes, check whether the Codex sibling exists in `~/.turbo/repo/codex/` and whether the local repo already has matching changes for it (`git -C ~/.turbo/repo status --porcelain codex/<path>`). If a Codex sibling exists but has no matching changes, use `AskUserQuestion`: |
| 55 | |
| 56 | > The change to `claude/<path>` touches the Claude edition, but `codex/<path>` exists and has no matching change. Does the Codex sibling need the same update? |
| 57 | |
| 58 | Options: |
| 59 | |
| 60 | - **Yes, I need to update the Codex sibling** — Stop. The user manually edits `~/.turbo/repo/codex/<path>` (vocabulary differs; only behavioral parity is required) and re-runs this skill. |
| 61 | - **No, this is Claude-specific** — Continue. |
| 62 | |
| 63 | If any sibling-update answer is "Yes", stop the workflow. Nothing has been staged yet, so there is no state to clean up before re-running. |
| 64 | |
| 65 | ## Step 4: Review Pending Changes |
| 66 | |
| 67 | Check what changes exist in the local repo: |
| 68 | |
| 69 | ```bash |
| 70 | git -C ~/.turbo/repo diff --name-only |
| 71 | git -C ~/.turbo/repo diff --cached --name-only |
| 72 | ``` |
| 73 | |
| 74 | If there are unstaged changes to skill files, stage the specific skill directories that changed (both editions, when sibling updates landed in Step 3): |
| 75 | |
| 76 | ```bash |
| 77 | git -C ~/.turbo/repo add claude/skills/<name>/ |
| 78 | git -C ~/.turbo/repo add codex/skills/<name>/ # if a sibling was updated |
| 79 | ``` |
| 80 | |
| 81 | If there are no changes at all, tell the user there is nothing to contribute and stop. |
| 82 | |
| 83 | Present the changes in a summary table: |
| 84 | |
| 85 | ``` |
| 86 | | # | Skill | Change Summary | |
| 87 | |---|-------|----------------| |
| 88 | | 1 | /evaluate-findings | Added handling for security-default findings | |
| 89 | | 2 | /self-improve | Clarified routing for trusted reviewer feedback | |
| 90 | ``` |
| 91 | |
| 92 | Use `AskUserQuestion` to confirm which changes to include. If the user deselects some, unstage those files. |
| 93 | |
| 94 | ## Step 5: Validate Skill Quality |
| 95 | |
| 96 | Read `~/.turbo/repo/claude/SKILL-CONVENTIONS.md` for the turbo project's skill conventions. These conventions supplement `/create-skill`'s general best practices with turbo-specific pa |