Use Garry Tan's exact Claude Code setup: 23 opinionated tools that serve as CEO, Designer, Eng Manager, Release Manager, Doc Engineer, and QA
TypeScript
How to land a fix in someone else's repository
You found a bug in a project you don't own, and you (or your agent) have a fix. Whether it lands depends on the maintainers' rules, their CI and their reviewers, not on yours. This guide is the order we work in: before you design, before you open the pull request, and after each review.
Before you design
- Read their rules. Start with the root
AGENTS.mdorCLAUDE.md, thenCONTRIBUTING.mdand the pull request template. Reviewers, people and bots alike, turn those rules into findings, so a rule you skipped becomes a review round. - Search for the same fix first. Look at their main branch, open pull requests, recently merged ones and issues for your symptom, and do it again right before any public step, because a busy main moves daily. If someone is already fixing it, help that fix with a test or a repro instead of opening a second one. A closed issue can still be broken in a new way: link it ("Related: #N") and describe the new error.
- Read the history of the code you're changing.
git log -p <file>shows what the owner chose on purpose. Reuse the mechanism the code already has before adding a new one. - Keep it small. A short fix in the place the owner already maintains beats a large rewrite that also fixes the bug. When a maintainer's smaller fix lands instead of yours, that's a good outcome: close yours and say thanks.
Before you open the pull request
- Run every guard their CI runs, on your final commit. List them from
.github/workflows/, thescriptsinpackage.json, aMakefileor whatever their CI calls: lint, format, typecheck, size or line-count ratchets, boundary checks, and the tests near your change. A guard you never ran is the easiest way to fail a first review. Your own local review tools don't replace these; they miss repo-specific rules. - Prove the fix. Add one or two tests that fail on their main and pass with your change, and say so in the description with the commands you ran.
- Follow their format. Title style, description sections, "Allow edits by maintainers" turned on. Don't edit their changelog, @-mention people or add trailers unless their rules ask for it.
After each review
- Sort the failing checks. For each one, decide whether your change caused it or it already fails on their main, and prove "already fails" by running it on main. Never call a failure pre-existing without that run.
- Answer each review point in a new commit on the same branch, so reviewers can see exactly what changed. Don't force-push unless their rules ask for a squash.
- Rerun the proof on the new head: the fail-then-pass test and the CI guards from above. Evidence from the previous commit doesn't count.
- Update the description so its evidence describes the current head. Reviewers read the description, not the whole thread.
- Reply once per round, after the push: map each point to the commit that fixes it, or explain with a file and line why the point doesn't apply.
These steps come from landing fixes in one outside project so far. Treat them as a starting checklist and expect them to change as they meet more repositories.