ワンクリックで
repo-org-migration-url-cleanup
After a GitHub repo moves to a new owner/org, sweep stale URLs everywhere — but preserve historical narrative.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
After a GitHub repo moves to a new owner/org, sweep stale URLs everywhere — but preserve historical narrative.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
A TRefCountPtr/TSharedPtr member in a UE class needs the pointee's full definition, not a forward decl.
When WSL's mirrored networking fails and falls back to "None", plus /etc/wsl.conf has generateResolvConf=false, the distro has no DNS; fix both layers.
When a Windows shell (PowerShell/cmd) feeds a bash script into WSL, CRLF line endings can corrupt the first shell builtin; force LF or pipe via a temp file.
Before "fixing" a recurring error, check git log to see if it was already fixed upstream — the working tree may just be stale.
Always add a space after URL brackets in Markdown to prevent 404 errors with special characters.
Plan a Python 3 modernization sweep (f-strings, super(), type hints) as a series of mechanical PRs, not one mega-PR.
| name | repo-org-migration-url-cleanup |
| description | After a GitHub repo moves to a new owner/org, sweep stale URLs everywhere — but preserve historical narrative. |
| tags | ["git","github","docs","migration","refactor"] |
The user tells you a repo has just been transferred on GitHub — from a personal account to an organization, from one org to another, or from Google Code / Bitbucket to GitHub. GitHub's redirect keeps the old URLs "mostly" working, so it's tempting to do nothing, but the redirect is unreliable for things like coveralls project-IDs, README badges fetched by third parties, and anything cached upstream.
Signal phrases: "we moved the repo", "new org", "rename the owner", "dead links after the move", or a link checker flagging old-URL badges.
Two things go wrong, and they pull in opposite directions:
owner/repo).img.shields.io/github/downloads/<owner>/<repo>/...).git remote -v example output embedded in code comments and
docstrings.# see https://github.com/<old-owner>/<repo>/issues/123).pyproject.toml / setup.py project-urls, homepage,
repository fields.owner/repo.sed every
<old-owner>/<repo> to <new-owner>/<repo>. Some hits are
historical narrative, not live URLs. For example a README
paragraph saying "the project was migrated from Google Code to
's personal repository" describes a real event and
must not be rewritten to say it was migrated to the new org —
that would be fabricating history.Do it as a dedicated sweep, separate from any functional change:
Enumerate categories first (don't just grep blindly). Use the list above as a checklist.
Run the grep with the exact owner/repo pattern (not just
the owner slug, which will match user-names in author fields):
grep -rn '<old-owner>/<repo>' .
Classify every hit into one of three buckets:
git remote -v / clone-command examples in docs or
comments → rewrite; the example is meant to match a fresh
clone today.Keep the sweep in its own commit / PR, separate from any
behavior change. Subject line like docs: update stale repo URLs after org migration. Reviewers can then eyeball the diff
as pure find-and-replace.
Re-run a link checker after the sweep to catch genuinely dead links (old badges that no longer resolve at all, not just moved). Dead-but-not-moved links — e.g. a retired Codebeat badge — should be deleted, not rewritten.
Fix other dead links in the same pass if they are trivially
co-located (e.g. /image/foo.png links that GitHub's web UI
resolves from repo root instead of the file's directory →
switch to a relative path). These are the same kind of "docs
hygiene" change and belong in the same commit.
Repo foo/bar was transferred to org bar-project. Search:
grep -rn 'foo/bar' .
Sample output classified:
README.md:17: []
→ (a) live URL, rewrite to bar-project/bar
README.md:52: The project was later migrated to foo's personal repository …
→ (c) historical narrative, KEEP
src/util.py:54: # origin https://github.com/foo/bar.git (fetch)
→ (b) git remote example, rewrite
src/net.py:711: # See https://github.com/foo/bar/issues/1034
→ (a) issue link, rewrite (issue numbers preserved by GitHub transfer)
pyproject.toml:12: repository = "https://github.com/foo/bar"
→ (a) live URL, rewrite
AUTHORS:3: Jane Doe <jane@foo.example> (originally from foo)
→ (c) author credit, KEEP
Commit 1: rewrite all (a) and (b). Commit 2 (optional): in the same PR, delete retired badges and fix relative-path image links.
grep -rn foo); it will
match author emails, sentences that happen to contain the word,
and file names. Match the full <owner>/<repo> token.git blame still
points at a meaningful "drop py2" / "refactor X" commit rather
than a pile of URL edits.CHANGELOG.md, release notes, release
commit messages, tags) are usually historical narrative — leave
them alone, especially when they quote old PR / issue URLs as
they existed at the time.