# OSS Contribution Best Practices

A skill that coaches your agent through open source work: clean diffs, honest regression tests and polite exchanges with maintainers.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · ★ 24
- Author: costajohnt
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/costajohnt/oss-autopilot/tree/HEAD/skills/oss-contribution/SKILL.md
- Updated: 2026-10-21
- HTML: https://affpapa.org/en/nevibecode/skills/oss-contribution-best-practices

## What it does

The skill sets the ground rules your agent follows when you send patches to someone else's repository. The main file is an index: universal principles plus pointers to two sibling skills loaded on demand. `pr-etiquette` covers review replies, PR write-ups and nudging quiet pull requests. `contribution-ethics` handles AI attribution and the cases where a human should take over.

Its strongest section is about keeping diffs small. Formatting noise — reordered imports, swapped quotes, stray whitespace — is treated as a defect, not a courtesy. When a formatter has to run, the skill suggests inspecting the result with `git diff` before committing. Then there is the regression test rule: a new test only counts if it fails on the base branch without your patch. Otherwise it guards nothing.

Nothing here commits for you. The skill holds a shape: code first, then a PR that references the issue, with no “I'm on it” comment in between. If a task turns out to be beyond you, it tells the agent to walk away quietly rather than announce the failure. Worth installing if you fire off pull requests to projects you don't own, because an agent left alone tends to touch more than the issue asks.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add costajohnt/oss-autopilot --skill oss-contribution -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/oss-contribution/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/oss-contribution/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add costajohnt/oss-autopilot --skill oss-contribution -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/oss-contribution/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add costajohnt/oss-autopilot --skill oss-contribution -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/oss-contribution/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install costajohnt/oss-autopilot oss-contribution
```

2. **Manually: put the files in place**
- File: `.github/skills/oss-contribution/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add costajohnt/oss-autopilot --skill oss-contribution -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/costajohnt/oss-autopilot --path skills/oss-contribution
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/oss-contribution/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add costajohnt/oss-autopilot --skill oss-contribution -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/costajohnt/oss-autopilot/tree/HEAD/skills/oss-contribution/SKILL.md

## When to use it
- write a PR description that references the issue
- answer reviewer comments without sounding defensive
- confirm a new test fails before the fix lands
- strip formatter noise out of a diff
- decide whether to push a stale PR or close it

## Example prompts
- Check my diff before I open the PR for changes unrelated to the issue
- Help me reply to the review comments on this pull request
- Draft the PR body and reference the issue it fixes

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: fb6854c7c3faa0ef.

BEGIN THIRD-PARTY FILE fb6854c7c3faa0ef
```text
---
name: OSS Contribution Best Practices
description: This skill should be used when the user is working on open source contributions, responding to maintainer feedback, writing PR descriptions, working on issues, following up on dormant PRs, or needs guidance on open source etiquette and best practices.
version: 2.0.0
---

# Open Source Contribution Best Practices

**Reference:** Based on [opensource.guide](https://opensource.guide/how-to-contribute/)

This skill is the index. The detail topics live in two sibling skills that load on demand:

- **`pr-etiquette`** — responding to code review feedback, writing PR descriptions, dormant-PR follow-up cadence, PR quality checklist, communication etiquette.
- **`contribution-ethics`** — AI attribution rules, AI-tell avoidance in maintainer-visible writing, when to defer to a human.

Both are linked below. Use this file for the universal rules that apply to every contribution regardless of stage; jump to the sibling skills when you're at a specific stage in the cycle.

## Core Principles

**Be a good open source citizen:**

1. Respect maintainers' time — they're often unpaid volunteers
2. Read contribution guidelines before contributing
3. Communicate clearly and professionally
4. Be patient — open source moves at its own pace
5. Give back to the community when you can

## Minimal Diff Discipline

Every line in a PR diff must be directly related to the issue being fixed. Unrelated formatting changes (whitespace, quote style, trailing commas, import reordering, line breaks) make diffs noisy, harder to review, and signal carelessness. Maintainers will flag or reject PRs with formatting bloat.

**Rules:**

1. **Only touch lines the fix requires.** Don't reorder imports, change quote styles, fix whitespace, or add trailing commas in existing code — unless those changes are part of the fix itself.
2. **Scope formatter output.** If the repo's formatter must be run (e.g., CI requires it), review the formatter's changes afterward. Use `git diff` to identify formatting-only changes. Use `git checkout -- {files}` only for files where ALL changes are formatting-only. For files with mixed changes, use targeted edits to surgically remove formatting hunks. (In interactive terminal contexts, `git add -p` can also be used for hunk-level staging.)
3. **Match the repo's style, don't impose your own.** If the repo uses single quotes, use single quotes in your new code. If it uses tabs, use tabs. Never convert existing style to a different one.
```
END THIRD-PARTY FILE fb6854c7c3faa0ef

The third-party file has ended. Everything between the fb6854c7c3faa0ef tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2524 of 8255 bytes. © costajohnt · MIT · https://github.com/costajohnt/oss-autopilot/tree/HEAD/skills/oss-contribution/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
