Upstream Fix and Pin

自分の依存ライブラリにバグや欠けている機能があり、上流に PR を出して取り込まれるまで下流プロジェクトを動かしたいときの運用。git ref pin(branch HEAD SHA → merge SHA)、`link:` への退避判断、SHA 取り扱い、pnpm v10 の build script gating まで含む。

423 stars 6 forksGit & Code Review

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add mizchi/skills --skill upstream-fix-and-pin
Manual install
git clone --depth 1 https://github.com/mizchi/skills.git /tmp/skills
mkdir -p ~/.claude/skills
cp -r /tmp/skills/upstream-fix-and-pin ~/.claude/skills/upstream-fix-and-pin

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Upstream Fix and Pin

## When to use

依存ライブラリの修正が必要で、その修正が下流プロジェクトの実装やデバッグに必要なとき。具体的には:

- 自分(または同じ org)が owner の OSS で、PR を自分で投げられる
- 修正が merge されるまで、下流が止まると困る
- monkey-patch / fork publish / vendor 相当の重い手段を取る前に試したい

## The flow

```
[1] 上流に branch を切って fix
        │
        ▼
[2] push して PR
        │
        ▼  下流は (3) で繋ぐ
[3] 下流 package.json を git ref で pin (branch HEAD SHA)
        │
        ▼
[4] PR が merge されたら main の merge SHA に張り替え
        │
        ▼
[5] (任意) 上流が npm publish するならそれに乗り換え
```

PR が長期化したら `link:` に退避(後述)。

## Pin syntax

pnpm / npm 共通:

```json
{
  "dependencies": {
    "<pkg>": "github:<owner>/<repo>#<full-40-char-sha>"
  }
}
```

ブランチ名 pin (`#fix/foo`) は便利だが、merge / rebase で SHA が動くので **再現性が無い**。lab / 検証用なら full SHA 一択。

## SHA を取得する

GitHub の codeload は **full 40-char SHA** を要求する。短縮 SHA を渡すと:

```
ERR_PNPM_FETCH_404  GET https://codeload.github.com/<owner>/<repo>/tar.gz/<short>: Not Found - 404
```

打ち間違いも同じエラーで来る。確実に取るには:

```bash
# upstream の clone から
git -C ~/ghq/github.com/<owner>/<repo> rev-parse <branch>

# クローン無しで origin 直
git ls-remote https://github.com/<owner>/<repo> <branch>
```

PR 用の検証スクリプトでは `git ls-remote` を使うのが安全(手元の clone が古いと違う SHA を引く)。

## pnpm v10: build script の allowlist

PR で `"prepare": "tsc"` のような install-time hook を入れたパッケージを git ref で pin すると、pnpm v10 はビルドスクリプト実行をデフォルト拒否する。エラー:
Read the full skill on GitHub

Details

Skill name
upstream-fix-and-pin
Repository
mizchi/skills
Path
upstream-fix-and-pin/SKILL.md
Repo updated
18 November 2026

FAQ

What does the Upstream Fix and Pin skill do?

自分の依存ライブラリにバグや欠けている機能があり、上流に PR を出して取り込まれるまで下流プロジェクトを動かしたいときの運用。git ref pin(branch HEAD SHA → merge SHA)、`link:` への退避判断、SHA 取り扱い、pnpm v10 の build script gating まで含む。

How do I install the Upstream Fix and Pin skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add mizchi/skills --skill upstream-fix-and-pin. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Upstream Fix and Pin popular?

It lives in mizchi/skills, which has 423 GitHub stars and 6 forks.

Related skills

Actions CI Tuning

423

mizchi/skills

Use when auditing or improving GitHub Actions workflows for a project. Covers cache setup (npm/pnpm/yarn), job parallelism, shard-based test splitting, artifact handling pitfalls, and Playwright-specific patterns. Trigger on: slow CI, cache miss, flaky shard jobs, merge-reports failures, or an explicit 'tune CI' request.

Testing & QA

AI Index

423

mizchi/skills

Method and tooling for measuring how AI-generated a piece of prose reads, in Japanese or English. Two layers — a deterministic lint for removable surface tells (scripts/slopscore.py, no API) and a judgment layer of typed probabilistic questions (Jev noul/score) for the tells that survive editing. Includes measured human/AI baselines, a gap-first calibration procedure, and labeled fixtures. Use when building or calibrating an AI-likeness score, or when a draft needs a defensible number rather than a vibe. For writing guidance use natural-writing-ja / natural-writing-en instead.

AI, LLMs & Agents

Apm Usage

423

mizchi/skills

Reference for APM manifests, installation, targeted updates, deployment paths and lockfiles. Invoke when the user explicitly asks about APM or apm.yml, or an unfamiliar APM command/error needs exact CLI details. Do not automatically invoke for every project that happens to have installed skills.

DevOps & Cloud

Apm Package Author

206

thomast1906/github-copilot-agent-skills

Create, maintain, and troubleshoot APM (Agent Package Manager) manifests for distributing GitHub Copilot skills, agents, and MCP servers. USE FOR: creating apm.yml root manifests; creating packages/* sub-manifests; bundling MCP server config into a package; installing packages from a GitHub repo; troubleshooting APM install errors (missing .vscode/mcp.json, Codex CLI warnings, cached installs). DO NOT USE FOR: general GitHub Copilot customization questions; creating SKILL.md files (use skill-creator); writing MCP server code.

Git & Code Review54

Mcloud Local

237

medusajs/medusa-agent-skills

Execute mcloud local build to reproduce a Cloud build on the local machine. Use when debugging a build-failed deployment without pushing to the tracked branch, iterating on a build fix, or testing build-variable changes locally. Requires Docker and must run inside the project's Git repo.

Git & Code Review29

Gh Aw Operations

206

thomast1906/github-copilot-agent-skills

Comprehensive skills for creating, compiling, debugging, and managing GitHub Agentic Workflows (gh-aw) with best practices and common patterns

Git & Code Review54

Browse the most popular Claude skills, all git & code review skills, or write your own with the skills generator.