From oss-contrib
Use when contributing to open source projects from forked repositories. Handles upstream sync, CONTRIBUTING.md compliance, code style matching, PR preparation, and project-specific patterns. Activates for fork management, PR template filling, and upstream workflow compliance.
How this skill is triggered — by the user, by Claude, or both
Slash command
/oss-contrib:oss-contribThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
| Step | Action |
| Step | Action |
|---|---|
| 1. Sync | git fetch upstream && git merge upstream/main |
| 2. Research | Read CONTRIBUTING.md, PR templates, CLA requirements |
| 3. Branch | Create feature branch from synced default branch |
| 4. Code | Match upstream style exactly - no personal preferences |
| 5. Test | Run upstream's test suite, match their test patterns |
| 6. PR | Follow their PR template, fill all required fields |
Before writing any code:
Sync fork with upstream
git fetch upstream
git checkout main
git merge upstream/main
git push origin main
Read contribution guide
CONTRIBUTING.md in repo root.github/PULL_REQUEST_TEMPLATE.mdCreate feature branch
git checkout -b fix/issue-description
Scope the change
The most important rule: match the upstream project's style exactly.
Before writing code, check:
.editorconfig, pyproject.toml, .eslintrc)Do NOT apply personal preferences. Do NOT run your own formatters unless they match upstream's config.
Create reference files in references/ for projects you regularly contribute to. Each file should document:
| Mistake | Prevention |
|---|---|
| Forgetting to sync upstream before branching | Always git fetch upstream first |
| Applying personal code style | Run upstream's linter, check recent merged PRs |
| Modifying files outside fix scope | Review git diff before committing |
| Missing PR template fields | Read template file, fill every section |
| Not running full test suite locally | Run tests before pushing |
| Adding unnecessary refactoring | Keep changes minimal and focused |
| Ignoring CI failures | Fix all failures before requesting review |
If fork relationship is broken (e.g., repo was made private then public):
When PRs go unreviewed:
npx claudepluginhub sagargupta16/claude-skills --plugin oss-contribForks a repository, syncs with upstream, and submits pull requests for projects where you lack write access. Best for open-source or external contributions.
Open-source pull request creation: PR descriptions, titles, fork workflows, and contribution compliance. Invoke whenever task involves any interaction with pull requests for external repositories — contributing code, opening PRs from forks, writing PR descriptions, or preparing changes for upstream submission.
Automates GitCode open-source repo merge workflow: commit → push → issue → PR → pipeline → review → /lgtm & /approve → merge.