Contribute
Push retro improvements to a branch, open a PR, and optionally create upstream issues. Use when user says "contribute", "push improvements", "push skills", or after retro creates a local commit.From its SKILL.md
npx -y skills add souliane/teatree --skill contributeAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
9.1 KB, as published. Nobody here has run it
Contribute — Branch, PR & Upstream Issue Creation
Handles the push and PR workflow for skill improvements created by t3:retro. Retro commits improvements locally in $T3_REPO; this skill pushes them to a branch and opens a PR — with explicit user consent every time.
All pushes go to branches, never to main. The PR is the review gate.
Dependencies
t3:retro— creates the local commits that this skill pushes.
Configuration
Uses these environment variables (set in your shell profile or via /t3:setup):
T3_CONTRIBUTE— must betruefor this skill to do anything.T3_PUSH—false(default) ortrue. Whenfalse, this skill refuses to push and tells the user to push manually. Exists as a safety stop for privacy/secret review.T3_AUTO_PUSH_FORK—false(default) ortrue. Whentrue, step 4 (push confirmation) is skipped only when the push target is the user's fork (originpush URL differs fromT3_UPSTREAM). Upstream issue creation (step 6) always requires confirmation.T3_UPSTREAM— upstream repo (e.g.,souliane/teatree). Controls where the PR is created:- Empty → push to branch on
origin, create PR onorigin(same repo). - Set → push to branch on
origin(your fork), create PR targetingT3_UPSTREAM.
- Empty → push to branch on
T3_PRIVACY—strict(default) orrelaxed. Seet3:retro§ Privacy Scan.
Why Not Just git push?
Do not push retro commits with git push directly. This skill:
- Ensures commits are on a feature branch (never pushes to main)
- Runs pre-flight checks (pre-commit, tests, privacy scan)
- Requires explicit user confirmation before every push
- Opens a PR for review
- Optionally creates an upstream issue when working from a fork
Workflow
1. Find Unpushed Commits
cd "$T3_REPO"
git log --oneline @{upstream}..HEAD
If no unpushed commits exist, inform the user and stop.
Show the commit log to the user.
1a. Bundle Sibling Retro Branches (Default)
When multiple local branches hold unpushed retro commits from the same session or same logical topic, bundle them into a single PR by default — do not open one PR per branch. Each PR costs a review cycle; the user's explicit policy is to minimise the number of PRs when commits belong together. This is the retro-commit instance of the general ../rules/SKILL.md § "Fewest PRs for Related Work" rule — related work ships as one PR, and splitting needs explicit user approval.
Detect siblings:
cd "$T3_REPO"
DEFAULT=$(git config init.defaultBranch || echo main)
for ref in $(git for-each-ref --format='%(refname:short)' refs/heads/); do
[ "$ref" = "$DEFAULT" ] && continue
ahead=$(git rev-list --count "$DEFAULT..$ref" 2>/dev/null)
[ "${ahead:-0}" -gt 0 ] && git log --format=" %h %s [$ref]" "$DEFAULT..$ref"
done
A sibling is another branch whose commits (a) trace back to the same retro session or (b) touch overlapping skills / cross-reference each other's changes. When in doubt, show the list to the user and ask whether to bundle.
Bundle procedure:
- Pick the branch whose scope most naturally covers the combined change as the umbrella (rename if helpful).
git cherry-pickthe commits from each sibling branch onto the umbrella (oldest-first, preserving authorship).- Re-run § 2 pre-flight on the combined branch.
- Delete the now-empty sibling branches after the combined PR lands:
git branch -D <sibling>andgit worktree remove <path>.
Opt-out: if the user explicitly asks for separate PRs (different review audiences, staged rollout, one-change-per-revert policy), skip bundling. Separate PRs are the exception, not the default.
1b. Squash Option
If the (possibly-bundled) branch has more than one commit, offer to squash following the squash rules in ../ship/SKILL.md § "Finalize Branch". Keep commits separate when each lands a distinct change that deserves its own revert boundary.
2. Pre-Flight Checks (all must pass)
T3_CONTRIBUTE=true— if not, stop: "Self-improvement is disabled. SetT3_CONTRIBUTE=truein your environment (ort3 <overlay> config_setting set contribute true)."T3_PUSHistrue— if not, stop: "Pushing is disabled (T3_PUSH=false). Push manually withgit pushif you're sure."- Has a push remote:
git -C "$T3_REPO" remote -v→ shows a push URL fororigin. - Full gate set passes:
cd "$T3_REPO" && t3 tool verify-gates— runs BOTH commit- and push-stage hooks (a bareprek run --all-filesskips the push-stage gates CI re-runs); fix first if it fails. - Affected tests pass:
cd "$T3_REPO" && bash dev/test-affected.sh— must be green. The diff-scoped lane, not the whole suite: it escalates to FULL itself on anything it cannot prove local, and CI's sharded lane is the whole-tree authority (#3994). - Privacy scan passes: see
t3:retro§ Privacy Scan. Scan the diff of unpushed commits.
3. Verify Branch
Retro commits should already be on the session's working branch (see t3:retro § Branch Selection). Verify you're not on main:
cd "$T3_REPO"
DEFAULT=$(git config init.defaultBranch || echo main)
[ "$(git branch --show-current)" = "$DEFAULT" ] && echo "ERROR: on default branch" && exit 1
If somehow on main (shouldn't happen — retro handles branch selection), create a new branch:
BRANCH="fix/retro-$(date +%Y%m%d)-$(git log -1 --format=%s | sed 's/[^a-zA-Z0-9]/-/g' | head -c 50)"
git checkout -b "$BRANCH"
4. Push Confirmation
Default: every push requires explicit user consent.
Auto-push exception (T3_AUTO_PUSH_FORK=true): skip the confirmation below and proceed directly to push when all of the following hold:
T3_CONTRIBUTE=trueandT3_PUSH=true(already required to reach this step).T3_AUTO_PUSH_FORK=true.origin's push URL does not matchT3_UPSTREAM— the push lands on the user's fork, not upstream.- Pre-flight checks in § 2 all passed, including the privacy scan.
When any of the above fail, fall back to the confirmation flow below.
Show:
════════════════════════════════════════════════════════════════
PUSH REVIEW — <branch> (<N> unpushed commits)
════════════════════════════════════════════════════════════════
Remote: origin (<push-url>)
Commits to push:
- <hash> fix(<skill>): <description>
Files changed:
- <file list with short stat>
Privacy scan: PASSED
════════════════════════════════════════════════════════════════
→ Type "yes" to push, anything else to skip.
════════════════════════════════════════════════════════════════
Do NOT push without explicit "yes" from the user.
5. Push and Create PR
cd "$T3_REPO"
git push -u origin HEAD
Then create the PR:
-
T3_UPSTREAMis empty → PR onorigin(same repo):gh pr create --title "fix(<skill>): <title>" --body "<body>" --base main -
T3_UPSTREAMis set → PR targeting upstream:gh pr create --title "fix(<skill>): <title>" --body "<body>" \ --repo "$T3_UPSTREAM" --head "<fork-owner>:<branch>" --base main
The PR body should include: summary of changes, files changed, validation status (pre-commit, tests, privacy scan).
6. Upstream Issue (if applicable)
When T3_UPSTREAM is set AND the PR landed on a fork (not upstream itself), optionally file a public upstream issue for visibility. See references/upstream-issue.md for the full procedure — divergence gate, issue template, privacy/tone rules, and user-confirmation gate.
Skip this step entirely when T3_UPSTREAM is empty or when the PR already targets upstream.
What NOT to Do
- Do not push without explicit user consent — except when
T3_AUTO_PUSH_FORK=trueand the push target is the user's fork (see § 4). - Do not push to main — always use a branch.
- Do not auto-create upstream issues — § 6 always requires confirmation, regardless of
T3_AUTO_PUSH_FORK. - Do not create upstream issues from heavily diverged forks — they're not useful.
- Do not use
git pushdirectly — always go through this skill for retro commits. - Do not create duplicate upstream issues — check for existing ones first.