跳到正文
cccskills
免费在 GitHub 公开

port-upstream

Analyzes upstream fork PR changes and ports selected items into the local branch. Use when checking upstream PRs, porting upstream changes, or planning selective upstream integration.

中文简介正在准备中。当前显示原文说明。

集成工具GitHub
查看安装方法

包含的文件(1)

  • SKILL.md4.6 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Step 1. Derive the canonical diff (do this BEFORE spawning any agent)

The input to analysis must be a git diff between two tags (or two commits) — not release-notes prose. Release notes are summaries; the diff is ground truth.

1a. Resolve the tag range

From the user's input, identify the upstream repo and the two endpoints:

  • HEAD tag — the release/PR being evaluated (e.g. v4.4.0)
  • BASE tag — the previous release tag on the same upstream branch (e.g. v4.3.0), or whatever tag we last successfully ported up to

If only a release URL is given, infer BASE from the upstream's tag list (gh release list --repo <upstream> --limit 5) — the immediately preceding semver tag.

1b. Fetch the diff via one of these (cheapest first)

# Option A — GitHub compare endpoint (no local fetch needed; works for any public fork)
gh api repos/<owner>/<repo>/compare/<BASE>...<HEAD> \
  --jq '.files[] | {filename, status, additions, deletions, patch}' > /tmp/upstream-diff.json

# Option B — local git (if upstream is wired as a git remote)
git fetch upstream --tags
git diff upstream/<BASE>..upstream/<HEAD> -- ':!*.lock' ':!bin/' ':!*.min.*'

Exclude generated artifacts (bin/, lock files, minified output) — they're noise.

1c. Spawn the Explore agent on the diff

Pass the diff file path (not the release URL) as the agent's primary input. Brief:

  • Classify each changed hunk: new feature / bug fix / doc / generated artifact.
  • For each substantive change, produce a one-line summary plus the file:line citation from the upstream diff.
  • For every item the agent classifies as "already in local", it must produce one of the evidence forms in Verification Rules below. A bare commit-hash citation is not sufficient and must be rejected.
  • Translate any non-English content to English (see Rules).

Why a diff, not release notes

Release notes are prose summaries written by the upstream author. They invite subject-line matching — "upstream said X, local commit says X, must be the same." That heuristic produces false-positive merge claims. Diffs eliminate the abstraction: the hunks either are or are not in the working tree, no interpretation needed.

Step 2. Build the harness plan from the finding

  • Based on what we found in Step 1, write a plan through /harness-plan
  • If there is nothing worth porting, just tell user.

Verification Rules — "is this change already in local?"

This skill exists in a fork of an upstream repo. After git fetch upstream, every commit upstream pushes is reachable by hash from the local repo, even if no local branch points at it. This makes hash-based "proof" unreliable.

Forbidden checks (do not use as proof of local presence)

  • git show <hash> — works on any fetched object, including unmerged upstream commits.
  • git log --oneline | grep <hash> — same problem; the hash is in the object DB, not necessarily on master.
  • Subject-line matching ("upstream commit says X, local commit says X" → "we have it") — heuristic only, never proof.

Required checks (use one — pick the cheapest)

  1. Working-tree symbol grep (preferred). Pick a unique symbol the upstream change introduces — a function name, variable name, regex literal, error string — and grep the working tree:
    grep -rn 'headingTaskRe' .   # if it's missing, the change is not present, full stop
    
  2. Branch reachability (when only a hash is available). Confirm the cited commit is reachable from master:
    git branch --contains <hash>   # empty output = not merged, ignore the citation
    

Default question

When verifying "is this in local?", default the framing to "what would prove this is missing?" — not "what would prove it's present?". Confirmation bias is the recurring failure mode in port reviews; refutation-first framing is the cheapest counter.

Rules

  • If changes are in Japanese or non English, translate to English
  • One verifier, not chained reviewers. Layered second-opinions amplify bad evidence — if the first agent's check is wrong, a reviewer checking the same way will reach the same wrong conclusion.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

allow1

免费

Use when generating, vectorizing, or converting images to SVG — logos, icons, illustrations, or 'allow1'/'quiver' references.

中文简介正在准备中。当前显示原文说明。

tim-hub/powerball-harness352026年8月5日 更新

breezing

免费

Use when running the full team/breezing flow end-to-end — all tasks with parallel workers. Do NOT load for: single-task implementation, planning, review, release, or setup.

中文简介正在准备中。当前显示原文说明。

tim-hub/powerball-harness352026年8月5日 更新

Reviews PRs that modify the Feature Table in CLAUDE.md. Use when a PR adds CC version rows or modifies docs/CLAUDE-feature-table.md.

中文简介正在准备中。当前显示原文说明。

tim-hub/powerball-harness352026年8月5日 更新

Use when researching Claude Code or Codex upstream releases, selecting adaptations, or preparing Harness upgrades. Local-only; not for distribution.

中文简介正在准备中。当前显示原文说明。

tim-hub/powerball-harness352026年8月5日 更新

Creates a single project slide or one-page visual summary for a repo. Use when generating a project intro image or promotional slide.

中文简介正在准备中。当前显示原文说明。

tim-hub/powerball-harness352026年8月5日 更新

Generates product demo videos and release walkthroughs via Remotion. Use when creating video documentation or animated demos.

中文简介正在准备中。当前显示原文说明。

tim-hub/powerball-harness352026年8月5日 更新

查看 tim-hub 的全部技能

报告此技能的问题